Re: print_r outputs nothing for "false"

From: Date: Sun, 29 Apr 2007 15:39:10 +0000
Subject: Re: print_r outputs nothing for "false"
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-29101@lists.php.net to get a copy of this message
Jakob Buchgraber wrote:
Hello! While debuging I recognized that print_r does not output anything for bool(false) (PHP 5.2.1). e.g. <?php print_r (array (true, false, "String")); ?> Expected result: Array (
    [0] => 1
    [1] => 0
    [2] => String
) Actual result: Array (
    [0] => 1
    [1] =>
    [2] => String
) I was not quite sure whether this is expected behavior, so I haven't opened a bug yet. So, is it expected and why?
Because false is not 0. 0 evaluates to false, but so do many other things. -Rasmus

« previous php.internals (#29101) next »