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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

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: Sat Sep 07 23:01:27 2024 UTC