php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43762 Boolean FALSE not handled correctly
Submitted: 2008-01-06 03:13 UTC Modified: 2008-01-06 12:20 UTC
From: scratch65535 at att dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.5 OS: v2ksp4
Private report: No CVE-ID: None
 [2008-01-06 03:13 UTC] scratch65535 at att dot net
Description:
------------
The constant isn't translated when alone.  It's translated only when part of an arithmetic expression, or when passed to intval().

This bug appears on two different boxes, both running w2ksp4.  One box is running 4.4.7 (the bug has persisted across upgrades since 4.2), the other 5.2.5.


Reproduce code:
---------------
<?php
  echo false ;
  echo (false) ;
  echo false+false ; 
  echo intval(false) ;
  echo '"'.false.'"' ;
?>

Expected result:
----------------
0000"0"

Actual result:
--------------
00""

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-06 12:20 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

false castet to string is \"\".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 23:01:33 2025 UTC