3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $a = 'test'; } class B extends A { protected $b = ['id' => 1]; } $b = new B(); var_dump(reset($b));

preferences:
46.71 ms | 408 KiB | 5 Q