mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Converting arrays to object (bug #34500)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@196452 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
47ae87650c
commit
b647e21d4b
1 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.154 $ -->
|
||||
<!-- $Revision: 1.155 $ -->
|
||||
<chapter id="language.types">
|
||||
<title>Types</title>
|
||||
|
||||
|
@ -2123,9 +2123,10 @@ $bar->do_foo();
|
|||
If an object is converted to an object, it is not modified. If a value
|
||||
of any other type is converted to an object, a new instance of the
|
||||
<literal>stdClass</literal> built in class is created. If the value
|
||||
was null, the new instance will be empty. For any other value, a
|
||||
member variable named <literal>scalar</literal> will contain the
|
||||
value.
|
||||
was &null;, the new instance will be empty. Array converts to an object
|
||||
with properties named by array keys and with corresponding values. For
|
||||
any other value, a member variable named <literal>scalar</literal> will
|
||||
contain the value.
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
|
|
Loading…
Reference in a new issue