Doc #77098 [Ver->Csd]: [ZH] Wrong explanation for object inversion from array to object
| From: | daijie@php.net | Date: | Fri, 16 Nov 2018 15:55:44 +0000 |
| Subject: | Doc #77098 [Ver->Csd]: [ZH] Wrong explanation for object inversion from array to object | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16149@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77098&edit=1
ID: 77098
Updated by: daijie@php.net
Reported by: starksmile at 163 dot com
Summary: [ZH] Wrong explanation for object inversion from
array to object
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Translation problem
Operating System: Ubuntu
PHP Version: 7.2.11
-Assigned To:
+Assigned To: daijie
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2018-11-16 15:53:27] daijie@php.net
Automatic comment from SVN on behalf of daijie
Revision: http://svn.php.net/viewvc/?view=revision&revision=345991
Log: Fix #77098 [ZH] Wrong explanation for object inversion from array to object
------------------------------------------------------------------------
[2018-11-03 12:59:08] starksmile at 163 dot com
Description:
------------
While in PHP Documentation for Simplified Chinese https://secure.php.net/manual/zh/language.types.object.php
It says:
<?php
$obj = (object) array('1' => 'foo');
var_dump(isset($obj->{'1'})); // outputs 'bool(false)'
var_dump(key($obj)); // outputs 'int(1)'
?>
It should be corrected.
Test script:
---------------
<?php
$obj = (object) array('1'=>'foo');
var_dump(isset($obj->{'1'}));
//var_dump($obj);
var_dump(key($obj));
Expected result:
----------------
Modify documentation.
Actual result:
--------------
bool(true)
string(1) "1"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77098&edit=1