ID: 47309 Updated by: [email protected] Reported By: noah at rave dot ca -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows 2003 PHP Version: 5.2.8 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2009-02-04 17:26:20] noah at rave dot ca Description: ------------ I'm not sure if this is a bug or not but the bottom code works fine... The top one I try to merge two statements and it does not work... Shows Strict Standards: Only variables should be passed by reference in z.php on line 3 But it works if you separate the statements... I know this is not how you would normally code any of this stuff... It just seems weird there is an error... Reproduce code: --------------- <?php $file = '/path/to/some/file.ext'; $extension = array_pop($fileParts = explode('.', basename($file))); //Strict Standards: Only variables should be passed by reference in z.php on line 3 echo $extension . "\n"; // This works, echoes 'ext' echo count($fileParts); // Value is 2 ?> <?php $file = '/path/to/some/file.ext'; $fileParts = explode('.', basename($file)); $extension = array_pop($fileParts); echo $extension . "\n"; // This works, echoes 'ext' echo count($fileParts); // Value is 1 ?> Expected result: ---------------- I expect not to get a strict error cause both are the same... If it works for the bottom one, it should work for the top one... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47309&edit=1
