php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62226 Documentation Error
Submitted: 2012-06-04 19:22 UTC Modified: 2012-06-09 22:46 UTC
From: crmoreira at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.13 OS: MacOS 1.7.4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: crmoreira at gmail dot com
New email:
PHP Version: OS:

 

 [2012-06-04 19:22 UTC] crmoreira at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.is-bool#refsect1-function.is-bool-
returnvalues
---

is_bool(teste)

Test script:
---------------
print "is_bool: " . is_bool(teste) . "\n";

Expected result:
----------------
false

Actual result:
--------------
null

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-09 22:46 UTC] frozenfire@php.net
-Status: Open +Status: Not a bug
 [2012-06-09 22:46 UTC] frozenfire@php.net
The return value of is_bool is a boolean. Booleans cannot be concatenated 
directly into strings. Instead, you should use something like the following:

print "is_bool: ". is_bool($teste)?'Yes':'No';
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 01:00:02 2026 UTC