3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Test { public function test(self $other); } class TestImpl implements Test { public function test(self $other) { // Uh oh... some PHP's dont agree echo var_export($other, true) . "\n"; } } $a = new TestImpl(); $b = new TestImpl(); $a->test($b);

preferences:
36.49 ms | 402 KiB | 5 Q