Passing functions to function by reference

From: Date: Wed, 26 Apr 2006 22:35:57 +0000
Subject: Passing functions to function by reference
Groups: php.internals 
Request: Send a blank email to internals+get-22983@lists.php.net to get a copy of this message
In PHP4, you could do: function test() {
       return array(1,2,3);
} $var = array_shift(test()); PHP 5.0 broke this. There was a fatal error on the array_shift that only variables could be passed by reference. There was a good argument for it. So, we started migrating our code. Well, seems this works in 5.1. So, my question is, was it an intentional "fix" or will this break again and we need to continue to watch for this? Brian.

« previous php.internals (#22983) next »