3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr['i1']['val1'] = 99; $arr['i1']['val2'] = 100; $arr['i2']['val1'] = 89; $arr['i2']['val2'] = 101; function cmp($a, $b) { static $called = 0; echo $called++, "\n"; if ($called > 2) die('overflow'); if ($GLOBALS['arr'][$a]['val2'] > $GLOBALS['arr'][$b]['val2']) { return 1; } if ($GLOBALS['arr'][$q]['val2'] < $GLOBALS['arr'][$b]['val2']) { return -1; } return 0; } if (uksort($arr, 'cmp')) { echo "success\n"; } else { echo "failure\n"; } print_r($arr);

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)
8.3.40.0120.00918.67
8.3.30.0090.00618.97
8.3.20.0080.00018.78
8.3.10.0060.00320.59
8.3.00.0070.00417.50
8.2.170.0130.00722.96
8.2.160.0130.00321.07
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0080.00019.61
8.2.110.0070.00421.04
8.2.100.0000.01218.03
8.2.90.0000.00819.22
8.2.80.0040.00417.93
8.2.70.0000.00817.75
8.2.60.0080.00018.03
8.2.50.0060.00318.07
8.2.40.0040.00418.09
8.2.30.0030.00618.16
8.2.20.0020.00517.65
8.2.10.0040.00417.79
8.2.00.0000.00817.70
8.1.270.0000.00724.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.59
8.1.230.0070.00420.86
8.1.220.0030.00717.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.41
8.1.180.0030.00518.10
8.1.170.0050.00320.53
8.1.160.0000.00918.89
8.1.150.0040.00418.63
8.1.140.0030.00517.48
8.1.130.0000.00717.68
8.1.120.0000.00717.45
8.1.110.0000.00817.48
8.1.100.0040.00317.51
8.1.90.0050.00317.36
8.1.80.0000.00717.44
8.1.70.0070.00017.43
8.1.60.0000.00817.60
8.1.50.0000.00917.45
8.1.40.0070.00017.34
8.1.30.0000.00817.63
8.1.20.0030.00517.61
8.1.10.0060.00317.56
8.1.00.0000.00717.39
8.0.300.0040.00420.02
8.0.290.0080.00016.75
8.0.280.0000.00718.45
8.0.270.0030.00317.25
8.0.260.0030.00316.79
8.0.250.0040.00417.02
8.0.240.0050.00317.02
8.0.230.0000.00717.04
8.0.220.0000.00717.00
8.0.210.0030.00516.79
8.0.200.0030.00316.98
8.0.190.0040.00416.92
8.0.180.0000.00716.89
8.0.170.0090.00016.93
8.0.160.0000.00716.97
8.0.150.0070.00316.89
8.0.140.0040.00416.87
8.0.130.0000.00613.35
8.0.120.0060.00316.81
8.0.110.0040.00416.96
8.0.100.0050.00316.80
8.0.90.0040.00416.84
8.0.80.0070.00716.92
8.0.70.0020.00516.76
8.0.60.0000.00716.74
8.0.50.0040.00416.77
8.0.30.0120.01117.16
8.0.20.0070.01217.10
8.0.10.0000.00717.06
8.0.00.0120.00716.67
7.4.330.0000.00513.00
7.4.320.0060.00016.64
7.4.300.0040.00416.52
7.4.290.0000.00816.61
7.4.280.0040.00416.60
7.4.270.0050.00316.69
7.4.260.0000.00513.39
7.4.250.0050.00316.47
7.4.240.0000.00716.61
7.4.230.0050.00216.40
7.4.220.0100.01516.65
7.4.210.0080.00816.56
7.4.200.0050.00316.34
7.4.190.0070.00016.74
7.4.160.0050.01116.55
7.4.150.0120.00616.66
7.4.140.0110.00916.59
7.4.130.0080.00916.64
7.4.120.0070.01016.48
7.4.110.0030.01316.56
7.4.100.0100.01316.50
7.4.90.0110.00716.45
7.4.80.0030.01919.39
7.4.70.0070.01116.64
7.4.60.0150.00816.41
7.4.50.0000.00716.20
7.4.40.0030.01016.45
7.4.30.0080.01216.41
7.4.00.0070.01015.20
7.3.330.0000.00613.45
7.3.320.0000.00613.48
7.3.310.0000.00716.33
7.3.300.0000.00716.30
7.3.290.0090.00916.43
7.3.280.0030.01216.39
7.3.270.0060.01116.43
7.3.260.0040.01616.61
7.3.250.0120.00816.44
7.3.240.0000.02116.65
7.3.230.0120.00416.48
7.3.210.0120.00616.45
7.3.200.0100.00716.61
7.3.190.0120.00916.40
7.3.180.0090.00616.50
7.3.170.0150.00016.69
7.3.160.0080.00816.55
7.3.120.0030.00614.66
7.2.330.0090.00916.78
7.2.320.0170.00016.69
7.2.310.0120.00816.75
7.2.300.0030.01316.43
7.2.290.0060.01216.87
7.2.60.0030.01316.79
7.2.00.0060.01219.45
7.1.200.0070.00315.76
7.1.100.0180.00617.91
7.1.70.0000.00917.32
7.1.60.0070.01719.40
7.1.50.0040.00716.89
7.1.00.0130.07022.30
7.0.200.0120.00314.89
7.0.140.0130.06722.01
7.0.120.0000.07721.96
7.0.60.0030.07319.95
7.0.50.0030.04317.97
7.0.40.0000.10020.26
7.0.30.0270.04020.21
7.0.20.0200.04320.12
7.0.10.0300.08020.24
7.0.00.0070.05720.16
5.6.280.0030.07020.86
5.6.210.0070.08020.70
5.6.200.0100.06318.25
5.6.190.0100.06320.57
5.6.180.0330.03020.42
5.6.170.0300.07020.49
5.6.160.0100.05320.47
5.6.150.0070.05018.15
5.6.140.0070.05018.24
5.6.130.0100.07318.21
5.6.120.0030.09320.99
5.6.110.0100.06321.05
5.6.100.0100.08021.04
5.6.90.0100.06721.08
5.6.80.0070.07020.37
5.6.70.4530.03020.51
5.5.350.0370.07020.32
5.5.340.0100.03717.96
5.5.330.0030.08720.27
5.5.320.0170.08720.47
5.5.310.0200.03720.34
5.5.300.0030.08718.00
5.5.290.0100.08317.98
5.5.280.0070.04020.80
5.5.270.0100.08020.96
5.5.260.0200.07720.88
5.5.250.0070.07020.71
5.5.240.0070.07320.26
5.4.450.0070.04019.47
5.4.440.0000.05019.40
5.4.430.0030.04719.54
5.4.420.0100.04019.58
5.4.410.0030.08019.20
5.4.400.0030.04319.19
5.4.390.0170.04719.17
5.4.380.0100.07319.27
5.4.370.0070.07319.28
5.4.360.0100.04719.15
5.4.350.0070.08319.01
5.4.340.0100.07318.98
5.4.320.0030.08319.14
5.4.310.0000.05319.09
5.4.300.0070.04018.94
5.4.290.0070.05719.20
5.4.280.0030.04318.85
5.4.270.0070.07718.84
5.4.260.0000.05019.24
5.4.250.0130.05318.91
5.4.240.0070.03719.00
5.4.230.0100.07319.14
5.4.220.0100.03719.24
5.4.210.0030.07019.07
5.4.200.0100.07019.20
5.4.190.0070.08319.14
5.4.180.0100.07019.23
5.4.170.0100.03718.84
5.4.160.0070.07318.86
5.4.150.0100.07719.27
5.4.140.0100.05716.29
5.4.130.0000.06716.43
5.4.120.0030.04016.26
5.4.110.0000.04016.45
5.4.100.0000.03716.37
5.4.90.0000.03716.64
5.4.80.0000.03716.39
5.4.70.0070.03016.38
5.4.60.0000.03716.36
5.4.50.0000.04016.46
5.4.40.0030.03716.36
5.4.30.0030.03316.44
5.4.20.0000.03716.46
5.4.10.0070.03016.46
5.4.00.0000.03715.77
5.3.290.0130.06714.66
5.3.280.0070.04314.54
5.3.270.0130.05314.64
5.3.260.0070.04314.52
5.3.250.0100.04314.66
5.3.240.0130.06714.77
5.3.230.0000.04314.62
5.3.220.0070.03314.57
5.3.210.0070.03314.48
5.3.200.0030.03714.57
5.3.190.0030.03714.64
5.3.180.0100.03014.57
5.3.170.0030.03714.72
5.3.160.0070.04014.55
5.3.150.0100.03014.57
5.3.140.0030.03714.56
5.3.130.0070.03314.58
5.3.120.0070.04014.46
5.3.110.0070.03314.70
5.3.100.0000.04014.06
5.3.90.0030.03714.05
5.3.80.0070.03014.03
5.3.70.0030.04013.91
5.3.60.0030.03713.93
5.3.50.0030.03313.98
5.3.40.0000.03713.84
5.3.30.0000.03713.92
5.3.20.0000.03713.77
5.3.10.0030.03313.68
5.3.00.0070.03713.79
5.2.170.0030.02711.15
5.2.160.0030.02711.12
5.2.150.0000.03011.31
5.2.140.0030.02711.16
5.2.130.0030.03011.18
5.2.120.0070.02311.11
5.2.110.0000.03011.11
5.2.100.0030.02711.11
5.2.90.0100.02311.05
5.2.80.0030.02711.24
5.2.70.0000.03011.24
5.2.60.0000.03011.05
5.2.50.0030.02710.98
5.2.40.0000.03011.05
5.2.30.0000.03010.93
5.2.20.0000.03010.95
5.2.10.0030.02710.93
5.2.00.0030.02710.64
5.1.60.0030.02310.15
5.1.50.0000.02710.02
5.1.40.0000.0239.98
5.1.30.0030.02310.37
5.1.20.0070.02010.40
5.1.10.0070.02710.14
5.1.00.0070.02010.07
5.0.50.0000.0308.55
5.0.40.0000.0238.55
5.0.30.0030.0278.55
5.0.20.0030.0438.55
5.0.10.0030.0278.55
5.0.00.0070.0438.55
4.4.90.0030.0178.55
4.4.80.0000.0138.55
4.4.70.0000.0178.55
4.4.60.0070.0108.55
4.4.50.0000.0138.55
4.4.40.0000.0238.55
4.4.30.0000.0178.55
4.4.20.0030.0178.55
4.4.10.0000.0238.55
4.4.00.0000.0338.55
4.3.110.0000.0178.55
4.3.100.0070.0178.55
4.3.90.0030.0208.55
4.3.80.0030.0238.55
4.3.70.0000.0208.55
4.3.60.0000.0178.55
4.3.50.0000.0178.55
4.3.40.0000.0408.55
4.3.30.0000.0208.55
4.3.20.0000.0178.55
4.3.10.0000.0338.55
4.3.00.0030.0338.55

preferences:
48.42 ms | 400 KiB | 5 Q