3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s1 = 'O:8:"DateTime":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}'; $s2 = 'O:3:"Foo":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}'; global $foo; class Foo extends DateTime { function __wakeupss() { global $foo; $foo = $this; parent::__wakeup(); } public function __set_state($a) { global $foo; $foo = $this; return; } } // Old test case try { unserialize( $s1 ); } catch ( Exception $e ) {} // My test case try { unserialize( $s2 ); } catch ( Exception $e ) {} var_dump( $foo );

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.70.0070.03612.02
5.4.60.0070.03612.02
5.4.50.0100.03512.02
5.4.40.0080.03912.01
5.4.30.0060.03712.01
5.4.20.0080.03412.00
5.4.10.0060.04112.01
5.4.00.0070.03811.50
5.3.170.0060.03912.67
5.3.160.0070.04112.67
5.3.150.0090.04012.67
5.3.140.0060.04512.66
5.3.130.0070.04212.66
5.3.120.0050.04212.66
5.3.110.0080.04012.66
5.3.100.0070.04012.13
5.3.90.0100.03712.11
5.3.80.0070.03812.10
5.3.70.0070.03712.11
5.3.60.0070.03712.08
5.3.50.0070.03912.03
5.3.40.0060.04712.03
5.3.30.0080.04511.99
5.3.20.0070.04311.77
5.3.10.0080.04211.74
5.3.00.0070.04111.73

preferences:
139.55 ms | 1394 KiB | 7 Q