3v4l.org

run code in 300+ 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.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.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.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:
50.97 ms | 404 KiB | 6 Q