3v4l.org

run code in 300+ PHP versions simultaneously
<?php $structure = [ "a", "b" => [ "b1", "b2" => [ "b21", "b22" ] ] ]; $data = ['A', 'B1', 'B21', 'B22']; $filled = 0; array_walk_recursive ($structure, function (&$val) { global $filled; global $data; $val = array( $val => $data[ $filled ] ); $filled++; }); print_r( $structure );

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.60.0040.01118.56
8.3.50.0140.00521.99
8.3.40.0140.00718.85
8.3.30.0060.00918.86
8.3.20.0000.00821.90
8.3.10.0070.00020.20
8.3.00.0000.00920.58
8.2.180.0180.00018.16
8.2.170.0120.00322.96
8.2.160.0070.00719.43
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00026.16
8.2.110.0030.00620.97
8.2.100.0090.00319.57
8.2.90.0000.00817.84
8.2.80.0040.00417.97
8.2.70.0030.00518.05
8.2.60.0060.00318.22
8.2.50.0000.00818.10
8.2.40.0040.00419.48
8.2.30.0040.00419.18
8.2.20.0050.00318.00
8.2.10.0040.00419.22
8.2.00.0040.00419.22
8.1.280.0110.00625.92
8.1.270.0090.00022.41
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00619.27
8.1.230.0060.00620.87
8.1.220.0030.00617.79
8.1.210.0000.00818.77
8.1.200.0040.00717.25
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0030.00618.51
8.1.160.0070.00018.81
8.1.150.0000.00718.80
8.1.140.0020.00520.90
8.1.130.0000.00717.33
8.1.120.0000.00717.30
8.1.110.0050.00317.46
8.1.100.0050.00317.47
8.1.90.0040.00417.47
8.1.80.0070.00017.36
8.1.70.0030.00617.52
8.1.60.0070.00017.44
8.1.50.0000.00817.49
8.1.40.0090.00017.57
8.1.30.0090.00317.70
8.1.20.0050.00317.69
8.1.10.0040.00417.58
8.1.00.0000.00717.51
8.0.300.0040.00421.57
8.0.290.0000.00816.75
8.0.280.0030.00518.25
8.0.270.0030.00317.11
8.0.260.0030.00316.79
8.0.250.0080.00016.86
8.0.240.0070.00016.76
8.0.230.0000.00716.94
8.0.220.0000.00716.81
8.0.210.0030.00316.69
8.0.200.0060.00016.94
8.0.190.0000.00817.00
8.0.180.0070.00016.93
8.0.170.0040.00416.91
8.0.160.0080.00016.86
8.0.150.0040.00416.89
8.0.140.0040.00416.83
8.0.130.0030.00313.31
8.0.120.0040.00416.88
8.0.110.0050.00216.77
8.0.100.0000.00816.89
8.0.90.0040.00416.80
8.0.80.0120.00316.84
8.0.70.0040.00416.90
8.0.60.0040.00416.69
8.0.50.0000.00817.00
8.0.30.0030.01217.15
8.0.20.0080.01117.11
8.0.10.0080.00016.88
8.0.00.0130.00616.71
7.4.330.0000.00515.55
7.4.320.0030.00316.59
7.4.300.0000.00616.61
7.4.290.0000.00816.50
7.4.280.0000.00716.53
7.4.270.0000.00716.52
7.4.260.0030.00516.51
7.4.250.0000.00716.58
7.4.240.0030.00316.56
7.4.230.0060.00016.69
7.4.220.0070.00016.48
7.4.210.0070.00716.56
7.4.200.0000.00716.63
7.4.130.0060.01316.57
7.4.120.0110.01316.48
7.4.110.0030.01716.62
7.4.100.0100.00616.57
7.4.90.0110.00616.46
7.4.80.0150.00319.39
7.4.70.0080.01216.54
7.4.60.0140.00316.59
7.4.50.0030.01416.41
7.4.40.0030.01616.52
7.4.00.0130.00314.82
7.3.330.0060.00013.25
7.3.320.0050.00013.30
7.3.310.0040.00416.12
7.3.300.0040.00416.36
7.3.290.0040.00416.25
7.3.280.0030.01216.34
7.3.260.0080.01016.44
7.3.240.0140.00516.41
7.3.230.0090.01016.54
7.3.210.0090.00616.23
7.3.200.0060.01016.31
7.3.190.0110.00516.64
7.3.180.0030.01316.56
7.3.170.0050.01116.66
7.3.160.0030.01216.45
7.3.70.0110.00314.66
7.3.60.0070.01014.78
7.3.50.0050.01014.73
7.3.40.0040.01214.80
7.3.30.0100.00614.91
7.3.20.0140.00214.70
7.3.10.0060.01614.54
7.3.00.0130.00314.89
7.2.330.0210.00016.50
7.2.320.0130.00316.59
7.2.310.0000.01616.32
7.2.300.0120.00916.39
7.2.290.0070.01016.48
7.2.200.0080.00815.04
7.2.190.0060.01414.93
7.2.180.0050.01115.00
7.2.170.0110.00714.84
7.2.160.0030.01315.03
7.2.150.0050.01814.93
7.2.140.0120.01015.09
7.2.130.0160.00314.96
7.2.120.0150.00614.77
7.2.110.0060.01014.70
7.2.100.1160.00314.76
7.2.90.0110.01114.99
7.2.80.0130.01015.14
7.2.70.0100.00714.95
7.2.60.0200.00014.89
7.2.50.0160.00814.69
7.2.40.0130.00614.67
7.2.30.0170.00314.96
7.2.20.0140.00214.89
7.2.10.0130.00614.85
7.2.00.0090.01214.77
7.1.300.0150.00613.97
7.1.290.0120.00613.82
7.1.280.0090.01213.82
7.1.270.0070.00714.00
7.1.260.0190.00014.08
7.1.250.0100.00713.89

preferences:
32.65 ms | 401 KiB | 5 Q