|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-08-13 14:51 UTC] ondrej at sury dot org
Description:
------------
$GLOBALS variable is not printed out if:
- used from inside string
- used only once
Code works fine in PHP5.
Reproduce code:
---------------
<?php
$file = 'test';
echo __LINE__."${GLOBALS['file']}"."\n";
?>
Expected result:
----------------
3test
Actual result:
--------------
3
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Maybe I should another test case: Reproduce code: --------------- <?php $file = 'test'; echo __LINE__."${GLOBALS['file']}\n"; echo __LINE__.$GLOBALS['file']."\n"; ?> Expected result: ---------------- 3test 4test Actual result: -------------- 3test 4test Ie. it works as it should.