#33482 [Bgs]: Cant give direct function return to end()

From: Date: Sun, 26 Jun 2005 19:39:40 +0000
Subject: #33482 [Bgs]: Cant give direct function return to end()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81043@lists.php.net to get a copy of this message
ID: 33482 User updated by: noscript at uni dot de Reported By: noscript at uni dot de Status: Bogus Bug Type: Variables related Operating System: Windows XP PHP Version: 5.1.0b2 New Comment: but in php4 and php5 stable it works Previous Comments: ------------------------------------------------------------------------ [2005-06-26 20:27:59] derick@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . ------------------------------------------------------------------------ [2005-06-26 20:10:31] noscript at uni dot de Description: ------------ I cannot pass an direct function return to the function end(); Is it a bug or is it a feature... Reproduce code: --------------- $name="file.dat" //does not work: $end=end(explode(".", $name)); //works: $arr=explode(".", $name); $end=end($arr); Expected result: ---------------- $end has value "dat" Actual result: -------------- Error message "only allowed to pass variables" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33482&edit=1

« previous php.bugs (#81043) next »