3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=array( 'ACTION' => 'getsupportdepartments', 'RESULT' => 'success', 'TOTALRESULTS' => 2, 'DEPARTMENTS' => array( 'DEPARTMENT' => array( 'ID' => 2, 'NAME' => 'Sales', 'AWAITINGREPLY' => 5, 'OPENTICKETS' => 5 ), 'DEPARTMENT1' => array( 'ID' => 1, 'NAME' => 'Support', 'AWAITINGREPLY' => 15, 'OPENTICKETS' => 15))); function sortDepts(array &$arr,$sort="desc") { function asc($a,$b) { return $a["AWAITINGREPLY"]-$b["AWAITINGREPLY"]; } function desc($a,$b) { return $b["AWAITINGREPLY"]-$a["AWAITINGREPLY"]; } if($sort=="desc") usort($arr["DEPARTMENTS"],"desc"); else usort($arr["DEPARTMENTS"],"asc"); return $arr; } print_r(sortDepts($arr,"desc")); print_r(sortDepts($arr,"asc"));

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.0060.01217.40
8.3.40.0080.00818.93
8.3.30.0070.00718.73
8.3.20.0040.00418.73
8.3.10.0030.00618.81
8.3.00.0140.00719.25
8.2.180.0070.01325.92
8.2.170.0140.00019.08
8.2.160.0110.00422.96
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0070.00019.89
8.2.110.0060.00320.39
8.2.100.0080.00417.84
8.2.90.0060.00317.75
8.2.80.0080.00018.78
8.2.70.0080.00018.05
8.2.60.0040.00418.22
8.2.50.0030.00618.10
8.2.40.0030.00521.13
8.2.30.0000.00719.29
8.2.20.0030.00717.73
8.2.10.0000.00717.79
8.2.00.0040.00417.62
8.1.280.0070.01025.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00320.71
8.1.230.0000.01120.85
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0030.00617.38
8.1.180.0040.00418.96
8.1.170.0050.00218.43
8.1.160.0020.00519.01
8.1.150.0050.00318.51
8.1.140.0030.00717.49
8.1.130.0020.00519.11
8.1.120.0040.00417.39
8.1.110.0030.00617.33
8.1.100.0040.00417.43
8.1.90.0040.00417.44
8.1.80.0040.00417.42
8.1.70.0000.00717.45
8.1.60.0090.00017.60
8.1.50.0050.00217.31
8.1.40.0000.00717.53
8.1.30.0000.00817.62
8.1.20.0040.00417.55
8.1.10.0000.00717.49
8.1.00.0090.00017.34
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0000.00718.33
8.0.270.0040.00417.26
8.0.260.0050.00316.89
8.0.250.0040.00416.91
8.0.240.0030.00616.95
8.0.230.0000.00816.90
8.0.220.0000.01116.98
8.0.210.0040.00417.02
8.0.200.0030.00317.03
8.0.190.0080.00016.99
8.0.180.0000.00716.99
8.0.170.0030.00616.88
8.0.160.0000.00816.94
8.0.150.0000.00816.80
8.0.140.0040.00816.91
8.0.130.0030.00313.46
8.0.120.0000.00816.75
8.0.110.0030.00317.02
8.0.100.0070.00016.99
8.0.90.0070.00016.92
8.0.80.0000.02017.01
8.0.70.0040.00416.82
8.0.60.0000.00716.98
8.0.50.0050.00217.01
8.0.30.0040.01117.08
8.0.20.0130.00816.99
8.0.10.0050.00216.94
8.0.00.0060.01416.63
7.4.330.0050.00012.95
7.4.320.0000.00616.49
7.4.300.0000.00616.46
7.4.290.0030.00316.49
7.4.280.0120.00016.31
7.4.270.0070.00016.53
7.4.260.0050.00013.27
7.4.250.0030.00616.59
7.4.240.0050.00216.48
7.4.230.0030.00616.53
7.4.220.0130.01016.42
7.4.210.0040.01116.54
7.4.200.0070.00016.30
7.4.190.0040.00416.41
7.4.160.0100.00516.67
7.4.150.0070.01016.56
7.4.140.0030.01517.86
7.4.130.0090.00916.61
7.4.120.0100.01016.34
7.4.110.0140.00416.59
7.4.100.0090.00916.56
7.4.90.0030.01316.46
7.4.80.0130.00319.39
7.4.70.0150.00316.68
7.4.60.0060.01016.43
7.4.50.0050.00016.52
7.4.40.0040.00816.52
7.4.30.0110.00616.70
7.4.00.0090.00915.03
7.3.330.0030.00313.43
7.3.320.0060.00013.30
7.3.310.0000.00816.47
7.3.300.0000.00716.39
7.3.290.0030.01316.42
7.3.280.0090.00916.35
7.3.270.0180.00016.44
7.3.260.0060.01216.42
7.3.240.0070.01016.48
7.3.230.0110.00816.46
7.3.210.0070.01116.57
7.3.200.0180.00416.43
7.3.190.0170.00016.64
7.3.180.0120.00916.36
7.3.170.0090.00916.57
7.3.160.0120.00416.55
7.3.120.0070.01014.89
7.3.110.0060.01215.11
7.3.100.0110.00414.83
7.3.90.0060.00314.99
7.3.80.0130.00015.06
7.3.70.0040.01114.80
7.3.60.0000.01114.67
7.3.50.0030.00915.06
7.3.40.0090.00614.92
7.3.30.0090.00614.93
7.3.20.0060.00916.81
7.3.10.0090.00016.73
7.3.00.0090.00616.87
7.2.330.0190.00316.68
7.2.320.0090.00916.84
7.2.310.0160.01016.45
7.2.300.0060.01216.82
7.2.290.0060.01316.79
7.2.250.0070.01314.99
7.2.240.0000.02115.26
7.2.230.0040.01114.92
7.2.220.0090.00915.24
7.2.210.0070.00715.31
7.2.200.0060.00615.19
7.2.190.0000.01014.86
7.2.180.0070.00714.99
7.2.170.0030.01315.14
7.2.00.0060.00619.48
7.1.330.0080.00715.95
7.1.320.0000.01715.76
7.1.310.0060.00915.67
7.1.300.0070.00715.79
7.1.290.0110.00415.52
7.1.280.0000.01515.83
7.1.270.0030.01015.57
7.1.260.0100.00315.67
7.1.100.0000.01518.18
7.1.70.0000.00717.14
7.1.60.0090.01619.21
7.1.50.0070.01717.05
7.1.00.0030.07322.43
7.0.200.0030.00616.73
7.0.140.0000.08021.93
7.0.120.0000.07021.94
7.0.60.0170.07319.82
7.0.50.0070.07717.72
7.0.40.0170.07020.27
7.0.30.0370.07320.24
7.0.20.0230.04020.33
7.0.10.0070.04020.18
7.0.00.0130.07720.19
5.6.280.0070.07321.08
5.6.210.0030.06320.72
5.6.200.0030.07318.19
5.6.190.0030.04720.79
5.6.180.0170.04020.33
5.6.170.0230.06320.55
5.6.160.0030.04320.52
5.6.150.0070.03718.23
5.6.140.0070.08018.18
5.6.130.0100.05718.16
5.6.120.0170.08021.00
5.6.110.0100.07320.99
5.6.100.0030.06021.13
5.6.90.0100.07720.98
5.6.80.0000.04320.54
5.5.350.0300.08020.31
5.5.340.0000.06717.99
5.5.330.0070.08320.35
5.5.320.0300.04320.29
5.5.310.0330.08020.29
5.5.300.0130.04717.93
5.5.290.0000.05318.08
5.5.280.0030.04020.75
5.5.270.0070.07720.66
5.5.260.0070.06320.78
5.5.250.0070.09020.60
5.5.240.0030.06720.17
5.4.450.0070.06319.48
5.4.440.0100.07019.47
5.4.430.0030.04319.57
5.4.420.0030.04019.46
5.4.410.0070.04019.17
5.4.400.0130.05019.27
5.4.390.0000.04718.92
5.4.380.0130.03019.09
5.4.370.0170.04318.85
5.4.360.0000.04319.00
5.4.350.0100.04319.12
5.4.340.0070.08019.22
5.4.320.0070.06719.16
5.4.310.0170.06718.85
5.4.300.0070.07719.14
5.4.290.0170.06018.97
5.4.280.0100.07319.24
5.4.270.0070.06019.00
5.4.260.0100.07319.13
5.4.250.0130.06019.21
5.4.240.0030.04019.07
5.4.230.0000.08019.20
5.4.220.0070.06019.19
5.4.210.0000.05319.11
5.4.200.0070.03719.11
5.4.190.0030.04019.23
5.4.180.0030.07719.23
5.4.170.0030.05719.11
5.4.160.0030.04318.85
5.4.150.0030.05018.94
5.4.140.0100.07016.40
5.4.130.0030.04716.55
5.4.120.0100.06716.33
5.4.110.0000.05016.48
5.4.100.0030.04016.36
5.4.90.0030.03716.44
5.4.80.0000.04716.34
5.4.70.0100.05716.46
5.4.60.0070.06016.45
5.4.50.0100.03716.36
5.4.40.0070.03716.45
5.4.30.0030.04016.40
5.4.20.0000.06316.39
5.4.10.0070.06316.36
5.4.00.0100.05715.79
5.3.290.0100.06714.70
5.3.280.0030.05314.62
5.3.270.0070.04314.54
5.3.260.0100.07714.50
5.3.250.0000.07014.61
5.3.240.0030.07314.68
5.3.230.0130.06314.66
5.3.220.0030.05014.46
5.3.210.0070.07714.50
5.3.200.0070.03714.61
5.3.190.0030.05314.59
5.3.180.0070.07014.49
5.3.170.0100.06314.63
5.3.160.0030.03714.60
5.3.150.0070.06314.57
5.3.140.0030.03714.48
5.3.130.0030.04014.47
5.3.120.0070.08014.55
5.3.110.0100.07014.48
5.3.100.0070.04714.19
5.3.90.0030.05013.91
5.3.80.0100.03714.18
5.3.70.0100.06314.08
5.3.60.0070.04314.07
5.3.50.0000.05714.12
5.3.40.0070.08013.98
5.3.30.0030.05013.97
5.3.20.0030.04713.63
5.3.10.0100.05313.61
5.3.00.0000.05013.68
5.2.170.0030.04311.19
5.2.160.0030.03011.08
5.2.150.0000.03711.22
5.2.140.0000.03311.13
5.2.130.0000.03011.07
5.2.120.0000.03311.04
5.2.110.0000.03311.12
5.2.100.0030.04311.17
5.2.90.0000.03311.13
5.2.80.0030.06011.14
5.2.70.0070.04311.26
5.2.60.0070.06311.01
5.2.50.0030.03311.09
5.2.40.0030.05711.16
5.2.30.0030.05711.05
5.2.20.0030.03010.96
5.2.10.0070.03310.86
5.2.00.0000.04310.73
5.1.60.0030.0479.98
5.1.50.0070.0579.94
5.1.40.0070.04710.14
5.1.30.0100.04710.34
5.1.20.0030.03010.38
5.1.10.0030.03310.05
5.1.00.0000.02710.10
5.0.50.0070.0378.68
5.0.40.0070.0408.48
5.0.30.0070.0438.48
5.0.20.0000.0278.48
5.0.10.0070.0408.48
5.0.00.0230.0408.48
4.4.90.0000.0308.47
4.4.80.0070.0308.47
4.4.70.0000.0178.47
4.4.60.0030.0138.47
4.4.50.0030.0308.47
4.4.40.0030.0238.47
4.4.30.0030.0178.48
4.4.20.0000.0178.48
4.4.10.0000.0178.48
4.4.00.0000.0338.48
4.3.110.0070.0308.48
4.3.100.0030.0178.48
4.3.90.0030.0208.48
4.3.80.0000.0538.48
4.3.70.0000.0278.48
4.3.60.0030.0238.48
4.3.50.0070.0338.48
4.3.40.0000.0438.48
4.3.30.0030.0208.48
4.3.20.0030.0238.48
4.3.10.0030.0308.48
4.3.00.0000.0208.48

preferences:
48.15 ms | 401 KiB | 5 Q