3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = [ [ 'first_name' => 'GM', 'middle_name' => null, 'last_name' => 'Akbari', 'guest_booking' =>[ [ 'booking_number' => 20008683, 'ship_code' => 'OST', 'room_no' => 'A0073', 'start_time' => 1438214400, 'end_time' => 1483142400, 'is_checked_in' => true, ] ], 'guest_account' => [ [ 'account_id' => 20009503, 'status_id' => 2, 'account_limit' => 0, 'allow_charges' => true, ] ] ], [ 'first_name' => 'Alex ', 'middle_name' => null, 'last_name' => 'Marvi', 'guest_booking' => [ [ 'booking_number' => 10000013, 'room_no' => 'B0092', 'is_checked_in' => true, ], ], 'guest_account' => [ [ 'account_id' => 10000500, 'account_limit' => 300, 'allow_charges' => true, ], ], ], ]; function sortMyArray(array &$array, $target_key) { $columnValues = []; array_walk_recursive( $array, function($v, $k, $key) use (&$columnValues) { if ($k === $key) { $columnValues[] = $v; } }, $target_key ); array_multisort($columnValues, $array); } sortMyArray($data, 'account_id'); var_export($data);

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.0060.00218.58
8.5.60.0090.00816.79
8.5.50.0100.00718.59
8.5.30.0100.00719.48
8.5.20.0120.00719.61
8.5.10.0050.00222.09
8.5.00.0120.01019.98
8.4.210.0130.00919.73
8.4.180.0140.00822.07
8.4.170.0100.00721.88
8.4.160.0120.01022.23
8.4.150.0060.00716.87
8.4.140.0140.01217.34
8.4.130.0140.00717.49
8.4.120.0100.00622.25
8.4.110.0130.00822.19
8.4.100.0110.00917.73
8.4.90.0140.00817.74
8.4.80.0120.00617.92
8.4.70.0100.01117.64
8.4.60.0120.00818.58
8.4.50.0160.00417.70
8.4.40.0060.01319.61
8.4.30.0140.00318.85
8.4.20.0060.00319.84
8.4.10.0100.01023.86
8.3.300.0100.01118.43
8.3.290.0090.01020.95
8.3.280.0080.01218.57
8.3.270.0130.00716.61
8.3.260.0110.00916.48
8.3.250.0090.00918.89
8.3.240.0090.01017.28
8.3.230.0100.01016.55
8.3.220.0120.00717.36
8.3.210.0140.00816.78
8.3.200.0040.00416.63
8.3.190.0100.01017.37
8.3.180.0120.00716.61
8.3.170.0050.00517.03
8.3.160.0110.00718.98
8.3.150.0090.00617.32
8.3.140.0040.01120.69
8.3.130.0000.01918.48
8.3.120.0070.00320.66
8.3.110.0100.00620.94
8.3.100.0060.00316.82
8.3.90.0040.00426.77
8.3.80.0030.00618.30
8.3.70.0150.00416.58
8.3.60.0150.00016.60
8.3.50.0160.00618.15
8.3.40.0000.01420.18
8.3.30.0060.00918.89
8.3.20.0030.00524.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0100.01120.25
8.2.290.0100.01220.46
8.2.280.0080.01022.70
8.2.270.0030.01316.86
8.2.260.0030.00616.58
8.2.250.0040.00416.89
8.2.240.0060.00318.93
8.2.230.0040.00422.58
8.2.220.0000.00824.06
8.2.210.0000.00826.77
8.2.200.0080.00018.29
8.2.190.0150.00016.58
8.2.180.0140.00325.92
8.2.170.0070.01318.92
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0040.01124.66
8.2.130.0050.00326.16
8.2.120.0000.00819.64
8.2.110.0130.00319.19
8.2.100.0160.00618.21
8.2.90.0120.00718.16
8.2.80.0140.00518.21
8.2.70.0150.00418.25
8.2.60.0170.00218.39
8.2.50.0160.00418.27
8.2.40.0090.00618.95
8.2.30.0160.00418.29
8.2.20.0160.00318.90
8.2.10.0110.00518.13
8.2.00.0100.00518.53
8.1.340.0110.00820.11
8.1.330.0150.00420.10
8.1.320.0090.01015.96
8.1.310.0070.01017.00
8.1.300.0090.00017.86
8.1.290.0030.00630.84
8.1.280.0100.01025.92
8.1.270.0050.00224.66
8.1.260.0120.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00420.80
8.1.230.0120.00518.34
8.1.220.0140.00418.09
8.1.210.0130.00518.61
8.1.200.0080.01217.96
8.1.190.0180.00017.90
8.1.180.0150.00418.27
8.1.170.0130.00518.53
8.1.160.0170.00218.71
8.1.150.0150.00318.49
8.1.140.0110.00517.80
8.1.130.0140.00217.79
8.1.120.0130.00517.86
8.1.110.0140.00517.88
8.1.100.0140.00417.83
8.1.90.0170.00217.80
8.1.80.0150.00317.85
8.1.70.0120.00617.83
8.1.60.0160.00517.91
8.1.50.0180.00317.78
8.1.40.0130.00617.94
8.1.30.0120.00717.87
8.1.20.0130.00617.93
8.1.10.0140.00317.83
8.1.00.0140.00417.81
8.0.300.0150.00218.61
8.0.290.0140.00317.60
8.0.280.0140.00418.40
8.0.270.0110.00617.87
8.0.260.0120.00217.44
8.0.250.0120.00717.42
8.0.240.0100.00817.48
8.0.230.0170.00317.45
8.0.220.0160.00217.35
8.0.210.0110.00817.39
8.0.200.0110.00717.40
8.0.190.0130.00617.45
8.0.180.0140.00417.44
8.0.170.0130.00617.48
8.0.160.0100.00817.44
8.0.150.0110.00717.41
8.0.140.0140.00417.38
8.0.130.0140.00317.39
8.0.120.0160.00317.38
8.0.110.0150.00317.38
8.0.100.0150.00317.34
8.0.90.0150.00217.45
8.0.80.0130.00417.38
8.0.70.0150.00217.34
8.0.60.0120.00417.38
8.0.50.0120.00517.38
8.0.30.0130.00417.36
8.0.20.0130.00317.47
8.0.10.0060.01117.49
7.4.330.0130.00316.65
7.4.320.0180.00317.12
7.4.300.0130.00717.11
7.4.290.0160.00317.18
7.4.280.0170.00317.21
7.4.270.0150.00517.15
7.4.260.0160.00317.16
7.4.250.0170.00317.12
7.4.240.0120.00517.14
7.4.230.0120.00517.12
7.4.220.0140.00417.17
7.4.210.0140.00317.14
7.4.200.0150.00217.12
7.4.190.0130.00317.11
7.4.180.0150.00517.17
7.4.160.0120.00517.23
7.4.150.0120.00416.91
7.4.140.0100.00617.08
7.4.130.0150.00317.14
7.4.120.0150.00217.09
7.4.110.0150.00317.04
7.4.100.0100.00617.11
7.4.90.0150.00217.04
7.4.80.0130.00417.15
7.4.70.0110.00617.06
7.4.60.0110.00617.06
7.4.50.0090.00717.01
7.4.40.0120.00517.09
7.4.30.0110.00517.03
7.4.20.0130.00417.02
7.4.10.0130.00316.99
7.4.00.0120.00417.02

preferences:
46.59 ms | 1474 KiB | 5 Q