3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['bananna', 'cranberry', 'apple']; $fn = function ($a, $b) { if(strlen($a) > strlen($b)) { return 1; } return 0; }; usort($array, $fn); var_dump( $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.4.20.0060.00318.68
8.4.10.0040.00417.47
8.3.140.0070.01116.32
8.3.130.0060.00318.34
8.3.120.0100.01018.77
8.3.110.0050.00316.50
8.3.100.0030.00624.06
8.3.90.0120.00626.77
8.3.80.0030.00616.70
8.3.70.0090.00616.88
8.3.60.0150.00018.52
8.3.50.0100.00718.18
8.3.40.0120.00418.71
8.3.30.0120.00318.56
8.3.20.0070.00321.80
8.3.10.0000.00920.75
8.3.00.0040.00421.77
8.2.260.0000.00816.59
8.2.250.0060.00316.43
8.2.240.0030.00616.87
8.2.230.0040.00420.94
8.2.220.0090.00637.54
8.2.210.0160.00326.77
8.2.200.0060.00318.16
8.2.190.0120.00316.58
8.2.180.0070.01416.50
8.2.170.0070.01622.96
8.2.160.0170.00020.72
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00020.52
8.2.110.0070.00321.99
8.2.100.0090.00317.84
8.2.90.0100.00017.63
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00817.38
8.2.50.0040.00417.55
8.2.40.0030.00521.02
8.2.30.0040.00420.49
8.2.20.0000.00718.11
8.2.10.0000.00718.82
8.2.00.0000.00819.90
8.1.310.0090.00918.45
8.1.300.0140.00418.38
8.1.290.0060.00330.84
8.1.280.0150.00625.92
8.1.270.0050.00220.75
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00319.22
8.1.230.0000.01119.23
8.1.220.0040.00417.78
8.1.210.0000.00918.77
8.1.200.0040.00417.23
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0030.00518.63
8.1.160.0020.00518.80
8.1.150.0030.00518.90
8.1.140.0000.00820.28
8.1.130.0040.00720.26
8.1.120.0000.00717.46
8.1.110.0050.00517.30
8.1.100.0050.00317.36
8.1.90.0070.00017.45
8.1.80.0070.00017.43
8.1.70.0030.00717.45
8.1.60.0040.00417.56
8.1.50.0000.00917.49
8.1.40.0000.00817.50
8.1.30.0060.00317.50
8.1.20.0040.00417.66
8.1.10.0040.00417.43
8.1.00.0080.00017.42
8.0.300.0050.00219.77
8.0.290.0040.00416.75
8.0.280.0070.00018.25
8.0.270.0080.00016.70
8.0.260.0030.00318.34
8.0.250.0000.00716.96
8.0.240.0040.00417.03
8.0.230.0040.00416.84
8.0.220.0000.00816.95
8.0.210.0000.00716.78
8.0.200.0040.00416.89
8.0.190.0000.00716.94
8.0.180.0040.00416.90
8.0.170.0090.00016.95
8.0.160.0000.00716.93
8.0.150.0080.00316.84
8.0.140.0070.00016.85
8.0.130.0000.00513.29
8.0.120.0040.00416.78
8.0.110.0040.00416.92
8.0.100.0070.00016.90
8.0.90.0000.00716.98
8.0.80.0070.00716.85
8.0.70.0040.00416.89
8.0.60.0000.00716.73
8.0.50.0030.00516.93
8.0.30.0130.00916.97
8.0.20.0130.00616.95
8.0.10.0070.00016.96
8.0.00.0120.00716.72
7.4.330.0000.00415.55
7.4.320.0030.00316.56
7.4.300.0060.00016.57
7.4.290.0040.00416.49
7.4.280.0000.00816.59
7.4.270.0070.00016.49
7.4.260.0040.00416.45
7.4.250.0040.00416.49
7.4.240.0030.00316.63
7.4.230.0030.00316.67
7.4.220.0050.00216.71
7.4.210.0060.01116.58
7.4.200.0030.00316.50
7.4.160.0110.00916.43
7.4.140.0060.01117.86
7.4.130.0110.00516.43
7.4.120.0070.01116.53
7.4.110.0140.00316.43
7.4.100.0160.00716.38
7.4.90.0120.00616.39
7.4.80.0110.01419.39
7.4.70.0120.00616.56
7.4.60.0030.01316.77
7.4.50.0090.00616.24
7.4.40.0110.00316.25
7.4.00.0080.00515.07
7.3.330.0060.00313.38
7.3.320.0000.00613.32
7.3.310.0030.00316.33
7.3.300.0070.00016.18
7.3.290.0030.01016.31
7.3.280.0120.00416.29
7.3.260.0110.00816.55
7.3.240.0090.01116.40
7.3.230.0100.00716.38
7.3.210.0120.00916.50
7.3.200.0110.00616.32
7.3.190.0100.00716.36
7.3.180.0070.00716.65
7.3.170.0080.01116.31
7.3.160.0050.01116.66
7.3.120.0070.01014.86
7.3.110.0040.01414.56
7.3.100.0040.01414.66
7.3.90.0070.00714.80
7.3.80.0030.01414.70
7.3.70.0070.00714.80
7.3.60.0100.00014.62
7.3.50.0090.00514.61
7.3.40.0050.00814.39
7.3.30.0060.00614.71
7.3.20.0100.00516.57
7.3.10.0100.00416.42
7.3.00.0050.00916.71
7.2.330.0130.00916.72
7.2.320.0130.01016.57
7.2.310.0090.00916.36
7.2.300.0110.00716.70
7.2.290.0030.02116.67
7.2.250.0070.01114.93
7.2.240.0070.01014.93
7.2.230.0070.00715.02
7.2.220.0120.00314.86
7.2.210.0100.00614.96
7.2.200.0040.00814.85
7.2.190.0100.00314.71
7.2.180.0090.00615.11
7.2.170.0080.00414.72
7.2.160.0080.00514.72
7.2.150.0070.00516.92
7.2.140.0080.01116.55
7.2.130.0130.00716.68
7.2.120.0090.00816.84
7.2.110.0100.00916.86
7.2.100.0080.00617.07
7.2.90.0040.00916.82
7.2.80.0040.00916.85
7.2.70.0030.01016.84
7.2.60.0080.01216.65
7.2.50.0030.00916.65
7.2.40.0090.00316.54
7.2.30.0130.00216.80
7.2.20.0100.00816.96
7.2.10.0060.00816.86
7.2.00.0070.00916.58
7.1.330.0050.00915.60
7.1.320.0060.00615.41
7.1.310.0060.00315.69
7.1.300.0070.01015.58
7.1.290.0060.00315.65
7.1.280.0100.00415.66
7.1.270.0050.00715.51
7.1.260.0070.00715.69
7.1.250.0080.00815.71
7.1.240.0110.00415.76
7.1.230.0000.00815.34
7.1.220.0070.00715.79
7.1.210.0000.01015.34
7.1.200.0000.01215.78
7.1.190.0070.00715.48
7.1.180.0060.01015.25
7.1.170.0000.00915.33
7.1.160.0030.00615.02
7.1.150.0030.00615.21
7.1.140.0110.00415.44
7.1.130.0080.00815.68
7.1.120.0030.01015.40
7.1.110.0050.00315.58
7.1.100.0060.00315.49
7.1.90.0030.00715.68
7.1.80.0100.00315.84
7.1.70.0100.00615.87
7.1.60.0000.00915.34
7.1.50.0100.00315.60
7.1.40.0050.00315.53
7.1.30.0060.00315.74
7.1.20.0030.00915.59
7.1.10.0090.00615.71
7.1.00.0050.00815.56

preferences:
68.35 ms | 403 KiB | 5 Q