3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'netdeck'; function matrix($input) { $inputIdx = str_split($input); $inputLen = strlen($input); for ($i = 0; $i < $inputLen; $i++) { for ($j = 0; $j < $inputLen; $j++) { $key = $i + $j; if (!array_key_exists($i+$j, $inputIdx)) { $key -= $inputLen; } echo $inputIdx[$key]; } echo PHP_EOL; } } matrix($str);

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.27
8.3.50.0170.00317.98
8.3.40.0040.01118.79
8.3.30.0070.00718.76
8.3.20.0080.00019.19
8.3.10.0080.00019.41
8.3.00.0150.00023.55
8.2.180.0090.00616.63
8.2.170.0070.00718.95
8.2.160.0100.00722.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00419.76
8.2.120.0040.00426.35
8.2.110.0070.00320.96
8.2.100.0090.00318.03
8.2.90.0040.00417.79
8.2.80.0090.00018.03
8.2.70.0050.00317.93
8.2.60.0000.00818.16
8.2.50.0080.00018.10
8.2.40.0000.00719.34
8.2.30.0040.00419.51
8.2.20.0000.00718.04
8.2.10.0050.00218.11
8.2.00.0000.00719.54
8.1.280.0130.00625.92
8.1.270.0000.00822.13
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.05
8.1.230.0060.00622.56
8.1.220.0060.00317.74
8.1.210.0050.00318.92
8.1.200.0060.00317.22
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0040.00418.72
8.1.160.0000.00818.90
8.1.150.0030.00618.87
8.1.140.0050.00217.66
8.1.130.0000.00718.90
8.1.120.0030.00617.23
8.1.110.0000.00717.36
8.1.100.0040.00417.30
8.1.90.0020.00517.44
8.1.80.0050.00317.34
8.1.70.0100.00017.42
8.1.60.0070.00417.62
8.1.50.0060.00317.52
8.1.40.0030.00517.48
8.1.30.0040.00417.64
8.1.20.0000.00817.48
8.1.10.0000.00817.46
8.1.00.0040.00417.43
8.0.300.0040.00419.79
8.0.290.0050.00316.75
8.0.280.0030.00318.44
8.0.270.0040.00417.38
8.0.260.0070.00017.26
8.0.250.0070.00016.85
8.0.240.0070.00016.91
8.0.230.0050.00516.94
8.0.220.0040.00416.88
8.0.210.0090.00016.73
8.0.200.0040.00416.91
8.0.190.0030.00517.01
8.0.180.0030.00616.96
8.0.170.0080.00016.91
8.0.160.0030.00516.80
8.0.150.0040.00416.82
8.0.140.0040.00416.74
8.0.130.0030.00313.36
8.0.120.0000.00816.75
8.0.110.0040.00416.85
8.0.100.0070.00016.88
8.0.90.0000.00716.83
8.0.80.0080.01116.86
8.0.70.0040.00416.91
8.0.60.0000.00716.75
8.0.50.0040.00416.95
8.0.30.0070.01317.20
8.0.20.0110.00817.40
8.0.10.0040.00416.90
8.0.00.0080.01016.83
7.4.330.0000.00415.55
7.4.320.0060.00016.58
7.4.300.0030.00316.55
7.4.290.0000.00616.45
7.4.280.0000.00716.40
7.4.270.0030.00616.40
7.4.260.0030.00316.59
7.4.250.0000.00716.52
7.4.240.0050.00316.40
7.4.230.0030.00316.69
7.4.220.0070.00016.48
7.4.210.0090.00916.47
7.4.200.0050.00316.35
7.4.160.0100.00716.56
7.4.140.0110.00817.86
7.4.130.0140.00616.60
7.4.120.0100.00816.56
7.4.110.0030.01516.57
7.4.100.0130.00316.55
7.4.90.0040.01316.54
7.4.80.0100.01319.39
7.4.70.0090.00916.48
7.4.60.0030.01316.33
7.4.50.0100.00716.59
7.4.40.0100.00716.52
7.4.00.0070.01014.84
7.3.330.0050.00013.35
7.3.320.0000.00813.22
7.3.310.0000.00816.31
7.3.300.0040.00416.21
7.3.290.0060.00016.23
7.3.280.0060.00916.39
7.3.260.0090.01016.44
7.3.240.0080.01016.39
7.3.230.0100.00916.31
7.3.210.0110.00716.25
7.3.200.0110.00716.51
7.3.190.0100.01316.39
7.3.180.0070.01016.27
7.3.170.0040.01516.59
7.3.160.0080.00816.23
7.3.10.0030.00916.61
7.3.00.0110.00416.73
7.2.330.0040.01516.74
7.2.320.0160.01016.75
7.2.310.0090.00616.72
7.2.300.0030.01316.44
7.2.290.0040.01216.75
7.2.130.0120.00016.82
7.2.120.0090.00317.15
7.2.110.0030.00917.01
7.2.100.0030.01017.03
7.2.90.0070.01016.98
7.2.80.0280.00915.69
7.2.70.0270.01115.91
7.2.60.0610.00915.59
7.2.50.0730.01015.65
7.2.40.0610.00715.65
7.2.30.0670.00415.60
7.2.20.0860.00715.70
7.2.10.0630.00815.66
7.2.00.0350.00416.08
7.1.250.0070.00716.04
7.1.200.0280.00614.11
7.1.190.0530.00813.77
7.1.180.0580.00613.86
7.1.170.0970.00513.64
7.1.160.1460.01013.83
7.1.150.0920.00713.78
7.1.140.0920.00813.78
7.1.130.0450.00613.88
7.1.120.0550.00314.12
7.1.110.0600.00414.05
7.1.100.0580.00414.04
7.1.90.0960.01013.65
7.1.80.1150.00713.82
7.1.70.0870.00314.08
7.1.60.0880.01032.02
7.1.50.1040.01131.77
7.1.40.0950.01431.54
7.1.30.1480.00731.77
7.1.20.0900.00631.70
7.1.10.1320.00713.77
7.1.00.0720.01013.68

preferences:
58.59 ms | 400 KiB | 5 Q