3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($firstValue, $secondValue) { if ($firstValue > $secondValue) { return -1; } if ($firstValue < $secondValue) { return 1; } return 0; } $array = array('a', 'b', 'a', 'b', 'c'); usort($array, 'test'); echo 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).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0120.00318.41
8.3.50.0110.00716.38
8.3.40.0110.00718.48
8.3.30.0120.00418.40
8.3.20.0060.00321.89
8.3.10.0080.00021.91
8.3.00.0080.00019.17
8.2.180.0170.00318.16
8.2.170.0150.00722.96
8.2.160.0030.01022.11
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0090.00626.16
8.2.120.0080.00019.48
8.2.110.0030.00721.11
8.2.100.0110.00017.78
8.2.90.0000.00818.09
8.2.80.0000.00818.22
8.2.70.0040.00417.50
8.2.60.0060.00317.79
8.2.50.0040.00418.05
8.2.40.0080.00019.89
8.2.30.0030.00517.93
8.2.20.0000.00717.95
8.2.10.0000.00718.16
8.2.00.0000.00818.22
8.1.280.0170.00325.92
8.1.270.0080.00023.87
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0000.00823.96
8.1.230.0090.00320.97
8.1.220.0040.00417.76
8.1.210.0060.00318.77
8.1.200.0040.00417.48
8.1.190.0000.00817.35
8.1.180.0000.00819.01
8.1.170.0050.00318.50
8.1.160.0050.00319.05
8.1.150.0040.00418.94
8.1.140.0040.00419.57
8.1.130.0000.00718.84
8.1.120.0050.00517.48
8.1.110.0040.00417.47
8.1.100.0030.00517.43
8.1.90.0040.00717.44
8.1.80.0000.00817.37
8.1.70.0070.00017.48
8.1.60.0040.00417.50
8.1.50.0040.00417.51
8.1.40.0000.00817.43
8.1.30.0050.00317.66
8.1.20.0040.00417.65
8.1.10.0080.00017.52
8.1.00.0050.00217.46
8.0.300.0040.00419.81
8.0.290.0000.00716.75
8.0.280.0000.00818.49
8.0.270.0050.00318.58
8.0.260.0070.00016.89
8.0.250.0030.00317.07
8.0.240.0050.00217.02
8.0.230.0030.00317.02
8.0.220.0050.00316.95
8.0.210.0030.00616.90
8.0.200.0030.00316.87
8.0.190.0050.00316.98
8.0.180.0040.00716.80
8.0.170.0000.00716.77
8.0.160.0060.00316.89
8.0.150.0030.00316.87
8.0.140.0000.00716.85
8.0.130.0030.00313.33
8.0.120.0080.00016.81
8.0.110.0070.00016.93
8.0.100.0000.00716.87
8.0.90.0040.00416.79
8.0.80.0060.01116.90
8.0.70.0040.00416.86
8.0.60.0080.00016.88
8.0.50.0070.00016.84
8.0.30.0070.01217.13
8.0.20.0120.00817.40
8.0.10.0000.00716.91
8.0.00.0060.01116.70
7.4.330.0030.00215.55
7.4.320.0060.00016.50
7.4.300.0030.00316.53
7.4.290.0080.00316.61
7.4.280.0040.00416.58
7.4.270.0050.00516.59
7.4.260.0000.00513.26
7.4.250.0000.00716.57
7.4.240.0040.00416.63
7.4.230.0030.00316.54
7.4.220.0060.01316.48
7.4.210.0040.01116.52
7.4.200.0000.00816.61
7.4.160.0080.00816.42
7.4.150.0180.00017.40
7.4.140.0120.00717.86
7.4.130.0190.00616.56
7.4.120.0100.00816.46
7.4.110.0110.00416.65
7.4.100.0090.01316.59
7.4.90.0100.00716.39
7.4.80.0140.00419.39
7.4.70.0080.00816.51
7.4.60.0080.00816.62
7.4.50.0040.01116.54
7.4.40.0090.00916.54
7.4.30.0060.01216.61
7.4.00.0030.01314.61
7.3.330.0030.00313.23
7.3.320.0060.00013.07
7.3.310.0070.00016.27
7.3.300.0040.00416.11
7.3.290.0110.00416.26
7.3.280.0100.00816.22
7.3.270.0030.01317.40
7.3.260.0170.00516.48
7.3.250.0070.01116.31
7.3.240.0050.01216.30
7.3.230.0110.00916.41
7.3.210.0100.00616.52
7.3.200.0060.01216.39
7.3.190.0110.00416.25
7.3.180.0060.01716.46
7.3.170.0100.00716.36
7.3.160.0130.00316.27
7.2.330.0190.00416.30
7.2.320.0120.00616.49
7.2.310.0060.01116.50
7.2.300.0070.01016.47
7.2.290.0130.00316.74
7.2.60.0070.01016.80
7.1.200.0130.00015.74
7.1.70.0070.00316.84
7.1.60.1830.02033.24
7.1.50.1700.01733.02
7.1.40.1300.01032.68
7.1.30.1000.01032.59
7.1.20.1170.01732.75
7.1.10.1000.01014.89
7.1.00.1130.01714.93
7.0.200.1030.00314.60
7.0.190.1000.01714.73
7.0.180.0630.01714.50
7.0.170.0930.00314.59
7.0.160.0670.01314.30
7.0.150.0800.00714.41
7.0.140.0830.01714.34
7.0.130.0700.01714.83
7.0.120.0870.01714.43
7.0.110.0900.01314.64
7.0.100.0830.01314.52
7.0.90.1200.02314.53
7.0.80.0770.01014.44
7.0.70.0870.01014.51
7.0.60.0870.01314.16
7.0.50.0700.01314.60
7.0.40.0830.01714.69
7.0.30.0930.00714.71
7.0.20.0670.01714.78
7.0.10.0800.01014.66
7.0.00.0630.01014.66

preferences:
69.64 ms | 400 KiB | 5 Q