Nice Anti Register Globals Code

Found in Textpattern: if (@ini_get('register_globals')) foreach ( $_REQUEST as $name => $value ) unset($$name);

2009-06-06 16:45:00Z · Last edited: 2009-08-27 21:20:14Z

Benchmarks are merciless

JavaScript vs. PythonPHP vs. Python A number 1/4 for A vs. B means that B is 4 times slower than A. The Computer Language Benchmarks Game is more a community benchmark than a programming language benchmark. You get some ballpark figures that confirm what you already know beforehand: C++ is faster than Ruby :-) But it's still depressing to see that a current implementation of JavaScript is faster than Python.

2009-05-28 14:18:00Z · Last edited: 2009-08-27 20:04:12Z

CodeIgniter likes the eval()

$ grep -r 'eval(' codeigniter/ | wc -l 20 Version 1.7.1. From the changelog: Fixed an arbitrary script execution security flaw Well, who would have expected that?

2009-02-28 00:20:00Z · Last edited: 2009-08-27 20:04:12Z

"\'" in PHP

$ cat test.php <?php $string = "O\'Reilly"; echo $string, "\n"; ?> $ php test.php O\'Reilly That's documented but not expected. Languages like Perl, Python, Ruby, Common Lisp, C, Scheme, OCaml, Erlang, Haskell, Tcl, JavaScript, etc. print the expected "O'Reilly". One small stone you can stumble on.

2008-03-13 12:15:00Z · Last edited: 2009-08-27 20:04:52Z