3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class t{ private $t; public function __construct($test = 'test12'){ echo $this->t; $this->t = $test; } } $t = new t('tezd'); $t->value = 'clone?'; $t2 = new $t('invoke?'); var_dump($t, $t2);
based on khBGk
Output for 5.6.38 - 7.3.0rc3
object(t)#1 (2) { ["t":"t":private]=> string(4) "tezd" ["value"]=> string(6) "clone?" } object(t)#2 (1) { ["t":"t":private]=> string(7) "invoke?" }