3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function bool2str($bool) { if ($bool === false) { return 'FALSE'; } else { return 'TRUE'; } } $o1 = new stdClass(); $o1->prop1 = 'c'; $o1->prop2 = 25; $o1->prop3 = 201; $o1->prop4 = 1000; $o2 = new stdClass(); $o2->prop1 = 'c'; $o2->prop2 = 25; $o2->prop3 = 200; $o2->prop4 = 9999; echo (int)($o1 < $o2); // 0 echo (int)($o1 > $o2); // 1 $o1->prop3 = 200; echo (int)($o1 < $o2); // 1 echo (int)($o1 > $o2); // 0
based on Wc45S
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.7
0110