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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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 May 02 05:01:31 2024 UTC