diff --git a/language/oop5/basic.xml b/language/oop5/basic.xml index 39370b4128..99d9138b3b 100644 --- a/language/oop5/basic.xml +++ b/language/oop5/basic.xml @@ -174,6 +174,39 @@ object(SimpleClass)#1 (1) { ["var"]=> string(30) "$assigned will have this value" } +]]> + + + + PHP 5.3.0 introduced a couple of new ways to create instances of an + object: + + + Creating new objects + +getNew(); +$obj3 = new $obj2; + +var_dump($obj1 === $obj2, $obj2 === $obj3); +?> +]]> + + &example.outputs; + +