3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayTable = [ [1, 2, 3, 4, 5], [6, 7, 8, 9, 10], ]; $i = 0; $transpose = []; while ($columns = array_column($arrayTable, $i++)) { $transpose[] = $columns; } $rows = count($transpose); for ($i = 0; $i < $rows; $i++){ $cols = count($transpose[$i]); for ($j = 0; $j < $cols; $j++) { $table .= $transpose[$i][$j] . ','; } } echo $table;

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.0070.00718.43
8.3.50.0060.00816.42
8.3.40.0160.00318.64
8.3.30.0070.01018.69
8.3.20.0080.00021.90
8.3.10.0070.00020.29
8.3.00.0000.00820.64
8.2.180.0120.00318.55
8.2.170.0120.00622.96
8.2.160.0130.00022.07
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0030.00920.40
8.2.100.0090.00317.69
8.2.90.0030.00617.73
8.2.80.0030.00618.95
8.2.70.0000.00917.75
8.2.60.0000.00817.68
8.2.50.0060.00318.07
8.2.40.0050.00319.66
8.2.30.0000.00817.87
8.2.20.0080.00018.13
8.2.10.0080.00019.21
8.2.00.0000.00819.30
8.1.280.0070.01025.92
8.1.270.0080.00020.77
8.1.260.0080.00026.35
8.1.250.0090.00028.09
8.1.240.0090.00019.12
8.1.230.0060.00617.77
8.1.220.0040.00417.77
8.1.210.0030.00518.77
8.1.200.0060.00317.36
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0000.00920.62
8.1.160.0030.00318.87
8.1.150.0000.00818.87
8.1.140.0000.00722.14
8.1.130.0070.00020.14
8.1.120.0060.00317.45
8.1.110.0000.00717.45
8.1.100.0000.00717.42
8.1.90.0000.00717.35
8.1.80.0000.00717.41
8.1.70.0000.00917.40
8.1.60.0090.00017.54
8.1.50.0030.00617.57
8.1.40.0050.00317.48
8.1.30.0040.00417.53
8.1.20.0060.00617.64
8.1.10.0000.00717.55
8.1.00.0000.00817.51
8.0.300.0000.00918.77
8.0.290.0050.00316.88
8.0.280.0000.00818.43
8.0.270.0040.00418.05
8.0.260.0030.00319.98
8.0.250.0000.00616.89
8.0.240.0040.00416.89
8.0.230.0030.00316.90
8.0.220.0030.00316.83
8.0.210.0030.00316.93
8.0.200.0040.00417.07
8.0.190.0030.00317.05
8.0.180.0030.00616.93
8.0.170.0000.00917.00
8.0.160.0000.01116.84
8.0.150.0000.00716.86
8.0.140.0040.00416.90
8.0.130.0050.00013.38
8.0.120.0000.00716.79
8.0.110.0000.00816.76
8.0.100.0040.00416.78
8.0.90.0000.00816.75
8.0.80.0100.01016.98
8.0.70.0050.00316.84
8.0.60.0000.00816.84
8.0.50.0040.00417.01
8.0.30.0150.00917.21
8.0.20.0160.00417.32
8.0.10.0080.00017.06
8.0.00.0120.00616.58
7.4.330.0000.00515.55
7.4.320.0000.00616.45
7.4.300.0030.00316.61
7.4.290.0050.00316.62
7.4.280.0000.00816.49
7.4.270.0080.00016.45
7.4.260.0000.00613.27
7.4.250.0070.00016.42
7.4.240.0000.00716.53
7.4.230.0000.00716.34
7.4.220.0040.00416.49
7.4.210.0080.00816.52
7.4.200.0040.00416.58
7.4.130.0070.01716.50
7.4.120.0120.00616.56
7.4.110.0120.00816.39
7.4.100.0120.00816.50
7.4.90.0060.00916.38
7.4.80.0070.01019.39
7.4.70.0090.00616.55
7.4.60.0120.00416.52
7.4.50.0070.00716.45
7.4.40.0000.01616.52
7.4.00.0030.01014.96
7.3.330.0040.00416.16
7.3.320.0030.00313.36
7.3.310.0000.00816.24
7.3.300.0030.00316.42
7.3.290.0030.00316.28
7.3.280.0090.00616.36
7.3.260.0120.00616.43
7.3.240.0080.01116.40
7.3.230.0040.01316.40
7.3.210.0100.00716.41
7.3.200.0070.01016.44
7.3.190.0130.00316.36
7.3.180.0130.00416.42
7.3.170.0140.00716.41
7.3.160.0160.00016.38
7.3.120.0120.00014.78
7.3.110.0100.00714.98
7.3.100.0100.00614.82
7.3.90.0070.00714.88
7.3.80.0080.00514.89
7.3.70.0080.00514.27
7.3.60.0070.00714.73
7.3.50.0030.01014.65
7.3.40.0090.00414.79
7.3.30.0080.00414.65
7.3.20.0060.00914.68
7.3.10.0150.00014.79
7.3.00.0110.00314.52
7.2.330.0030.01416.77
7.2.320.0130.01016.50
7.2.310.0090.00916.85
7.2.300.0140.00616.66
7.2.290.0000.02116.78
7.2.250.0040.01115.06
7.2.240.0090.00615.29
7.2.230.0000.01415.00
7.2.220.0070.00715.32
7.2.210.0080.00614.97
7.2.200.0110.00314.93
7.2.190.0080.00515.19
7.2.180.0060.00614.96
7.2.170.0090.00314.67
7.1.330.0060.00913.82
7.1.320.0070.00713.88
7.1.310.0000.01314.10
7.1.300.0060.00614.07
7.1.290.0060.00613.95
7.1.280.0030.00913.86
7.1.270.0070.00713.87
7.1.260.0000.01413.68

preferences:
46.42 ms | 401 KiB | 5 Q