3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace App\Controllers\Redis; class getArray{ public function sortArray(){ $sortMe = [100, 1, 10, 1000]; function cmp($a, $b) { static $example = [1, 1000, 100, 10]; return array_search($a, $example) - array_search($b, $example); } uasort($sortMe, 'App\Controllers\Redis\cmp'); var_export($sortMe); } }

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.70.0130.00618.42
8.5.60.0100.00816.85
8.5.50.0100.00718.14
8.5.30.0090.00919.36
8.5.20.0120.00619.42
8.5.10.0110.00620.27
8.5.00.0160.00619.98
8.4.210.0090.00619.50
8.4.180.0160.00622.04
8.4.170.0070.00421.88
8.4.160.0150.00823.84
8.4.150.0070.00616.84
8.4.140.0110.00917.29
8.4.130.0100.00617.91
8.4.120.0130.00825.89
8.4.110.0060.00322.68
8.4.100.0060.00218.75
8.4.90.0030.00518.76
8.4.80.0100.00918.71
8.4.70.0090.00618.02
8.4.60.0120.00918.62
8.4.50.0070.00218.66
8.4.40.0100.01019.34
8.4.30.0150.00318.80
8.4.20.0100.00625.94
8.4.10.0030.00623.63
8.3.300.0110.00918.16
8.3.290.0090.01218.35
8.3.280.0110.00918.26
8.3.270.0140.00516.44
8.3.260.0100.00816.50
8.3.250.0130.00518.73
8.3.240.0100.01017.20
8.3.230.0080.01016.38
8.3.220.0100.00718.76
8.3.210.0100.00816.55
8.3.200.0060.00316.34
8.3.190.0070.01316.89
8.3.180.0090.00917.10
8.3.170.0000.00918.86
8.3.160.0070.01017.06
8.3.150.0110.00718.93
8.3.140.0040.00417.29
8.3.130.0030.00618.18
8.3.120.0060.00318.80
8.3.110.0070.00320.94
8.3.100.0030.00616.49
8.3.90.0060.00326.77
8.3.80.0060.00317.97
8.3.70.0070.00716.50
8.3.60.0080.00818.43
8.3.50.0090.00917.88
8.3.40.0070.00720.29
8.3.30.0040.01118.39
8.3.20.0000.00824.18
8.3.10.0080.00024.66
8.3.00.0000.00826.16
8.2.300.0160.01017.77
8.2.290.0090.00920.14
8.2.280.0120.00720.16
8.2.270.0120.00616.96
8.2.260.0060.00316.51
8.2.250.0030.00616.54
8.2.240.0170.00317.00
8.2.230.0060.00322.58
8.2.220.0040.00424.06
8.2.210.0150.00026.77
8.2.200.0030.00616.63
8.2.190.0090.00916.63
8.2.180.0090.00618.18
8.2.170.0150.00018.56
8.2.160.0070.00722.96
8.2.150.0030.00325.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0070.00021.18
8.2.110.0090.00020.53
8.2.100.0060.00320.39
8.1.340.0100.01017.49
8.1.330.0100.00821.75
8.1.320.0100.01015.98
8.1.310.0110.00318.50
8.1.300.0140.00317.82
8.1.290.0060.00330.84
8.1.280.0110.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00022.16
8.1.230.0110.00018.26
7.0.140.0080.00116.69

preferences:
54.98 ms | 856 KiB | 5 Q