3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'title' => array( "ABC", "DEF", "GHI" ), "url" => array( "abc", "def", "ghi" ) ); $keys = array_keys($arr); $count = count($arr[$keys[0]]); For($i=0; $i<$count; $i++){ Foreach($keys as $key){ $res[$i][$key] = $arr[$key][$i]; } } Var_dump($res);

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.00.0100.01220.05
8.4.150.0020.00114.05
8.4.140.0150.00917.70
8.4.130.0100.01117.93
8.4.120.0120.00820.66
8.4.110.0120.00918.79
8.4.100.0110.00717.92
8.4.90.0120.00720.27
8.4.80.0050.00420.57
8.4.70.0130.01019.07
8.4.60.0120.00820.36
8.4.50.0030.00620.23
8.4.40.0180.00717.61
8.4.30.0100.01019.48
8.4.20.0100.00017.59
8.4.10.0000.00917.95
8.3.280.0120.00918.31
8.3.270.0090.01316.68
8.3.260.0140.00816.72
8.3.250.0160.00318.79
8.3.240.0110.00816.56
8.3.230.0050.00516.52
8.3.220.0120.00718.95
8.3.210.0090.00618.42
8.3.200.0030.00616.79
8.3.190.0120.00917.31
8.3.180.0030.00419.07
8.3.170.0060.01217.34
8.3.160.0070.00017.36
8.3.150.0000.00816.59
8.3.140.0160.00416.76
8.3.130.0090.00316.60
8.3.120.0060.00320.59
8.3.110.0030.00520.94
8.3.100.0060.00318.21
8.3.90.0050.00316.85
8.3.80.0030.00618.43
8.3.70.0040.01116.63
8.3.60.0150.00318.33
8.3.50.0100.00517.42
8.3.40.0070.00718.66
8.3.30.0040.01118.66
8.3.20.0040.00421.89
8.3.10.0030.00521.95
8.3.00.0080.00023.54
8.2.290.0130.00617.37
8.2.280.0110.00819.88
8.2.270.0080.00016.84
8.2.260.0040.00417.38
8.2.250.0120.00617.08
8.2.240.0090.00017.20
8.2.230.0030.00622.58
8.2.220.0000.00924.06
8.2.210.0070.00726.77
8.2.200.0090.00018.07
8.2.190.0070.00716.58
8.2.180.0040.01116.75
8.2.170.0110.00422.96
8.2.160.0120.00320.18
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0050.00320.93
8.2.120.0070.00026.35
8.2.110.0060.00322.15
8.2.100.0000.01117.84
8.2.90.0000.00817.84
8.2.80.0080.00019.15
8.2.70.0040.00417.93
8.2.60.0040.00418.09
8.2.50.0000.00818.10
8.2.40.0000.00719.17
8.2.30.0040.00421.01
8.2.20.0070.00018.22
8.2.10.0030.00618.05
8.2.00.0040.00419.31
8.1.330.0110.00916.11
8.1.320.0130.00717.82
8.1.310.0100.00716.73
8.1.300.0080.00018.68
8.1.290.0030.00618.88
8.1.280.0040.01925.92
8.1.270.0060.00618.76
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00820.35
8.1.230.0050.00817.77
8.1.220.0040.00717.76
8.1.210.0040.00418.78
8.1.200.0070.00417.35
8.1.190.0060.00317.35
8.1.180.0060.00318.10
8.1.170.0000.00918.61
8.1.160.0020.00518.95
8.1.150.0060.00319.09
8.1.140.0020.00517.68
8.1.130.0030.00619.04
8.1.120.0030.00517.41
8.1.110.0000.00717.39
8.1.100.0000.00817.46
8.1.90.0050.00217.43
8.1.80.0040.00417.46
8.1.70.0000.00717.35
8.1.60.0000.00717.64
8.1.50.0040.00417.56
8.1.40.0060.00317.38
8.1.30.0030.00517.71
8.1.20.0000.00717.72
8.1.10.0040.00417.58
8.1.00.0050.00317.45
8.0.300.0020.00520.16
8.0.290.0040.00416.63
8.0.280.0040.00418.36
8.0.270.0000.00717.27
8.0.260.0030.00617.23
8.0.250.0030.00316.97
8.0.240.0050.00316.94
8.0.230.0070.00016.85
8.0.220.0070.00016.79
8.0.210.0020.00516.81
8.0.200.0060.00016.89
8.0.190.0000.00716.96
8.0.180.0040.00416.81
8.0.170.0040.00416.91
8.0.160.0000.00816.93
8.0.150.0040.00416.89
8.0.140.0000.00716.86
8.0.130.0030.00313.20
8.0.120.0000.00716.92
8.0.110.0040.00416.75
8.0.100.0040.00416.81
8.0.90.0040.00416.95
8.0.80.0000.01416.86
8.0.70.0000.00716.94
8.0.60.0000.00717.01
8.0.50.0070.00016.88
8.0.30.0080.00917.06
8.0.20.0110.00817.40
8.0.10.0000.00716.94
8.0.00.0120.00816.88
7.4.330.0030.00316.91
7.4.320.0030.00316.50
7.4.300.0040.00416.61
7.4.290.0000.00716.61
7.4.280.0030.00616.58
7.4.270.0000.00716.52
7.4.260.0030.00516.55
7.4.250.0070.00016.58
7.4.240.0000.00816.50
7.4.230.0000.00716.33
7.4.220.0000.00716.35
7.4.210.0110.00516.49
7.4.200.0050.00316.71
7.4.160.0090.00716.55
7.4.140.0100.00817.86
7.4.130.0150.00316.50
7.4.120.0110.00816.45
7.4.110.0100.00716.50
7.4.100.0110.00616.52
7.4.90.0100.00616.48
7.4.80.0120.00619.39
7.4.70.0070.01016.49
7.4.60.0080.00816.64
7.4.50.0070.00316.26
7.4.40.0140.00416.58
7.4.10.0070.01015.20
7.4.00.0110.00614.96
7.3.330.0020.00213.16
7.3.320.0020.00213.03
7.3.310.0070.00016.32
7.3.300.0060.00016.23
7.3.290.0000.00716.24
7.3.280.0080.00816.41
7.3.260.0110.00816.42
7.3.240.0100.00916.51
7.3.230.0140.00716.58
7.3.210.0100.01016.42
7.3.200.0070.01016.34
7.3.190.0080.00816.46
7.3.180.0070.01016.46
7.3.170.0110.01116.34
7.3.160.0060.00916.41
7.3.130.0150.00315.02
7.3.120.0090.00914.88
7.3.110.0050.01314.89
7.3.100.0040.01314.76
7.3.90.0050.00814.75
7.3.80.0050.00914.94
7.3.70.0080.00714.88
7.3.60.0030.00814.83
7.3.50.0080.00614.91
7.3.40.0060.01014.62
7.3.30.0030.00814.97
7.3.20.0080.00516.66
7.3.10.0070.00916.71
7.3.00.0060.00316.33
7.2.330.0080.01116.64
7.2.320.0130.00616.76
7.2.310.0100.01016.38
7.2.300.0100.00716.72
7.2.290.0110.00716.76
7.2.260.0040.01114.93
7.2.250.0070.00914.99
7.2.240.0060.01315.13
7.2.230.0030.01014.88
7.2.220.0080.00915.11
7.2.210.0070.00714.84
7.2.200.0070.00415.04
7.2.190.0120.00515.08
7.2.180.0050.01115.00
7.2.170.0090.00314.96
7.2.160.0050.00914.93
7.2.150.0050.00916.75
7.2.140.0020.01316.92
7.2.130.0060.00716.91
7.2.120.0080.00616.79
7.2.110.0090.00716.98
7.2.100.0040.01416.80
7.2.90.0070.00817.00
7.2.80.0090.00516.98
7.2.70.0050.01117.10
7.2.60.0060.00816.98
7.2.50.0040.00717.09
7.2.40.0230.00617.30
7.2.30.0220.00517.14
7.2.20.0280.01117.24
7.2.10.0330.01117.38
7.2.00.0180.00817.25
7.1.330.0070.00815.94
7.1.320.0030.00615.99
7.1.310.0080.00615.82
7.1.300.0030.00815.61
7.1.290.0040.01115.65
7.1.280.0020.00815.80
7.1.270.0000.01115.82
7.1.260.0100.00315.97
7.1.250.0080.00515.80
7.1.240.0040.00515.82
7.1.230.0030.01215.78
7.1.220.0020.01015.71
7.1.210.0070.01015.90
7.1.200.0050.00515.91
7.1.190.0050.00915.67
7.1.180.0100.00315.78
7.1.170.0090.00315.68
7.1.160.0240.00715.96
7.1.150.0160.00616.22
7.1.140.0180.00816.11
7.1.130.0300.01016.10
7.1.120.0170.00516.03
7.1.110.0140.00815.83
7.1.100.0330.00815.88
7.1.90.0160.01115.94
7.1.80.0170.00815.87
7.1.70.0320.00915.72
7.1.60.0200.01021.77
7.1.50.0320.01021.54
7.1.40.0460.00921.39
7.1.30.0220.00821.51
7.1.20.0270.01121.34
7.1.10.0310.00815.51
7.1.00.0380.00815.47
7.0.330.0070.00515.28
7.0.320.0090.00515.56
7.0.310.0050.00515.36
7.0.300.0080.00315.24
7.0.290.0100.00215.48
7.0.280.0040.00615.27
7.0.270.0070.00715.47
7.0.260.0030.00615.37
7.0.250.0050.01015.34
7.0.240.0060.00815.48
7.0.230.0060.00915.35
7.0.220.0110.00315.54
7.0.210.0050.00915.27
7.0.200.0080.00315.50
7.0.190.0030.01115.29
7.0.180.0100.00115.37
7.0.170.0020.01115.50
7.0.160.0030.01315.40
7.0.150.0060.00715.53
7.0.140.0050.00515.54
7.0.130.0030.01115.32
7.0.120.0070.00715.26
7.0.110.0020.01315.40
7.0.100.0030.01215.33
7.0.90.0070.00715.38
7.0.80.0020.01015.46
7.0.70.0070.00515.36
7.0.60.0090.00515.47
7.0.50.0050.00815.42
7.0.40.0060.00513.64
7.0.30.0070.00813.78
7.0.20.0030.01013.73
7.0.10.0040.00713.68
7.0.00.0050.00813.57
5.6.400.0060.00414.64
5.6.390.0090.00614.32
5.6.380.0070.00614.17
5.6.370.0090.00414.35
5.6.360.0060.00614.44
5.6.350.0080.00614.37
5.6.340.0050.00714.49
5.6.330.0050.01014.49
5.6.320.0110.00514.18
5.6.310.0050.00814.42
5.6.300.0040.01114.41
5.6.290.0050.00714.41
5.6.280.0050.00814.43
5.6.270.0030.01014.32
5.6.260.0040.01214.46
5.6.250.0050.01014.52
5.6.240.0050.00614.52
5.6.230.0050.01014.44
5.6.220.0090.00414.33
5.6.210.0040.00814.37
5.6.200.0110.00314.20
5.6.190.0040.00614.36
5.6.180.0050.00814.35
5.6.170.0030.01214.55
5.6.160.0020.01214.49
5.6.150.0070.00614.26
5.6.140.0070.00414.40
5.6.130.0030.01014.53
5.6.120.0070.00514.67
5.6.110.0050.00814.56
5.6.100.0090.00114.33
5.6.90.0090.00614.41
5.6.80.0100.00514.40
5.6.70.0050.00814.29
5.6.60.0080.00514.58
5.6.50.0070.00714.42
5.6.40.0060.00614.21
5.6.30.0060.00714.22
5.6.20.0050.00814.39
5.6.10.0070.00714.42
5.6.00.0100.00414.23

preferences:
31.84 ms | 403 KiB | 5 Q