3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array("type"=>"fruit", "price"=>3.50), array("type"=>"milk", "price"=>2.90), array("type"=>"pork", "price"=>5.43), ); $inventory = $data; $time = microtime(true); array_multisort(array_column($inventory, 'price'), SORT_DESC, $inventory); echo microtime(true)-$time; $new = []; $time = microtime(true); foreach($data as $row){ $new[$row['type']] = $row; } ksort($new); echo microtime(true)-$time; print_r($inventory); print_r($new);

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)
7.4.10.0070.01116.32
7.4.00.0070.00716.49
7.3.130.0100.01016.26
7.3.120.0040.00716.33
7.3.110.0090.00616.53
7.3.100.0090.00316.41
7.3.90.0030.00816.23
7.3.80.0040.01116.18
7.3.70.0100.00716.40
7.3.60.0040.01416.23
7.3.50.0000.01116.27
7.3.40.0060.00916.46
7.3.30.0060.00916.33
7.3.20.0030.01218.10
7.3.10.0130.00318.06
7.3.00.0040.01418.06
7.2.260.0110.01016.74
7.2.250.0140.00716.66
7.2.240.0070.00716.52
7.2.230.0070.00716.80
7.2.220.0110.00416.44
7.2.210.0080.00416.64
7.2.200.0110.00716.46
7.2.190.0100.00316.68
7.2.180.0060.00916.66
7.2.170.0110.00416.45
7.2.160.0060.00816.69
7.2.150.0000.01518.52
7.2.140.0070.00418.38
7.2.130.0130.00318.52
7.2.120.0070.00718.50
7.2.110.0060.00618.29
7.2.100.0040.01118.39
7.2.90.0060.00618.35
7.2.80.0110.00718.47
7.2.70.0110.01118.46
7.2.60.0090.00917.51
7.2.50.0000.01818.40
7.2.40.0070.01118.41
7.2.30.0060.00918.33
7.2.20.0080.00818.36
7.2.10.0070.01018.34
7.2.00.0060.01118.97
7.1.330.0070.00717.59
7.1.320.0040.00817.54
7.1.310.0060.00317.60
7.1.300.0120.00317.38
7.1.290.0100.00317.45
7.1.280.0030.01317.21
7.1.270.0090.00617.45
7.1.260.0030.00817.39
7.1.250.0030.00617.37
7.1.240.0070.01017.34
7.1.230.0030.00917.24
7.1.220.0040.01117.36
7.1.210.0070.00717.44
7.1.200.0070.00717.29
7.1.190.0070.01117.34
7.1.180.0000.01217.25
7.1.170.0070.00717.48
7.1.160.0140.00317.28
7.1.150.0140.00417.13
7.1.140.0060.01317.23
7.1.130.0060.00917.15
7.1.120.0060.01017.39
7.1.110.0090.00617.34
7.1.100.0030.00917.59
7.1.90.0060.00917.41
7.1.80.0060.00817.44
7.1.70.0030.00817.19
7.1.60.0270.00725.35
7.1.50.0300.00725.26
7.1.40.0530.01525.16
7.1.30.0220.01425.09
7.1.20.0230.01125.06
7.1.10.0200.00815.98
7.1.00.0280.00516.10
7.0.330.0030.01216.98
7.0.320.0060.01017.03
7.0.310.0030.01216.95
7.0.300.0100.00317.01
7.0.290.0030.00617.01
7.0.280.0090.00617.11
7.0.270.0030.01017.01
7.0.260.0000.01017.18
7.0.250.0070.00717.19
7.0.240.0000.01617.04
7.0.230.0080.00817.06
7.0.220.0070.00717.20
7.0.210.0080.00317.05
7.0.200.0170.01016.07
7.0.190.0150.01415.87
7.0.180.0180.01315.80
7.0.170.0150.01315.78
7.0.160.0180.01015.82
7.0.150.0250.00815.80
7.0.140.0280.00815.69
7.0.130.0040.01115.89
7.0.120.0140.01015.87
7.0.110.0200.00715.87
7.0.100.0210.00515.77
7.0.90.0140.00915.86
7.0.80.0170.00815.84
7.0.70.0100.00815.82
7.0.60.0250.00815.68
7.0.50.0170.01215.92
7.0.40.0130.01214.97
7.0.30.0130.01115.07
7.0.20.0130.00814.77
7.0.10.0170.01014.88
7.0.00.0130.01014.77
5.6.400.0080.00816.07
5.6.390.0150.00316.22
5.6.380.0030.01316.06
5.6.370.0040.01116.21
5.6.360.0030.01315.96
5.6.350.0060.00916.09
5.6.340.0060.00916.36
5.6.330.0070.00316.14
5.6.320.0060.00615.89
5.6.310.0040.00716.07
5.6.300.0060.00615.88
5.6.290.0000.01116.11
5.6.280.0030.00915.80
5.6.270.0030.01115.77
5.6.260.0060.00616.05
5.6.250.0030.01315.77
5.6.240.0040.00816.10
5.6.230.0000.01316.03
5.6.220.0030.01416.09
5.6.210.0040.00715.96
5.6.200.0100.00716.03
5.6.190.0090.00316.02
5.6.180.0060.00915.90
5.6.170.0030.00716.06
5.6.160.0110.00715.76
5.6.150.0030.00716.07
5.6.140.0030.01216.16
5.6.130.0100.00715.79
5.6.120.0030.01416.16
5.6.110.0100.00616.06
5.6.100.0030.01415.95
5.6.90.0030.01015.78
5.6.80.0070.01015.83
5.6.70.0060.01015.87
5.6.60.0040.01115.96
5.6.50.0100.00315.83
5.6.40.0000.01315.80
5.6.30.0120.00315.82
5.6.20.0090.00315.96
5.6.10.0030.00915.82
5.6.00.0030.00715.86

preferences:
36.11 ms | 401 KiB | 5 Q