3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tables = [ [ 'key1' => 'value1', 'key2' => 'value2' ], [ 'key3' => 'value3', 'key4' => 'value4' ], ]; echo 'List Each' . \PHP_EOL; foreach ($tables as $table_array) { list(,$table) = each($table_array); var_dump($table); } echo \PHP_EOL; echo 'Array Shift'. \PHP_EOL; foreach ($tables as $table_array) { $table = array_shift($table_array); var_dump($table); } echo \PHP_EOL; echo 'Current Next' . \PHP_EOL; foreach ($tables as $table_array) { $table = current($table_array); var_dump($table); next($table_array); } echo \PHP_EOL; echo 'Current Next w/key' . \PHP_EOL; foreach ($tables as $table_array) { $key = key($table_array); $table = current($table_array); var_dump($key, $table); next($table_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.3.70.0100.00616.75
8.3.60.0160.00618.55
8.3.50.0060.00917.96
8.3.40.0120.00318.61
8.3.30.0110.00418.84
8.3.20.0040.00418.91
8.3.10.0050.00323.45
8.3.00.0030.00620.58
8.2.190.0070.01416.63
8.2.180.0170.00318.29
8.2.170.0070.01419.09
8.2.160.0130.00322.96
8.2.150.0060.01224.18
8.2.140.0070.01124.66
8.2.130.0040.00819.89
8.2.120.0070.00426.35
8.2.110.0060.00321.05
8.2.100.0130.00017.84
8.2.90.0040.00417.84
8.2.80.0040.00419.11
8.2.70.0080.00317.50
8.2.60.0040.00417.85
8.2.50.0000.00818.10
8.2.40.0040.00419.46
8.2.30.0030.00519.32
8.2.20.0000.00817.98
8.2.10.0080.00018.14
8.2.00.0040.00417.83
8.1.280.0140.00325.92
8.1.270.0000.00918.86
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0080.00022.15
8.1.230.0070.00420.96
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0050.00317.48
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0040.00418.55
8.1.160.0000.00718.81
8.1.150.0040.00418.87
8.1.140.0040.00422.13
8.1.130.0000.00720.21
8.1.120.0040.00417.49
8.1.110.0040.00517.51
8.1.100.0040.00417.48
8.1.90.0050.00317.43
8.1.80.0100.00017.52
8.1.70.0000.00717.36
8.1.60.0000.00817.48
8.1.50.0040.00417.52
8.1.40.0040.00417.55
8.1.30.0080.00017.68
8.1.20.0040.00417.66
8.1.10.0000.00817.57
8.1.00.0040.00417.40
8.0.300.0070.00020.08
8.0.290.0040.00416.75
8.0.280.0070.00018.38
8.0.270.0040.00417.30
8.0.260.0030.00318.39
8.0.250.0080.00016.93
8.0.240.0030.00616.99
8.0.230.0070.00016.94
8.0.220.0040.00416.96
8.0.210.0040.00417.02
8.0.200.0000.00916.98
8.0.190.0040.00416.92
8.0.180.0000.00716.97
8.0.170.0080.00016.91
8.0.160.0030.00616.88
8.0.150.0040.00416.79
8.0.140.0030.00516.94
8.0.130.0000.00613.40
8.0.120.0000.00716.96
8.0.110.0040.00416.83
8.0.100.0050.00217.07
8.0.90.0070.00016.84
8.0.80.0090.00916.96
8.0.70.0030.00617.02
8.0.60.0070.00017.00
8.0.50.0050.00316.95
8.0.30.0090.00717.21
8.0.20.0110.00817.40
8.0.10.0040.00417.00
8.0.00.0080.01316.89
7.4.330.0030.00315.55
7.4.320.0000.00716.51
7.4.300.0000.00616.63
7.4.290.0070.00016.52
7.4.280.0020.00516.63
7.4.270.0000.00716.41
7.4.260.0030.00616.63
7.4.250.0050.00216.56
7.4.240.0040.00416.51
7.4.230.0040.00416.45
7.4.220.0000.00816.64
7.4.210.0110.00716.66
7.4.200.0030.00616.71
7.4.160.0090.00716.65
7.4.140.0110.00817.86
7.4.130.0060.01216.58
7.4.120.0090.01016.50
7.4.110.0080.01416.59
7.4.100.0040.01216.63
7.4.90.0110.00716.59
7.4.80.0110.01619.39
7.4.70.0080.00816.36
7.4.60.0110.00616.55
7.4.50.0070.01016.38
7.4.40.0030.01316.55
7.4.00.0090.00615.16
7.3.330.0060.00013.33
7.3.320.0050.00013.33
7.3.310.0070.00016.39
7.3.300.0000.00716.40
7.3.290.0030.00316.34
7.3.280.0050.01016.35
7.3.260.0100.00916.49
7.3.240.0120.00516.44
7.3.230.0080.00916.34
7.3.210.0100.01016.55
7.3.200.0060.01616.56
7.3.190.0120.00916.45
7.3.180.0150.00316.43
7.3.170.0070.01016.47
7.3.160.0080.00816.62
7.2.330.0060.01316.62
7.2.320.0140.01016.64
7.2.310.0120.00816.78
7.2.300.0000.01616.68
7.2.290.0120.00616.68
7.2.110.2970.00314.10
7.2.100.3390.00314.10
7.2.90.2510.01314.14
7.2.80.2650.00914.19
7.2.70.0980.01314.81
7.2.60.0350.00614.74
7.2.50.0100.01014.63
7.2.40.0180.00014.61
7.2.30.1530.00314.48
7.2.20.0760.01014.54
7.2.10.0370.00914.31
7.2.00.3720.00614.99
7.1.230.3040.00713.79
7.1.220.3890.01013.53
7.1.210.2840.00313.41
7.1.200.3050.00713.48
7.1.190.3220.00913.41
7.1.180.0110.00713.37
7.1.170.2070.00013.18
7.1.160.3440.00013.29
7.1.150.0150.00513.33
7.1.140.0210.00613.60
7.1.130.2750.00313.71
7.1.120.1730.00313.70
7.1.110.0390.00613.58
7.1.100.3060.00313.71
7.1.90.0160.00513.52
7.1.80.0130.00713.38
7.1.70.2880.01013.75
7.1.60.1490.00931.49
7.1.50.0350.00031.66
7.1.40.0480.01031.44
7.1.30.0360.00431.30
7.1.20.0570.01631.73
7.1.10.0180.00313.64
7.1.00.0080.00813.58
5.6.380.0050.01414.17

preferences:
19.7 ms | 401 KiB | 5 Q