#38294 [Opn]: Doc example problem
| From: | rejek at sdnet dot pl | Date: | Wed, 02 Aug 2006 13:10:28 +0000 |
| Subject: | #38294 [Opn]: Doc example problem | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969373636@lists.php.net to get a copy of this message | ||
ID: 38294
User updated by: rejek at sdnet dot pl
Reported By: rejek at sdnet dot pl
Status: Open
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
New Comment:
In online doc. at:
http://www.php.net/manual/en/language.oop5.basic.php
http://pl.php.net/manual/pl/language.oop5.basic.php
there is the same problem.
MR
Previous Comments:
------------------------------------------------------------------------
[2006-08-02 12:22:14] rejek at sdnet dot pl
Description:
------------
Look at the Ex. 19-4 in polish ver. of documentation avaible to
download at
http://pl2.php.net/get/php_manual_pl.html.gz/from/pl.php.net/mirror
The line "$instance->var = '$assigned will have this value';"
should be just after "<?PHP" tag to get the expected result given in
the box under ex. code.
I don't know how it looks in other language versions.
Brgs
Mateusz Rejek
Reproduce code:
---------------
<?php
$assigned = $instance;
$reference =& $instance;
$instance->var = '$assigned will have this value';
$instance = null; // $instance and $reference become null
var_dump($instance);
var_dump($reference);
var_dump($assigned);
?>
Expected result:
----------------
NULL NULL object(stdClass)#1 (1) { ["var"]=> string(30) "$assigned
will have this value" }
Actual result:
--------------
NULL NULL NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38294&edit=1