php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35020 [ru] array with zero elements
Submitted: 2005-10-30 09:36 UTC Modified: 2005-10-31 13:47 UTC
From: artg at bk dot ru Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: artg at bk dot ru
New email:
PHP Version: OS:

 

 [2005-10-30 09:36 UTC] artg at bk dot ru
Description:
------------
"When converting to boolean, the following values are considered FALSE:
...
an array with zero elements"

May be the real meaning was "an array without elements"?
May be in english it is the same, but for example in russian it isn't.

Reproduce code:
---------------
<?php
  $i=array(0);
  var_dump((bool)$i);
?>

Expected result:
----------------
(bool)false

Actual result:
--------------
(bool)true

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-31 08:57 UTC] vrana@php.net
English version is right, maybe the translation is wrong: http://www.php.net/manual/ru/language.types.boolean.php#language.types.boolean.casting
 [2005-10-31 13:47 UTC] sveta@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicates http://bugs.php.net/bug.php?id=34791
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC