PHP 4.0 Bug #8106: array_pop problem when using against an array returned from a class
| From: | drew at cwa dot co dot nz | Date: | Tue, 05 Dec 2000 02:10:00 +0000 |
| Subject: | PHP 4.0 Bug #8106: array_pop problem when using against an array returned from a class | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40063@lists.php.net to get a copy of this message | ||
From: drew@cwa.co.nz
Operating system: Debian GNU/Linux
PHP version: 4.0.3pl1
PHP Bug Type: Arrays related
Bug description: array_pop problem when using against an array returned from a class
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>";
}
}
?>
--
Edit Bug report at: http://bugs.php.net/?id=8106&edit=1