3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function cmp($a, $b) { if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; } // Zu sortierendes Array $array = array('a' => 4, 'b' => 8, 'c' => -1, 'd' => -9, 'e' => 2, 'f' => -1, 'g' => 3, 'h' => -4, 'i' => -1); print_r($array); // Sortieren und Ausgeben des Arrays uasort($array, 'cmp'); print_r($array);

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.60.1200.01114.84
7.2.00.0100.00719.25
7.1.200.0040.00815.86
7.1.100.0040.00818.10
7.1.70.0080.00017.07
7.1.60.0070.01819.30
7.1.50.0070.01616.99
7.1.00.0000.03722.37
7.0.200.0070.00316.49
7.0.140.0100.06722.09
7.0.120.0000.07722.08
7.0.60.0100.07019.87
7.0.50.0100.07717.88
7.0.40.0070.09020.40
7.0.30.0170.06320.22
7.0.20.0130.04720.09
7.0.10.0130.04320.25
7.0.00.0100.05320.16
5.6.280.0030.07721.12
5.6.210.0100.07720.51
5.6.200.0030.04318.28
5.6.190.0070.08320.49
5.6.180.0230.06020.60
5.6.170.0030.05320.57
5.6.160.0070.04720.57
5.6.150.0100.06318.19
5.6.140.0070.06018.28
5.6.130.0030.04318.12
5.6.120.0070.05021.15
5.6.110.0070.08321.12
5.6.100.0000.04721.03
5.6.90.0030.09020.98
5.6.80.0070.03320.39
5.6.70.0200.04020.50
5.5.350.0300.08020.30
5.5.340.0030.04017.92
5.5.330.0100.05020.19
5.5.320.0070.04720.43
5.5.310.0300.06020.42
5.5.300.0070.08317.98
5.5.290.0030.04717.98
5.5.280.0030.07320.85
5.5.270.0030.09020.77
5.5.260.0100.06020.67
5.5.250.0070.06020.79
5.5.240.0130.07720.32
5.4.450.0800.04019.15
5.4.440.0400.04719.54
5.4.430.0670.04319.27
5.4.420.0800.02719.54
5.4.410.0370.03719.39
5.4.400.0870.02719.01
5.4.390.0300.04019.14
5.4.380.0270.05019.00
5.4.370.0330.04719.22
5.4.360.0430.04019.16
5.4.350.0500.03318.99
5.4.340.0570.05019.31
5.4.320.0570.04719.04
5.4.310.0170.04719.22
5.4.300.0530.03019.03
5.4.290.0530.04018.84
5.4.280.0770.03719.04
5.4.270.0570.03719.14
5.4.260.0630.03319.21
5.4.250.0500.04018.82
5.4.240.0430.03718.86
5.4.230.0500.04319.03
5.4.220.0730.04019.04
5.4.210.0670.03318.98
5.4.200.0300.03019.21
5.4.190.0170.05318.95
5.4.180.0400.04319.16
5.4.170.0630.04019.21
5.4.160.0330.05719.02
5.4.150.0400.04318.93
5.4.140.0730.03016.36
5.4.130.0600.03716.49
5.4.120.0330.04316.47
5.4.110.0600.04316.52
5.4.100.0670.04016.52
5.4.90.0670.03016.57
5.4.80.0600.04316.42
5.4.70.0500.04316.49
5.4.60.0770.04716.43
5.4.50.0630.03716.31
5.4.40.0470.03316.51
5.4.30.0500.03716.42
5.4.20.0470.04016.41
5.4.10.0470.04016.40
5.4.00.0430.03315.96
5.3.290.0600.03715.77
5.3.280.0530.04015.77
5.3.270.0700.07015.77
5.3.260.0570.04015.77
5.3.250.0170.04315.77
5.3.240.0570.04015.77
5.3.230.0630.04015.77
5.3.220.0430.03315.77
5.3.210.0700.02715.77
5.3.200.0330.04015.77
5.3.190.0370.03715.77
5.3.180.0470.04015.77
5.3.170.0730.03715.77
5.3.160.0370.03715.77
5.3.150.0600.04315.75
5.3.140.0370.04315.70
5.3.130.0300.05015.70
5.3.120.0830.04015.70
5.3.110.0630.04715.70
5.3.100.0330.04315.70
5.3.90.0730.04015.70
5.3.80.0700.04715.70
5.3.70.0470.04015.70
5.3.60.0830.03715.70
5.3.50.0200.03715.70
5.3.40.0770.03315.70
5.3.30.0730.03315.70
5.3.20.0530.04015.70
5.3.10.0700.03015.70
5.3.00.0330.04015.70
5.2.170.0430.03715.70
5.2.160.0600.03015.70
5.2.150.0530.03315.70
5.2.140.0270.03715.70
5.2.130.0670.03315.70
5.2.120.0270.03315.70
5.2.110.0830.02315.70
5.2.100.0500.03315.70
5.2.90.0970.02315.70
5.2.80.0300.03315.70
5.2.70.0570.03015.70
5.2.60.0230.03715.70
5.2.50.0530.03015.70
5.2.40.0570.02315.70
5.2.30.0470.03715.70
5.2.20.0430.03015.70
5.2.10.0430.03015.70
5.2.00.0430.03315.70
5.1.60.0400.03015.70
5.1.50.0170.02015.70
5.1.40.0700.02015.70
5.1.30.0700.02015.70
5.1.20.0670.03015.70
5.1.10.0530.02715.70
5.1.00.0430.02715.70
5.0.50.0170.02015.70
5.0.40.0070.02015.70
5.0.30.0230.03315.70
5.0.20.0130.02315.70
5.0.10.0170.02315.70
5.0.00.0400.03015.70
4.4.90.0100.01315.70
4.4.80.0200.01315.70
4.4.70.0030.02315.70
4.4.60.0100.01715.70
4.4.50.0300.01715.70
4.4.40.0230.02015.70
4.4.30.0100.01715.70
4.4.20.0300.01715.70
4.4.10.0300.01315.70
4.4.00.0100.02015.70
4.3.110.0270.01715.70
4.3.100.0300.01715.70
4.3.90.0400.01015.70
4.3.80.0030.02715.70
4.3.70.0070.01715.70
4.3.60.0200.01715.70
4.3.50.0000.01715.70
4.3.40.0330.02015.70
4.3.30.0070.01715.70
4.3.20.0070.01715.70
4.3.10.0170.01715.70
4.3.00.0030.02015.70