Cynic wrote:
> 
> >> >
> >> >1) array_pop() bug:
> >> ><?php
> >> >$a = array();
> >> >$a[] = array('foo', 'bar');
> >> >print_r($a);
> >> >$a[] = array('foo2', 'bar2');
> >> >print_r($a);
> >> >$a = array_pop($a);
> >> >print_r($a);
> >> >?>
> 
> 
> so, you're questioning the order of the retval assignment, and the
> popped array?
> 
> >> >$a = array_pop($a);
> >> >print_r($a);
> 
> change that $b = array_pop($a);
> print_r($b);
> and I think you'll see what you expected to see.

Oh, I was really idiot on that, $a is assigned by reference. Sorry, too
much strings :)


Tomas V.V.Cox

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to