|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-14 01:59 UTC] whitephoenix at mail dot ru
[2006-06-14 05:47 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 08:00:02 2025 UTC |
Description: ------------ Its seems, PHP should show error with type E_WARNING. If it's wrong, then i think, NUL-byte is unexpected there. Reproduce code: --------------- <?php // ASCII in hex function show_callback($m) {return '['.dechex(ord($m[0])).']';} function show($result) {echo preg_replace_callback('~\W~','show_callback',$result)."\n";} // Execution for ($i = 0; $i < 5; $i++) { $callback = create_function('$php','undefined();'); $string = substr($callback,0); // or other function, for example, strval() or str_replace()... show($string); } ?> Expected result: ---------------- It seems, PHP should show error with type E_WARNING. If it's wrong, then I think, NUL-byte is unexpected there. Sorry for my English, I know, it's difficult to read. Thanks! Actual result: -------------- [0]lambda_35 [0]lambda_36 [0]lambda_37 [0]lambda_38 [0]lambda_39