Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19927 invoked by uid 1010); 29 Apr 2007 15:38:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 19912 invoked from network); 29 Apr 2007 15:38:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2007 15:38:53 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:36220] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/97-40858-B0CB4364 for ; Sun, 29 Apr 2007 11:38:52 -0400 Received: from [192.168.200.103] (c-24-6-22-164.hsd1.ca.comcast.net [24.6.22.164]) (authenticated bits=0) by mail.lerdorf.com (8.13.8/8.13.8/Debian-3) with ESMTP id l3TFclr6028784; Sun, 29 Apr 2007 08:38:47 -0700 Message-ID: <4634BC1E.9050606@lerdorf.com> Date: Sun, 29 Apr 2007 08:39:10 -0700 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Jakob Buchgraber CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.90.2/3179/Sun Apr 29 03:28:45 2007 on colo X-Virus-Status: Clean Subject: Re: [PHP-DEV] print_r outputs nothing for "false" From: rasmus@lerdorf.com (Rasmus Lerdorf) Jakob Buchgraber wrote: > Hello! > > While debuging I recognized that print_r does not output anything for > bool(false) (PHP 5.2.1). > > e.g. > 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