TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Prime That Wasn't

112 点作者 jordanmessina将近 15 年前

3 条评论

paulgb将近 15 年前
What's scary here is that PHP returns 0 (meaning no match found) rather than FALSE, which is the error return value of preg_match. It's this attitude of failing silently that makes PHP feel like a dangerous language.<p>Granted, it's smart that PHP does have a default backtrack limit. I believe this would have prevented errors like the django forms DoS vulnerability from a while back.
评论 #1572977 未加载
评论 #1573068 未加载
btilly将近 15 年前
This pattern is usually attributed to the famous Perl hacker, Abigail. Abigail is also noted as one of the people who popularized the idea of a JAPH. That is a short piece of Perl that prints out "Just another Perl hacker". For instance the very misleadingly commented:<p><pre><code> $; # A lone dollar? =$"; # Pod? $; # The return of the lone dollar? {Just=&#62;another=&#62;Perl=&#62;Hacker=&#62;} # Bare block? =$/; # More pod? print%; # No right operand for %?</code></pre>
评论 #1573049 未加载
phaedrus将近 15 年前
The idea behind how this works using regular expressions is very similar to how some C++ template metaprograms work.