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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 04:00:01 2026 UTC