3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $serialized_array = serialize(array(1234=>"foobar")); echo "Serialized Array: $serialized_array" . PHP_EOL; $array = unserialize($serialized_array); print_r($array); if (array_key_exists(1234, $array)) { echo "Key Exists!"; } else { echo "Key Not Found!"; }
based on 8hU2B

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.80.0060.00916.43
7.2.60.0030.01016.78
7.2.00.0030.01019.54
7.1.200.0220.00015.64
7.1.100.0170.01417.89
7.1.70.0000.01117.03
7.1.60.0160.00934.92
7.1.50.0170.00834.82
7.1.40.0180.00734.41
7.1.30.0130.01334.57
7.1.20.0100.01634.49
7.1.10.0030.00916.52
7.1.00.0040.00816.60
7.0.200.0030.00916.57
7.0.190.0000.01216.73
7.0.180.0040.00716.15
7.0.170.0000.01216.36
7.0.160.0090.00316.28
7.0.150.0060.00616.14
7.0.140.0000.01216.18
7.0.130.0090.00316.54
7.0.120.0000.01216.55
7.0.110.0000.01216.50
7.0.100.0060.00616.37
7.0.90.0040.00816.37
7.0.80.0000.01316.44
7.0.70.0120.00016.22
7.0.60.0000.01416.16
7.0.50.0040.00816.38
7.0.40.0060.00616.49
7.0.30.0070.00416.60
7.0.20.0060.00616.37
7.0.10.0070.00716.39
7.0.00.0000.01216.43
hhvm-3.15.40.0570.12487.26
5.6.300.0160.05320.83
5.6.290.0160.04520.61
5.6.280.0100.05220.80
5.6.270.0040.06720.85
5.6.260.0070.05920.91
5.6.250.0170.06020.82
5.6.240.0030.06320.78
5.6.230.0180.05020.80
5.6.220.0100.05420.76
5.6.210.0100.05520.96
5.6.200.0070.06020.89
5.6.190.0100.05620.87
5.6.180.0070.05520.78
5.6.170.0130.05220.78
5.6.160.0100.05320.91
5.6.150.0070.05820.93
5.6.140.0030.06121.03
5.6.130.0130.04920.98
5.6.120.0100.05420.73
5.6.110.0260.04520.75
5.6.100.0070.05920.91
5.6.90.0130.05321.01
5.6.80.0130.05520.42
5.6.70.0110.05020.14
5.6.60.0040.05720.20
5.6.50.0000.05920.31
5.6.40.0070.05620.13
5.6.30.0130.05120.11
5.6.20.0120.05320.34
5.6.10.0170.04320.08
5.6.00.0100.05320.33