3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'schedules' => [ 'monday' => 1, 'tuesday' => 1, 'wednesday' => 1, 'thursday' => 1, 'friday' => 1, 'saturday' => 0, 'sunday' => 1, ] ] ]; $newStart = 'thursday'; foreach ($array as &$entry) { $position = array_search( $newStart, array_keys($entry['schedules']) ); if ($position) { $entry['schedules'] += array_splice( $entry['schedules'], 0, $position ); } } var_export($array);

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.0070.00220.61
8.4.110.0030.00618.96
8.4.100.0150.00617.68
8.4.90.0120.00917.57
8.4.80.0060.00317.73
8.4.70.0090.00617.98
8.4.60.0090.01418.78
8.4.50.0090.00718.50
8.4.40.0070.01019.37
8.4.30.0100.01018.52
8.4.20.0160.00318.96
8.4.10.0060.00317.32
8.3.250.0100.00918.90
8.3.240.0060.00416.77
8.3.230.0120.00816.53
8.3.220.0140.00516.55
8.3.210.0080.01016.52
8.3.200.0060.00316.50
8.3.190.0060.00319.26
8.3.180.0060.00216.66
8.3.170.0060.01218.86
8.3.160.0120.00618.94
8.3.150.0130.00719.14
8.3.140.0150.00316.43
8.3.130.0040.01118.14
8.3.120.0080.00020.87
8.3.110.0130.00718.59
8.3.100.0100.00018.42
8.3.90.0100.00026.77
8.3.80.0030.00619.36
8.3.70.0120.00316.75
8.3.60.0060.00916.63
8.3.50.0070.00716.30
8.3.40.0070.00718.96
8.3.30.0090.00618.45
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0140.00518.92
8.2.280.0080.00720.00
8.2.270.0180.00017.36
8.2.260.0040.00418.46
8.2.250.0040.01116.90
8.2.240.0060.00316.93
8.2.230.0040.00420.94
8.2.220.0080.00024.06
8.2.210.0110.00726.77
8.2.200.0040.00418.88
8.2.190.0120.00918.16
8.2.180.0040.01125.92
8.2.170.0160.00018.91
8.2.160.0060.00622.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00726.35
8.2.110.0100.00020.50
8.2.100.0060.00617.91
8.2.90.0090.00017.88
8.2.80.0030.00518.78
8.2.70.0080.00017.63
8.2.60.0000.00718.03
8.2.50.0080.00018.05
8.2.40.0000.00918.34
8.2.30.0040.00418.16
8.2.20.0000.00818.00
8.2.10.0040.00419.28
8.2.00.0070.00019.26
8.1.330.0070.01216.59
8.1.320.0120.00715.85
8.1.310.0090.00918.59
8.1.300.0060.00316.34
8.1.290.0040.00430.84
8.1.280.0140.00325.92
8.1.270.0050.00322.13
8.1.260.0100.00026.35
8.1.250.0000.00828.09
8.1.240.0170.00021.98
8.1.230.0090.00317.76
8.1.220.0070.00017.79
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0080.00017.23
8.1.180.0030.00518.10
8.1.170.0040.00418.61
8.1.160.0030.00319.01
8.1.150.0000.00718.88
8.1.140.0000.00718.73
8.1.130.0040.00220.00
8.1.120.0030.00717.50
8.1.110.0070.00017.37
8.1.100.0030.00617.32
8.1.90.0040.00417.43
8.1.80.0000.00817.44
8.1.70.0030.00317.45
8.1.60.0030.00517.46
8.1.50.0040.00417.40
8.1.40.0000.00817.41
8.1.30.0060.00317.64
8.1.20.0040.00417.55
8.1.10.0040.00417.46
8.1.00.0060.00317.33
8.0.300.0040.00418.77
8.0.290.0050.00316.63
8.0.280.0000.00718.41
8.0.270.0000.00718.01
8.0.260.0000.00618.55
8.0.250.0060.00017.00
8.0.240.0050.00317.07
8.0.230.0050.00217.02
8.0.220.0030.00316.90
8.0.210.0000.00716.92
8.0.200.0030.00317.02
8.0.190.0040.00416.99
8.0.180.0000.00716.96
8.0.170.0030.00516.95
8.0.160.0000.00716.89
8.0.150.0000.00716.95
8.0.140.0040.00716.81
8.0.130.0050.00013.31
8.0.120.0040.00416.96
8.0.110.0020.00516.91
8.0.100.0050.00216.90
8.0.90.0020.00516.86
8.0.80.0080.00416.88
8.0.70.0020.00516.98
8.0.60.0060.00116.81
8.0.50.0050.00216.87
8.0.30.0040.00816.97
8.0.20.0050.00517.03
8.0.10.0040.00617.02
8.0.00.0010.01017.03
7.4.330.0000.00615.55
7.4.320.0030.00316.51
7.4.300.0000.00716.48
7.4.290.0080.00016.52
7.4.280.0050.00316.48
7.4.270.0030.00316.68
7.4.260.0060.00013.26
7.4.250.0030.00316.45
7.4.240.0040.00316.50
7.4.230.0050.00316.49
7.4.220.0050.00216.53
7.4.210.0040.00716.64
7.4.200.0020.00516.61
7.4.190.0000.00616.30
7.4.180.0030.00316.63
7.4.160.0020.00816.61
7.4.150.0030.00716.48
7.4.140.0060.00516.44
7.4.130.0080.00516.38
7.4.120.0050.00916.42
7.4.110.0050.00616.60
7.4.100.0080.00316.43
7.4.90.0030.00816.44
7.4.80.0090.00116.35
7.4.70.0020.01116.40
7.4.60.0050.00816.27
7.4.50.0060.00816.49
7.4.40.0060.00616.25
7.4.30.0100.00316.32
7.4.20.0040.00716.47
7.4.10.0050.00616.49
7.4.00.0020.00916.46
7.3.330.0070.00016.33
7.3.320.0020.00213.24
7.3.310.0030.00316.39
7.3.300.0000.00716.27
7.3.290.0080.00816.33
7.3.280.0070.00316.32
7.3.270.0050.00516.32
7.3.260.0020.00916.27
7.3.250.0060.00616.21
7.3.240.0020.00816.31
7.3.230.0030.00716.32
7.3.220.0050.00516.28
7.3.210.0040.00616.22
7.3.200.0070.00316.23
7.3.190.0030.00916.29
7.3.180.0040.00916.22
7.3.170.0100.00316.26
7.3.160.0060.00616.24
7.3.150.0040.00916.19
7.3.140.0040.00616.28
7.3.130.0080.00516.23
7.3.120.0070.00516.23
7.3.110.0080.00216.17
7.3.100.0070.00516.20
7.3.90.0060.00516.48
7.3.80.0060.00716.21
7.3.70.0050.00516.27
7.3.60.0030.00616.44
7.3.50.0050.00516.43
7.3.40.0030.00816.47
7.3.30.0050.00716.43
7.3.20.0060.00516.47
7.3.10.0060.00516.34
7.3.00.0080.00616.32
5.5.290.0140.00017.37
5.4.450.0060.00317.37
5.4.340.0110.00217.37
5.4.190.0080.00417.37
5.4.100.0110.00217.37
5.4.70.0120.00017.37
5.4.20.0030.00517.37
5.4.00.0040.00317.37
5.3.290.0060.00317.37
5.3.280.0040.00417.37
5.3.200.0040.00417.37
5.3.00.0030.00817.37
5.2.70.0080.00317.37
5.2.10.0040.00317.37
4.4.00.0030.00017.37
4.3.60.0020.00117.37
4.3.00.0030.00017.37

preferences:
28.26 ms | 403 KiB | 5 Q