<?php class Foo { protected $bar; public function __construct($bar = null) { $this->bar = $bar; } } $a = new Foo('baz'); $b = new $a; var_dump($a, $b);
You have javascript disabled. You will not be able to edit any code.