Date: 07/27/01
- Next message: chris <email protected>: "[PHP-DEV] Bug #12425: apache core dumps when started with a php.ini in /usr/local/lib"
- Previous message: noIdea <email protected>: "[PHP-DEV] Bug #12423: float point assignment error"
- In reply to: Cynic: "[PHP-DEV] Re: [PEAR-DEV] PHP arrays managment bug :-?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: chris <email protected>: "[PHP-DEV] Bug #12425: apache core dumps when started with a php.ini in /usr/local/lib"
- Previous message: noIdea <email protected>: "[PHP-DEV] Bug #12423: float point assignment error"
- In reply to: Cynic: "[PHP-DEV] Re: [PEAR-DEV] PHP arrays managment bug :-?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

