|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-25 23:04 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 01:00:01 2025 UTC |
Description: ------------ One script but two value from getcwd() Reproduce code: --------------- Note that both script are placed in dir: C:\Apache2\htdocs\script // index1.php (script with bug): <? function a($i){ $i.='func getcwd(): '.getcwd(); return($i); } ob_start('a'); print('main getcwd(): '.getcwd().'<br>'); ?> // index2.php (to clarificate): <? function a($i){ print('func getcwd(): '.getcwd()); return($i); } print('main getcwd(): '.getcwd().'<br>'); $a=array(''); $a=array_map('a',$a); ?> Expected result: ---------------- // index1.php return: main getcwd(): C:\Apache2\htdocs\script func getcwd(): C:\Apache2\htdocs\script // index2.php return: main getcwd(): C:\Apache2\htdocs\script func getcwd(): C:\Apache2\htdocs\script Actual result: -------------- // index1.php return: main getcwd(): C:\Apache2\htdocs\script func getcwd(): C:\Apache2 // index2.php return: main getcwd(): C:\Apache2\htdocs\script func getcwd(): C:\Apache2\htdocs\script