php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52224 [DE] Logic problem in example
Submitted: 2010-07-01 19:30 UTC Modified: 2010-07-02 21:40 UTC
From: alex dot b dot mail at gmx dot de Assigned: wiesemann (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2010-07-01 19:30 UTC] alex dot b dot mail at gmx dot de
Description:
------------
The is_bool example is not correct. Here ist the original example:
<?php
$a = false;
$b = 0;
// Da $a ein Boolean ist, wird true zurückgegeben
if (is_bool($a)) {
    echo "Ja, das ist ein Boolean";
}
// Da $b kein Boolean ist, wird false zurückgegeben
if (is_bool($b)) {
    echo "Nein, dies ist kein Boolean";
}
?>

The correct example should be like the following "Test script" or similar.


Test script:
---------------
<?php
$a = false;
$b = 0;
// Da $a ein Boolean ist, wird true zurückgegeben
if (is_bool($a)) {
    echo "Ja, \$a ist ein Boolean. ";
}
// Da $b kein Boolean ist, wird false zurückgegeben
if (is_bool($b)) {
    echo "Ja, \$b ist ein Boolean. ";
}
else {
    echo "Nein, \$b ist kein Boolean. ";
}
?>

Expected result:
----------------
Ja, $a ist ein Boolean. Nein, $b ist kein Boolean. 

Actual result:
--------------
Ja, das ist ein Boolean

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-01 23:13 UTC] wiesemann@php.net
-Summary: Logic problem in example +Summary: [DE] Logic problem in example -Status: Open +Status: Analyzed -Package: Documentation problem +Package: Translation problem -Assigned To: +Assigned To: wiesemann
 [2010-07-01 23:13 UTC] wiesemann@php.net
This is just a translation error. The English examples are correct.
 [2010-07-02 21:40 UTC] wiesemann@php.net
Automatic comment from SVN on behalf of wiesemann
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=300954
Log: - fixed Doc Bug #52224: [DE] Logic problem in example
 [2010-07-02 21:40 UTC] wiesemann@php.net
-Status: Analyzed +Status: Closed
 [2010-07-02 21:40 UTC] wiesemann@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 17:01:31 2024 UTC