3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Aaa { private $a; protected $b; public $c; function f() { $this->a = 1; $this->b = 2; $this->c = 3; } } $a = new Aaa; $a->f(); $b = clone $a; var_dump($b);

preferences:
49.06 ms | 402 KiB | 5 Q