3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array('caption'=>array('c one','c two')); $b=array('photos'=>array('photo one','photo two')); Foreach($a['caption'] as $key => $capt){ $new[$key]['caption'] = $capt; $new[$key]['photos'] = $b['photos'][$key]; } Var_dump($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)
8.4.140.0110.01017.34
8.4.130.0130.00617.81
8.4.120.0050.00820.47
8.4.110.0100.01022.64
8.4.100.0140.00618.85
8.4.90.0120.00618.69
8.4.80.0040.00518.82
8.4.70.0110.00918.03
8.4.60.0120.01018.61
8.4.50.0130.00522.76
8.4.40.0060.00319.32
8.4.30.0170.00317.72
8.4.20.0100.01019.36
8.4.10.0070.01019.61
8.3.270.0140.00616.72
8.3.260.0130.00716.55
8.3.250.0120.00718.75
8.3.240.0050.00417.04
8.3.230.0090.01018.88
8.3.220.0120.00919.08
8.3.210.0130.00316.71
8.3.200.0050.00416.86
8.3.190.0100.00918.99
8.3.180.0140.00416.67
8.3.170.0130.00616.96
8.3.160.0070.01116.47
8.3.150.0130.00620.75
8.3.140.0090.00016.61
8.3.130.0040.00418.57
8.3.120.0040.01120.53
8.3.110.0090.00016.55
8.3.100.0080.00024.06
8.3.90.0110.00726.77
8.3.80.0000.00918.56
8.3.70.0180.00016.50
8.3.60.0120.00616.63
8.3.50.0130.00318.50
8.3.40.0120.00318.71
8.3.30.0170.00718.75
8.3.20.0040.00420.16
8.3.10.0040.00423.64
8.3.00.0040.00421.85
8.2.290.0120.00820.69
8.2.280.0140.00521.96
8.2.270.0100.01016.48
8.2.260.0090.00920.83
8.2.250.0060.00318.49
8.2.240.0080.00019.10
8.2.230.0060.00320.94
8.2.220.0060.00337.54
8.2.210.0040.01226.77
8.2.200.0060.00316.63
8.2.190.0120.00916.58
8.2.180.0110.00318.06
8.2.170.0120.00322.96
8.2.160.0070.00719.46
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00722.09
8.2.120.0040.00426.35
8.2.110.0030.00721.03
8.2.100.0110.00017.91
8.2.90.0030.00518.03
8.2.80.0000.00818.34
8.2.70.0040.00417.75
8.2.60.0040.00417.63
8.2.50.0040.00418.10
8.2.40.0050.00321.20
8.2.30.0080.00018.12
8.2.20.0070.00018.13
8.2.10.0030.00518.05
8.2.00.0040.00418.05
8.1.330.0090.00922.03
8.1.320.0100.00816.22
8.1.310.0110.00716.60
8.1.300.0110.00017.93
8.1.290.0040.00430.84
8.1.280.0170.00325.92
8.1.270.0080.00022.11
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00321.06
8.1.230.0110.00022.68
8.1.220.0040.00417.79
8.1.210.0050.00219.10
8.1.200.0050.00317.47
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0060.00318.50
8.1.160.0040.00418.93
8.1.150.0040.00420.10
8.1.140.0000.00719.04
8.1.130.0000.00719.12
8.1.120.0070.00317.49
8.1.110.0040.00417.36
8.1.100.0040.00417.42
8.1.90.0000.00717.36
8.1.80.0000.00817.46
8.1.70.0040.00417.48
8.1.60.0040.00417.55
8.1.50.0060.00317.44
8.1.40.0040.00417.43
8.1.30.0030.00617.64
8.1.20.0030.00617.69
8.1.10.0030.00617.52
8.1.00.0000.00817.33
8.0.300.0040.00419.88
8.0.290.0040.00416.63
8.0.280.0030.00318.40
8.0.270.0000.00716.73
8.0.260.0030.00618.79
8.0.250.0030.00316.92
8.0.240.0040.00416.87
8.0.230.0040.00416.91
8.0.220.0040.00416.92
8.0.210.0030.00316.79
8.0.200.0050.00316.97
8.0.190.0040.00416.85
8.0.180.0080.00016.87
8.0.170.0030.00616.89
8.0.160.0000.00716.79
8.0.150.0000.00816.83
8.0.140.0000.00816.87
8.0.130.0000.00513.27
8.0.120.0050.00316.89
8.0.110.0040.00416.90
8.0.100.0040.00416.72
8.0.90.0050.00216.83
8.0.80.0030.01416.89
8.0.70.0000.00716.87
8.0.60.0030.00516.81
8.0.50.0000.00716.84
8.0.30.0110.00917.22
8.0.20.0100.01017.40
8.0.10.0040.00417.03
8.0.00.0110.01116.51
7.4.330.0000.00715.55
7.4.320.0060.00016.50
7.4.300.0030.00316.59
7.4.290.0090.00016.58
7.4.280.0070.00416.45
7.4.270.0030.00316.59
7.4.260.0000.00716.42
7.4.250.0070.00016.54
7.4.240.0020.00516.59
7.4.230.0070.00016.43
7.4.220.0140.00416.50
7.4.210.0080.00716.49
7.4.200.0000.00716.70
7.4.160.0090.01116.43
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0110.00616.41
7.4.120.0110.01016.58
7.4.110.0070.01016.48
7.4.100.0100.00716.55
7.4.90.0070.01016.64
7.4.80.0130.01119.39
7.4.70.0120.00616.54
7.4.60.0080.00816.64
7.4.50.0030.01016.60
7.4.40.0090.00916.53
7.4.30.0100.00516.43
7.4.00.0030.01015.06
7.3.330.0000.00613.02
7.3.320.0000.00613.11
7.3.310.0000.00716.31
7.3.300.0030.00316.25
7.3.290.0070.00016.29
7.3.280.0040.01216.27
7.3.270.0110.00617.40
7.3.260.0090.00916.48
7.3.250.0140.00816.47
7.3.240.0110.00616.47
7.3.230.0120.00416.30
7.3.210.0140.00716.20
7.3.200.0150.00816.36
7.3.190.0100.00716.31
7.3.180.0090.01216.48
7.3.170.0130.00716.45
7.3.160.0170.00316.38
7.2.330.0070.01016.72
7.2.320.0060.01216.73
7.2.310.0180.00016.42
7.2.300.0030.01616.78
7.2.290.0130.00316.79
7.2.80.0040.00416.72
7.2.60.0170.00016.69
7.2.50.0100.00316.94
7.1.200.0120.00315.77
7.1.110.0510.00816.22
7.1.100.0450.00916.02
7.1.90.0500.01016.03
7.1.80.0570.01016.05
7.1.70.0430.00915.22
7.1.60.0670.01033.40
7.1.50.0700.01132.97
7.1.40.0780.01032.46
7.1.30.0760.01832.55
7.1.20.0640.00732.79
7.1.10.0590.01014.83
7.1.00.0560.01114.92
7.0.250.0520.00815.71
7.0.240.0400.00715.56
7.0.230.0550.00515.76
7.0.220.0500.00915.61
7.0.210.0470.00714.74
7.0.200.0600.00814.95
7.0.190.0590.01214.75
7.0.180.0450.00914.39
7.0.170.0600.01014.55
7.0.160.0640.01014.35
7.0.150.0600.00614.49
7.0.140.0580.00714.40
7.0.130.0560.00914.69
7.0.120.0420.01014.71
7.0.110.0740.00814.52
7.0.100.0410.00914.55
7.0.90.0510.00814.55
7.0.80.0450.01014.53
7.0.70.0600.00814.42
7.0.60.0620.00814.33
7.0.50.0500.00614.54
7.0.40.0700.00914.62
7.0.30.0750.01214.73
7.0.20.0540.00814.66
7.0.10.0560.00814.54
7.0.00.0580.00914.57

preferences:
41.61 ms | 403 KiB | 5 Q