3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public $a; public $b; public $c; public $d; } $inner1 = new TestClass; $inner1->a = 1000; $inner2 = new TestClass; $inner2->a = 1000; $inner3 = new TestClass; $inner3->a = 1001; $o1 = new TestClass; $o1->a = 'abc'; $o1->b = ['a', 'b', 'c']; $o1->c = 123456; $o1->d = $inner1; $o2 = new TestClass; $o2->a = 'abc'; $o2->b = ['a', 'b', 'c']; $o2->c = 123456; $o2->d = $inner2; $o3 = new TestClass; $o3->a = 'abc'; $o3->b = ['a', 'b', 'c']; $o3->c = 123456; $o3->d = $inner3; var_dump([ md5($o1), md5($o2), md5($o3), ]); var_dump($o1 == $o2); var_dump($o1 === $o2);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: md5(): Argument #1 ($string) must be of type string, TestClass given in /in/Cm96U:44 Stack trace: #0 /in/Cm96U(44): md5(Object(TestClass)) #1 {main} thrown in /in/Cm96U on line 44
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.98 ms | 401 KiB | 8 Q