darkk thinkpad php -r function foobar name name name name var_dump nam

1
2
3
4
5
6
darkk@thinkpad ~ $ php -r 'function foobar($name) { $name['name'] = $name; var_dump($name); } foobar("foobar");'
string(6) "oobar"
^^ length is 6, but first char is replaced with '\0'
PHP 5.2.6RC4-pl0-gentoo (cli) (built: Apr 21 2008 20:36:58)