3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new stdClass(); $a->id = "2"; $a->name = "hek"; $b = new stdClass(); $b->name = "hek"; $b->id = "2"; echo serialize($a) . PHP_EOL; echo serialize($b) . PHP_EOL;
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
O:8:"stdClass":2:{s:2:"id";s:1:"2";s:4:"name";s:3:"hek";} O:8:"stdClass":2:{s:4:"name";s:3:"hek";s:2:"id";s:1:"2";}
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/CHQPm on line 12 O:8:"stdClass":2:{s:2:"id";s:1:"2";s:4:"name";s:3:"hek";}PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/CHQPm on line 13 O:8:"stdClass":2:{s:4:"name";s:3:"hek";s:2:"id";s:1:"2";}PHP_EOL