ID: 9685
Updated by: sbergmann
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Arrays related
Operating system: 
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

Does this problem persist with PHP 4.0.5?


Previous Comments:
---------------------------------------------------------------------------

[2001-03-11 16:23:59] [EMAIL PROTECTED]
I think that problem is in row marked in script with "ERROR LINE? =>"

This script causes error if $GLOBALS is passed as first argument. I didn't experienced 
the problem with any other variable.

SCRIPT:
<?php
$GLOBALS[is_included][echo_array]=(true);
function echo_array($a,$key="",$l=1)
{echo "<CODE>nArray <B>".$key."</B><BR>n";
 echo_array_self($a,$key,$l);
 echo "n</CODE>";
}
function echo_array_self($a,$key="",$l=1)
{while(list($k,$v)=each($a))
 {for($i=0;$i<$l;$i++){echo " |";}
  echo " +";
  if(is_array($v)):
   echo " + <B>".$key."[".$k."]</B> - array()<BR>n";
ERROR LINE? => if($v!=$GLOBALS):
    echo_array_self($v,$key."[".$k."]",$x=$l+1);
   endif;
  else:
   echo " - ".$key."[".$k."]=";
   if(is_string($v)):
    echo "'$v'<BR>n";
   else:
    echo $v."<BR>n";
   endif;
  endif;
 }
}
?>
I can't give you any other informations.

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9685&edit=2


-- 
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