3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'i need healing'; 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.0040.01216.75
8.3.50.0100.00318.08
8.3.40.0120.00318.61
8.3.30.0150.00018.67
8.3.20.0070.00419.29
8.3.10.0050.00321.90
8.3.00.0030.00623.52
8.2.180.0080.00818.25
8.2.170.0090.00622.96
8.2.160.0070.00719.45
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00722.24
8.2.120.0080.00026.35
8.2.110.0030.00722.22
8.2.100.0080.00417.77
8.2.90.0000.00919.22
8.2.80.0040.00417.97
8.2.70.0040.00418.05
8.2.60.0000.00817.93
8.2.50.0080.00018.10
8.2.40.0000.00819.38
8.2.30.0000.00719.22
8.2.20.0040.00418.05
8.2.10.0060.00318.02
8.2.00.0040.00419.52
8.1.280.0110.00425.92
8.1.270.0050.00322.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.43
8.1.230.0040.00819.04
8.1.220.0030.00517.79
8.1.210.0000.00918.77
8.1.200.0000.01017.35
8.1.190.0060.00317.00
8.1.180.0030.00618.10
8.1.170.0080.00018.73
8.1.160.0050.00218.93
8.1.150.0050.00218.93
8.1.140.0040.00417.57
8.1.130.0000.00718.88
8.1.120.0020.00517.52
8.1.110.0000.00817.50
8.1.100.0050.00217.41
8.1.90.0030.00417.42
8.1.80.0030.00317.49
8.1.70.0000.00717.41
8.1.60.0000.00917.56
8.1.50.0000.00817.40
8.1.40.0040.00417.45
8.1.30.0180.00017.66
8.1.20.0000.00717.54
8.1.10.0000.00917.53
8.1.00.0040.00417.39
8.0.300.0000.00718.77
8.0.290.0060.00316.58
8.0.280.0030.00318.45
8.0.270.0040.00417.24
8.0.260.0000.00617.21
8.0.250.0000.00816.93
8.0.240.0040.00416.93
8.0.230.0040.00416.92
8.0.220.0000.00716.91
8.0.210.0040.00316.89
8.0.200.0040.00416.86
8.0.190.0000.00816.99
8.0.180.0060.00316.94
8.0.170.0050.00316.91
8.0.160.0040.00416.86
8.0.150.0050.00316.84
8.0.140.0070.00016.90
8.0.130.0050.00013.37
8.0.120.0070.00016.91
8.0.110.0040.00416.79
8.0.100.0040.00416.71
8.0.90.0040.00416.75
8.0.80.0140.00616.83
8.0.70.0000.00816.73
8.0.60.0050.00316.82
8.0.50.0080.00016.76
8.0.30.0120.00717.11
8.0.20.0130.00817.40
8.0.10.0070.00016.88
8.0.00.0100.00816.90
7.4.330.0040.00015.55
7.4.320.0040.00416.40
7.4.300.0040.00416.61
7.4.290.0000.00716.54
7.4.280.0080.00016.48
7.4.270.0080.00316.55
7.4.260.0000.00716.48
7.4.250.0000.00716.47
7.4.240.0070.00016.62
7.4.230.0030.00316.57
7.4.220.0000.00816.46
7.4.210.0080.00716.57
7.4.200.0040.00416.62
7.4.160.0110.00616.43
7.4.140.0090.01117.86
7.4.130.0120.00916.48
7.4.120.0110.00916.46
7.4.110.0070.01016.50
7.4.100.0030.01316.42
7.4.90.0060.01216.50
7.4.80.0170.00719.39
7.4.70.0110.00716.54
7.4.60.0100.01416.72
7.4.50.0070.01016.32
7.4.40.0060.01216.40
7.4.00.0000.01414.78
7.3.330.0000.00513.32
7.3.320.0000.00513.37
7.3.310.0030.00316.41
7.3.300.0000.00716.35
7.3.290.0030.00316.37
7.3.280.0120.00916.33
7.3.260.0090.01416.59
7.3.240.0110.00816.38
7.3.230.0120.00616.36
7.3.210.0160.00616.69
7.3.200.0090.01516.35
7.3.190.0130.00616.50
7.3.180.0110.00516.32
7.3.170.0030.01616.37
7.3.160.0060.01216.60
7.3.10.0110.00716.54
7.3.00.0030.00816.46
7.2.330.0130.00616.53
7.2.320.0130.00316.49
7.2.310.0150.00416.63
7.2.300.0050.01316.66
7.2.290.0170.00716.53
7.2.130.0050.00816.81
7.2.120.0090.00916.74
7.2.110.0060.00916.55
7.2.100.0080.00716.91
7.2.90.0090.00416.80
7.2.80.0060.00816.78
7.2.70.0470.00616.17
7.2.60.0330.00616.23
7.2.50.0330.00416.17
7.2.40.0420.00916.24
7.2.30.0270.01116.29
7.2.20.0300.01016.14
7.2.10.0310.00916.20
7.2.00.0300.00916.16
7.1.250.0080.00515.48
7.1.200.0230.00615.48
7.1.170.0900.00013.86
7.1.160.0810.01013.58
7.1.150.0800.00913.59
7.1.140.0810.00313.91
7.1.130.0770.01413.75
7.1.120.0900.00713.89
7.1.110.0930.00313.88
7.1.100.1490.01313.85
7.1.90.1250.00313.43
7.1.80.1310.01013.62
7.1.70.1350.01013.72
7.1.60.1310.00731.70
7.1.50.1520.00331.69
7.1.40.1700.01331.73
7.1.30.1980.01031.59
7.1.20.1780.01731.76
7.1.10.1940.00313.84
7.1.00.1180.00613.82

preferences:
53.52 ms | 401 KiB | 5 Q