note 94416 deleted from language.oop5.basic by danbrown
| From: | danbrown@php.net | Date: | Tue, 03 Nov 2009 18:21:14 +0000 |
| Subject: | note 94416 deleted from language.oop5.basic by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162372@lists.php.net to get a copy of this message | ||
Note Submitter: r dot wilczek at web-appz dot de
----
Wierd about the 'new'-operator is, that you can use it with not only with the name of a
concrete class, but with an instance also!
<?php
$x = new stdClass();
$y = new $x;
?>
This is the same as
<?php
$x = new stdClass();
$y = new stdClass();
?>
Not sure, if this is a bug ... but for sure it's a wierdo ...
(tested with PHP 5.3.0)