3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['green', '', 'red', '', 'blue', '', 'yellow', '', 'purple', '', 'white', '', 'black']; usort($array, fn($a, $b) => !$a <=> !$b); var_export($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.5.30.0070.01017.97
8.5.20.0090.01119.56
8.5.10.0110.00716.89
8.5.00.0080.01319.79
8.4.180.0130.00820.36
8.4.170.0090.01220.34
8.4.160.0110.01120.63
8.4.150.0090.00316.71
8.4.140.0180.00417.59
8.4.130.0150.00617.55
8.4.120.0060.00520.42
8.4.110.0090.01020.39
8.4.100.0130.00717.64
8.4.90.0090.01120.45
8.4.80.0040.00520.60
8.4.70.0130.00719.07
8.4.60.0090.01120.43
8.4.50.0090.01319.23
8.4.40.0340.01917.47
8.4.30.0460.00317.38
8.4.20.0400.00817.47
8.4.10.0450.00317.51
8.3.300.0100.00920.82
8.3.290.0060.00420.81
8.3.280.0060.00516.25
8.3.270.0130.00716.91
8.3.260.0100.00916.78
8.3.250.0130.00817.21
8.3.240.0150.00416.64
8.3.230.0120.00716.67
8.3.220.0120.00618.80
8.3.210.0070.00216.80
8.3.200.0040.00516.68
8.3.190.0110.00818.43
8.3.180.0150.00318.34
8.3.170.0300.01516.50
8.3.160.0370.00916.46
8.3.150.0360.01116.47
8.3.140.0400.00616.42
8.3.130.0340.00616.70
8.3.120.0310.01316.73
8.3.110.0260.01516.36
8.3.100.0410.00616.44
8.3.90.0350.01516.65
8.3.80.0410.00416.40
8.3.70.0400.00316.50
8.3.60.0390.00716.64
8.3.50.0370.00316.49
8.3.40.0330.00717.26
8.3.30.0240.01217.45
8.3.20.0290.01417.36
8.3.10.0310.00317.36
8.3.00.0200.00717.31
8.2.300.0140.00720.24
8.2.290.0070.01216.97
8.2.280.0130.00718.41
8.2.270.0350.00616.22
8.2.260.0330.00416.27
8.2.250.0350.00616.61
8.2.240.0220.01616.40
8.2.230.0370.00316.46
8.2.220.0340.01116.54
8.2.210.0340.00316.24
8.2.200.0280.01016.23
8.2.190.0290.00916.44
8.2.180.0330.00316.49
8.2.170.0320.01517.51
8.2.160.0360.00017.71
8.2.150.0330.00917.53
8.2.140.0360.00417.43
8.2.130.0340.00617.38
8.2.120.0400.00017.50
8.2.110.0300.01217.56
8.2.100.0390.01017.40
8.2.90.0290.01017.53
8.2.80.0280.00617.51
8.2.70.0360.00317.36
8.2.60.0320.00617.34
8.2.50.0240.01517.34
8.2.40.0280.00817.59
8.2.30.0320.00417.24
8.2.20.0220.01517.54
8.2.10.0160.02017.58
8.2.00.0250.01117.38
8.1.340.0120.00920.07
8.1.320.0090.00917.92

preferences:
41.89 ms | 853 KiB | 5 Q