php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77098 [ZH] Wrong explanation for object inversion from array to object
Submitted: 2018-11-03 12:59 UTC Modified: 2018-11-16 15:55 UTC
From: starksmile at 163 dot com Assigned: daijie (profile)
Status: Closed Package: Translation problem
PHP Version: 7.2.11 OS: Ubuntu
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: starksmile at 163 dot com
New email:
PHP Version: OS:

 

 [2018-11-03 12:59 UTC] 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"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-03 14:41 UTC] cmb@php.net
-Summary: Wrong explanation for object inversion from array to object. +Summary: [ZH] Wrong explanation for object inversion from array to object -Status: Open +Status: Verified -Package: Class/Object related +Package: Translation problem
 [2018-11-16 15:53 UTC] daijie@php.net
Automatic comment from SVN on behalf of daijie
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=345991
Log: Fix #77098 [ZH] Wrong explanation for object inversion from array to object
 [2018-11-16 15:55 UTC] daijie@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: daijie
 [2018-11-16 15:55 UTC] daijie@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.


 [2020-12-30 10:47 UTC] nikic@php.net
Automatic comment on behalf of daijie
Revision: http://git.php.net/?p=doc/zh.git;a=commit;h=5ecd64efad91fffea7dab19598abfbb03e345a57
Log: Fix #77098 [ZH] Wrong explanation for object inversion from array to object
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC