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 > 10) return 0; 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.60.0150.00316.88
8.3.50.0220.00517.29
8.3.40.0100.00718.61
8.3.30.0070.00718.83
8.3.20.0000.00818.95
8.3.10.0090.00018.77
8.3.00.0030.00619.50
8.2.180.0090.00618.52
8.2.170.0090.00622.96
8.2.160.0160.00018.95
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00720.70
8.2.110.0060.00320.29
8.2.100.0080.00417.72
8.2.90.0000.00817.75
8.2.80.0040.00418.91
8.2.70.0030.00517.75
8.2.60.0080.00017.75
8.2.50.0040.00418.04
8.2.40.0040.00419.88
8.2.30.0080.00317.79
8.2.20.0030.00717.79
8.2.10.0040.00417.78
8.2.00.0040.00417.78
8.1.280.0040.01125.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00023.84
8.1.230.0040.00820.78
8.1.220.0090.00018.69
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0050.00317.62
8.1.160.0000.00719.00
8.1.150.0070.00018.63
8.1.140.0000.00717.39
8.1.130.0070.00017.77
8.1.120.0040.00417.46
8.1.110.0000.00817.43
8.1.100.0000.00817.38
8.1.90.0070.00017.50
8.1.80.0040.00417.42
8.1.70.0040.00417.32
8.1.60.0040.00417.44
8.1.50.0040.00417.50
8.1.40.0040.00417.53
8.1.30.0090.00017.59
8.1.20.0000.00817.55
8.1.10.0000.00817.50
8.1.00.0000.00917.43
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.57
8.0.270.0000.00717.27
8.0.260.0030.00316.76
8.0.250.0050.00317.04
8.0.240.0040.00417.00
8.0.230.0040.00417.02
8.0.220.0030.00316.85
8.0.210.0000.00716.96
8.0.200.0030.00316.98
8.0.190.0050.00316.91
8.0.180.0000.00716.99
8.0.170.0060.00316.89
8.0.160.0040.00416.91
8.0.150.0030.00616.90
8.0.140.0080.00016.97
8.0.130.0000.00513.38
8.0.120.0050.00616.81
8.0.110.0000.00817.06
8.0.100.0080.00017.05
8.0.90.0080.00016.78
8.0.80.0090.01216.95
8.0.70.0040.00416.75
8.0.60.0000.00816.85
8.0.50.0040.00416.94
8.0.30.0140.00316.95
8.0.20.0110.00917.02
8.0.10.0000.00717.11
8.0.00.0130.01516.86
7.4.330.0000.00513.00
7.4.320.0060.00016.37
7.4.300.0030.00316.62
7.4.290.0000.00716.50
7.4.280.0060.00316.50
7.4.270.0060.00316.61
7.4.260.0050.00013.39
7.4.250.0030.00516.51
7.4.240.0070.00016.51
7.4.230.0040.00416.41
7.4.220.0060.01216.57
7.4.210.0100.01316.59
7.4.200.0040.00416.61
7.4.190.0000.00716.72
7.4.160.0090.00616.48
7.4.150.0140.00416.64
7.4.140.0100.01016.46
7.4.130.0060.01716.47
7.4.120.0160.00316.55
7.4.110.0120.00616.53
7.4.100.0090.00916.45
7.4.90.0070.01616.47
7.4.80.0100.01019.39
7.4.70.0130.00316.39
7.4.60.0040.01216.47
7.4.50.0120.00016.47
7.4.40.0090.00316.63
7.4.30.0070.01016.42
7.4.00.0040.00414.79
7.3.330.0000.00613.50
7.3.320.0030.00313.40
7.3.310.0000.00716.46
7.3.300.0030.00316.44
7.3.290.0060.00916.41
7.3.280.0140.00516.41
7.3.270.0100.00616.44
7.3.260.0000.02316.45
7.3.250.0120.00916.42
7.3.240.0110.00616.38
7.3.230.0100.00716.40
7.3.210.0090.00916.60
7.3.200.0030.01316.59
7.3.190.0150.00616.59
7.3.180.0120.00316.52
7.3.170.0050.01016.53
7.3.160.0060.00916.63
7.3.120.0060.01214.95
7.3.10.0070.00716.71
7.3.00.0070.00916.63
7.2.330.0090.00916.57
7.2.320.0040.01416.80
7.2.310.0150.00916.76
7.2.300.0090.00916.73
7.2.290.0080.00816.79
7.2.130.0040.01316.72
7.2.120.0040.01116.88
7.2.110.0050.00916.72
7.2.100.0080.00616.68
7.2.90.0110.00616.78
7.2.80.0060.00816.54
7.2.70.0070.00717.04
7.2.60.0110.00416.80
7.2.50.0070.00716.96
7.2.40.0070.00816.84
7.2.30.0050.01016.97
7.2.20.0090.00816.58
7.2.10.0050.01116.62
7.2.00.0060.00917.81
7.1.250.0060.00815.73
7.1.240.0090.00615.61
7.1.230.0060.00615.38
7.1.220.0000.01115.39
7.1.210.0000.01115.42
7.1.200.0090.00615.54
7.1.190.0070.01115.75
7.1.180.0200.00315.40
7.1.170.0100.00315.56
7.1.160.0100.00615.63
7.1.150.0030.01415.61
7.1.140.0070.01115.68
7.1.130.0130.00315.58
7.1.120.0100.00715.51
7.1.110.0060.00615.74
7.1.100.0040.00916.95
7.1.90.0060.01315.58
7.1.80.0120.00615.39
7.1.70.0050.00616.40
7.1.60.0120.00917.36
7.1.50.0110.00616.26
7.1.40.0110.00715.55
7.1.30.0080.00415.68
7.1.20.0120.00315.61
7.1.10.0110.00015.64
7.1.00.0050.02218.99
7.0.330.0100.00714.72
7.0.320.0080.00815.32
7.0.310.0040.00815.30
7.0.300.0110.00715.03
7.0.290.0070.01115.30
7.0.280.0100.00315.18
7.0.270.0130.00315.36
7.0.260.0120.00615.29
7.0.250.0070.00715.27
7.0.240.0130.00315.33
7.0.230.0070.00715.35
7.0.220.0090.00315.18
7.0.210.0040.01115.27
7.0.200.0110.00316.05
7.0.190.0070.01115.18
7.0.180.0090.00615.04
7.0.170.0060.00615.13
7.0.160.0120.00615.35
7.0.150.0120.00315.24
7.0.140.0080.03618.59
7.0.130.0060.00615.21
7.0.120.0080.03318.71
7.0.110.0130.02517.62
7.0.100.0200.04017.51
7.0.90.0300.03517.64
7.0.80.0060.03717.32
7.0.70.0080.03717.52
7.0.60.0080.04517.63
7.0.50.0150.02717.64
7.0.40.0070.02816.43
7.0.30.0080.03516.50
7.0.20.0060.02416.46
7.0.10.0030.02216.47
7.0.00.0050.01816.44
5.6.380.0060.00314.79
5.6.370.0000.01114.21
5.6.360.0060.00914.61
5.6.350.0080.00414.75
5.6.340.0060.00914.44
5.6.330.0000.01614.27
5.6.320.0090.00614.46
5.6.310.0050.00914.77
5.6.300.0030.01214.16
5.6.290.0080.00814.28
5.6.280.0030.04117.58
5.6.270.0030.00614.47
5.6.260.0040.04517.56
5.6.250.0080.02917.32
5.6.240.0080.02217.37
5.6.230.0120.01717.37
5.6.220.0020.02917.27
5.6.210.0030.04417.53
5.6.200.0130.03717.55
5.6.190.0050.02417.45
5.6.180.0070.02517.67
5.6.170.0060.02117.37
5.6.160.0060.02217.23
5.6.150.0100.01817.28
5.6.140.0070.02317.55
5.6.130.0020.02617.45
5.6.120.0100.01817.41
5.6.110.0090.02217.18
5.6.100.0030.02117.29
5.6.90.0090.01817.48
5.6.80.0000.02217.00
5.6.70.0050.01817.05
5.6.60.0030.02216.98
5.6.50.0050.02617.01
5.6.40.0080.01617.04
5.6.30.0070.02017.08
5.6.20.0100.01516.99
5.6.10.0030.02117.13
5.6.00.0020.02217.11
5.5.380.0080.01814.44
5.5.370.0100.01814.59
5.5.360.0090.03214.46
5.5.350.0040.02514.42
5.5.340.0050.04514.72
5.5.330.0080.03514.55
5.5.320.0040.03414.80
5.5.310.0090.02214.83
5.5.300.0070.01814.68
5.5.290.0020.02514.83
5.5.280.0070.01814.58
5.5.270.0040.02014.66
5.5.260.0060.02114.69
5.5.250.0040.02414.44
5.5.240.0100.01514.25
5.5.230.0080.01814.06
5.5.220.0060.01814.35
5.5.210.0080.01914.46
5.5.200.0050.02014.21
5.5.190.0080.02214.26
5.5.180.0020.02414.13
5.5.170.0140.00011.32
5.5.160.0050.02114.15
5.5.150.0070.01714.25
5.5.140.0040.02214.37
5.5.130.0080.01914.38
5.5.120.0030.02014.42
5.5.110.0070.02814.22
5.5.100.0070.02014.08
5.5.90.0020.02114.12
5.5.80.0090.02914.20
5.5.70.0020.02214.14
5.5.60.0050.03414.12
5.5.50.0020.02214.22
5.5.40.0030.02114.26
5.5.30.0060.03314.12
5.5.20.0080.02214.31
5.5.10.0070.04114.38
5.5.00.0180.03714.24
5.4.450.0030.02215.32
5.4.440.0090.02115.23
5.4.430.0090.01515.59
5.4.420.0060.01815.18
5.4.410.0060.02015.05
5.4.400.0050.01715.25
5.4.390.0070.01915.14
5.4.380.0040.02114.96
5.4.370.0070.01815.13
5.4.360.0080.01714.91
5.4.350.0070.01715.21
5.4.340.0070.01415.15
5.4.330.0070.00210.91
5.4.320.0100.01815.03
5.4.310.0030.01915.08
5.4.300.0060.01615.08
5.4.290.0050.01814.97
5.4.280.0020.02115.03
5.4.270.0070.01714.89
5.4.260.0070.01814.90
5.4.250.0060.03614.90
5.4.240.0140.03814.92
5.4.230.0020.03814.97
5.4.220.0120.01715.23
5.4.210.0060.02115.16
5.4.200.0090.02415.22
5.4.190.0100.02014.95
5.4.180.0090.03015.03
5.4.170.0080.03115.04
5.4.160.0130.02815.17
5.4.150.0060.03215.12
5.4.140.0080.02013.74
5.4.130.0060.01913.70
5.4.120.0060.02513.83
5.4.110.0040.02813.83
5.4.100.0090.03713.75
5.4.90.0050.03513.63
5.4.80.0050.02113.72
5.4.70.0060.02113.84
5.4.60.0140.01813.61
5.4.50.0050.04113.72
5.4.40.0040.03613.68
5.4.30.0020.03613.92
5.4.20.0070.03813.86
5.4.10.0050.02013.75
5.4.00.0040.03113.39
5.3.290.0060.01612.80
5.3.280.0050.03312.81
5.3.270.0060.03912.77
5.3.260.0080.03612.73
5.3.250.0080.02412.87
5.3.240.0080.01712.80
5.3.230.0020.02212.82
5.3.220.0120.01712.79
5.3.210.0130.01612.75
5.3.200.0070.02712.71
5.3.190.0060.02212.74
5.3.180.0120.02712.71
5.3.170.0100.02212.84
5.3.160.0020.02812.71
5.3.150.0010.03912.74
5.3.140.0100.03512.80
5.3.130.0020.04112.79
5.3.120.0050.03212.79
5.3.110.0050.03512.70
5.3.100.0070.03512.54
5.3.90.0040.03512.53
5.3.80.0030.03312.44
5.3.70.0050.03512.47
5.3.60.0040.03212.56
5.3.50.0000.02812.49
5.3.40.0090.03612.43
5.3.30.0060.02812.45
5.3.20.0060.02212.30
5.3.10.0020.02212.26
5.3.00.0090.02712.28
5.2.170.0030.01911.05
5.2.160.0030.03211.07
5.2.150.0030.03410.95
5.2.140.0020.02011.06
5.2.130.0030.03911.00
5.2.120.0020.01811.03
5.2.110.0050.01511.00
5.2.100.0050.02810.98
5.2.90.0060.02011.00
5.2.80.0020.02011.04
5.2.70.0030.01710.99
5.2.60.0070.03711.01
5.2.50.0070.03010.96
5.2.40.0070.02010.95
5.2.30.0030.03110.87
5.2.20.0050.01510.93
5.2.10.0070.02110.89
5.2.00.0040.01710.85
5.1.60.0040.01610.45
5.1.50.0060.01610.43
5.1.40.0080.02010.43
5.1.30.0020.01810.63
5.1.20.0040.01510.67
5.1.10.0010.01710.57
5.1.00.0020.01610.52
5.0.50.0100.01210.21
5.0.40.0030.01510.21
5.0.30.0040.01710.21
5.0.20.0020.01210.21
5.0.10.0040.01010.21
5.0.00.0000.01910.21
4.4.90.0030.01710.21
4.4.80.0010.02010.21
4.4.70.0050.01510.21
4.4.60.0030.00910.21
4.4.50.0030.01010.21
4.4.40.0030.02210.21
4.4.30.0020.01310.21
4.4.20.0030.01010.21
4.4.10.0020.00810.21
4.4.00.0030.01810.21
4.3.110.0010.01010.21
4.3.100.0030.00910.21
4.3.90.0040.00910.21
4.3.80.0030.01310.21
4.3.70.0010.01010.21
4.3.60.0040.00710.21
4.3.50.0000.01010.21
4.3.40.0020.01210.21
4.3.30.0030.01510.21
4.3.20.0000.01210.21
4.3.10.0020.00710.21
4.3.00.0020.00710.21

preferences:
45.7 ms | 401 KiB | 5 Q