3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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);
based on 0bGBF