3v4l.org

run code in 300+ PHP versions simultaneously
<?php $customer['address'] = '123 fake st'; $customer['name'] = 'Tim'; $customer['dob'] = '12/08/1986'; $customer['dontSortMe'] = 'this value doesnt need to be sorted'; $order = array('name', 'dob', 'address'); $keys= array_flip($order); uksort($customer, function($a, $b)use($keys){ return $keys[$a] - $keys[$b]; }); print_r($customer);

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.120.0110.01020.46
8.4.110.0100.00622.46
8.4.100.0090.01218.00
8.4.90.0150.00518.84
8.4.80.0070.00417.95
8.4.70.0150.00918.18
8.4.60.0140.00620.67
8.4.50.0130.00817.86
8.4.40.0120.00819.45
8.4.30.0000.02018.58
8.4.20.0060.01322.18
8.4.10.0000.01024.03
8.3.250.0100.00918.79
8.3.240.0100.01016.86
8.3.230.0120.00616.54
8.3.220.0110.00817.06
8.3.210.0110.00716.76
8.3.200.0040.00516.93
8.3.190.0060.00217.21
8.3.180.0080.00618.52
8.3.170.0110.00718.95
8.3.160.0060.01316.86
8.3.150.0000.01517.29
8.3.140.0040.00420.68
8.3.130.0090.00018.66
8.3.120.0190.00020.69
8.3.110.0100.00720.94
8.3.100.0100.01024.06
8.3.90.0110.00426.77
8.3.80.0000.00917.97
8.3.70.0100.01316.75
8.3.60.0140.00318.55
8.3.50.0110.00316.86
8.3.40.0070.00720.34
8.3.30.0110.00418.98
8.3.20.0000.00724.18
8.3.10.0030.00624.66
8.3.00.0040.00426.16
8.2.290.0110.00920.61
8.2.280.0130.00418.78
8.2.270.0150.00417.29
8.2.260.0070.00018.92
8.2.250.0040.00418.49
8.2.240.0080.00018.84
8.2.230.0160.00322.58
8.2.220.0030.00737.54
8.2.210.0140.00726.77
8.2.200.0040.00417.00
8.2.190.0060.00918.66
8.2.180.0090.00618.32
8.2.170.0170.00319.08
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0030.00619.77
8.2.110.0070.00322.25
8.2.100.0000.01118.16
8.2.90.0000.00819.26
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0000.00819.77
8.2.50.0080.00018.07
8.2.40.0000.00918.15
8.2.30.0050.00318.11
8.2.20.0040.00419.20
8.2.10.0030.00817.69
8.2.00.0090.00917.85
8.1.330.0070.00221.86
8.1.320.0150.00416.36
8.1.310.0140.00016.57
8.1.300.0060.00918.29
8.1.290.0040.00430.84
8.1.280.0040.01425.92
8.1.270.0040.00422.19
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00019.15
8.1.230.0040.00720.39
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0040.00417.23
8.1.180.0070.00021.95
8.1.170.0000.00718.75
8.1.160.0070.00018.94
8.1.150.0000.00718.64
8.1.140.0110.00417.45
8.1.130.0120.00317.46
8.1.120.0110.00717.52
8.1.110.0100.00517.58
8.1.100.0120.00317.53
8.1.90.0160.00017.41
8.1.80.0160.00017.53
8.1.70.0100.00717.54
8.1.60.0120.00417.65
8.1.50.0140.00317.52
8.1.40.0160.00417.52
8.1.30.0120.00617.54
8.1.20.0090.00317.64
8.1.10.0130.00017.60
8.1.00.0090.00617.47
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.37
8.0.270.0060.00216.95
8.0.260.0090.00916.88
8.0.250.0130.00316.82
8.0.240.0050.01116.86
8.0.230.0070.01016.94
8.0.220.0030.01016.82
8.0.210.0000.01116.87
8.0.200.0100.00416.95
8.0.190.0120.00416.93
8.0.180.0130.00316.83
8.0.170.0100.00716.85
8.0.160.0080.00816.99
8.0.150.0120.00216.93
8.0.140.0120.00616.87
8.0.130.0160.00016.80
8.0.120.0120.00416.75
8.0.110.0120.00916.77
8.0.100.0140.00316.84
8.0.90.0060.00916.84
8.0.80.0070.00716.79
8.0.70.0060.00916.91
8.0.60.0080.00816.83
8.0.50.0100.00516.82
8.0.30.0130.00516.86
8.0.20.0170.00016.94
8.0.10.0120.00617.06

preferences:
27.31 ms | 403 KiB | 5 Q