|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-19 09:28 UTC] tony2001@php.net
[2006-12-19 14:26 UTC] roberto at spadim dot com dot br
[2006-12-19 14:34 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 06:00:01 2025 UTC |
Description: ------------ maybe strval isn't otimized see reproduce code Reproduce code: --------------- <?php function ret($st){return($st);} $qnt=1000000; $str=str_repeat("ae",1000); $st1=microtime(1); for ($i=0;$i<$qnt;$i++) ret($str); echo (microtime(1)-$st1)."\n"; $st1=microtime(1); for ($i=0;$i<$qnt;$i++) strval($str); echo (microtime(1)-$st1)."\n\n"; ?> Expected result: ---------------- expect to result 2 be small than result 1 Actual result: -------------- result 1 is bigger than 2