Date: 07/27/01
- Next message: peter-h.hoffmann <email protected>: "[PHP-DEV] Bug #12394 Updated: Select statement"
- Previous message: Heikki Korpela: "Re: [PHP-DEV] Security Issues"
- In reply to: Tomas V.V.Cox: "[PHP-DEV] PHP arrays managment bug :-?"
- Next in thread: Tomas V.V.Cox: "[PHP-DEV] Re: [PEAR-DEV] PHP arrays managment bug :-?"
- Reply: Tomas V.V.Cox: "[PHP-DEV] Re: [PEAR-DEV] PHP arrays managment bug :-?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I don't see any error in the output. What did you expect?
At 14:30 7/27/2001, Tomas V.V.Cox wrote the following:
--------------------------------------------------------------
>During my test with the pushErrorHandling and popErrorHandling I found
>strange behavoirs of the PHP array functions (I use last cvs php under
>Linux).
>
>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);
>?>
>
>The output:
>Array
>(
> [0] => Array
> (
> [0] => foo
> [1] => bar
> )
>
>)
>Array
>(
> [0] => Array
> (
> [0] => foo
> [1] => bar
> )
>
> [1] => Array
> (
> [0] => foo2
> [1] => bar2
> )
>
>)
>Array
>(
> [0] => foo2
> [1] => bar2
>)
>
>2) The array[] statement fails to find the correct last value:
><?php
>$a = array();
>$a[] = array('foo', 'bar');
>print_r($a);
>$a[] = array('foo2', 'bar2');
>print_r($a);
>unset($a[sizeof($a) - 1]);
>print_r($a);
>$a[] = array('foo3', 'bar3');
>print_r($a);
>?>
>
>The output:
>Array
>(
> [0] => Array
> (
> [0] => foo
> [1] => bar
> )
>
>)
>Array
>(
> [0] => Array
> (
> [0] => foo
> [1] => bar
> )
>
> [1] => Array
> (
> [0] => foo2
> [1] => bar2
> )
>
>)
>Array
>(
> [0] => Array
> (
> [0] => foo
> [1] => bar
> )
>
>)
>Array
>(
> [0] => Array
> (
> [0] => foo
> [1] => bar
> )
>
> [2] => Array
> (
> [0] => foo3
> [1] => bar3
> )
>
>)
>
>Isn't those bugs serious or am I loosing something?
>
>
>Tomas V.V.Cox
>
>--
>PEAR Development Mailing List (http://pear.php.net/)
>To unsubscribe, e-mail: pear-dev-unsubscribe <email protected>
>For additional commands, e-mail: pear-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
------end of quote------
cynic <email protected>
-------------
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7
-- 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: peter-h.hoffmann <email protected>: "[PHP-DEV] Bug #12394 Updated: Select statement"
- Previous message: Heikki Korpela: "Re: [PHP-DEV] Security Issues"
- In reply to: Tomas V.V.Cox: "[PHP-DEV] PHP arrays managment bug :-?"
- Next in thread: Tomas V.V.Cox: "[PHP-DEV] Re: [PEAR-DEV] PHP arrays managment bug :-?"
- Reply: Tomas V.V.Cox: "[PHP-DEV] Re: [PEAR-DEV] PHP arrays managment bug :-?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

