3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a; } class B extends A { public $b; } $a = new B(); $a->a = 0; $a->b = 1; $b = new B(); $b->a = 1; $b->b = 0; var_dump($a < $b); (array)$a; var_dump($a < $b);

preferences:
25.05 ms | 404 KiB | 5 Q