ID: 8106
Updated by: jmcastagnetto
Old-Status: Analyzed
Status: Closed
Bug Type: Documentation problem
Assigned To: 

Fixed in manual (CVS)

Previous Comments:

[2000-12-07 03:13:01] [EMAIL PROTECTED]
Reclassified as documentation problem.

array_pop($arr) (and array_shift($arr) ?) returns NULL in case the $arr is
an empty array or it isn't an array at all. 



[2000-12-05 06:15:12] [EMAIL PROTECTED]
If you pass a non-array to array_pop() it just displays an
error message. 

After checking the sources for this function, it looks
like it doesn't return anything in case of this error.

Do you mean it should return FALSE in case of this error?
(I think it should)

But if you pass an empty array for array_pop() it
won't return anything but will not display any error 
messages either which I think is the right behaviour. 



[2000-12-04 21:10:00] [EMAIL PROTECTED]
Seems to return no TRUE value when using array_pop () on an array returned by a class.

Code Example:

class Form {

      function parse ($arg) {
               ereg("(.*)&[(.?)]", $arg, $query);
               return $query;



$form = new Form;

$output = $form->parse($QUERY_STRING);

$number = array_pop($output);

if ($number) { echo "$number exists"; }

foreach ($output as $tmp) {
        if (($tmp)&&($tmp != $QUERY_STRING)) {
           echo "$tmp<Br>";



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
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