3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'ditiseentest'; $length = 4; $expected = [ 'diti', 'itis', 'tise', 'isee', 'seen', 'eent', 'ente', 'ntes', 'test' ]; for($i=0;$i<strlen($string);$i++) { echo substr($string, $i, $length) . "\r\n"; }

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.0090.00616.38
8.3.50.0070.00717.93
8.3.40.0090.00618.77
8.3.30.0140.00018.38
8.3.20.0040.00421.89
8.3.10.0070.00023.66
8.3.00.0080.00019.56
8.2.180.0100.01018.29
8.2.170.0070.00722.96
8.2.160.0140.00020.54
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00719.89
8.2.110.0100.00022.02
8.2.100.0090.00317.84
8.2.90.0040.00419.22
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0080.00017.92
8.2.50.0040.00418.10
8.2.40.0000.00720.47
8.2.30.0000.00921.12
8.2.20.0070.00017.93
8.2.10.0040.00418.05
8.2.00.0000.00717.87
8.1.280.0070.00725.92
8.1.270.0050.00320.73
8.1.260.0170.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.97
8.1.230.0110.00021.98
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0080.00018.64
8.1.160.0050.00218.97
8.1.150.0040.00420.67
8.1.140.0050.00319.56
8.1.130.0000.00919.00
8.1.120.0000.00717.42
8.1.110.0040.00417.36
8.1.100.0040.00417.49
8.1.90.0000.00717.46
8.1.80.0000.00717.44
8.1.70.0000.00717.33
8.1.60.0080.00017.61
8.1.50.0030.00517.51
8.1.40.0060.00317.52
8.1.30.0040.00417.66
8.1.20.0020.00517.69
8.1.10.0040.00417.49
8.1.00.0040.00417.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.45
8.0.270.0000.00717.17
8.0.260.0070.00019.03
8.0.250.0020.00516.96
8.0.240.0030.00316.93
8.0.230.0030.00316.96
8.0.220.0070.00016.89
8.0.210.0000.00716.87
8.0.200.0070.00016.92
8.0.190.0080.00016.96
8.0.180.0040.00416.97
8.0.170.0000.00816.97
8.0.160.0080.00016.86
8.0.150.0040.00416.84
8.0.140.0040.00416.82
8.0.130.0000.00513.27
8.0.120.0040.00416.90
8.0.110.0000.00716.92
8.0.100.0050.00216.97
8.0.90.0040.00416.89
8.0.80.0040.01116.91
8.0.70.0030.00616.92
8.0.60.0080.00016.82
8.0.50.0000.00716.84
8.0.30.0080.01317.03
8.0.20.0090.00917.40
8.0.10.0050.00316.92
8.0.00.0090.00916.55
7.4.330.0050.00015.55
7.4.320.0000.00616.50
7.4.300.0060.00016.44
7.4.290.0040.00416.51
7.4.280.0070.00016.43
7.4.270.0070.00016.55
7.4.260.0030.00316.51
7.4.250.0000.00816.50
7.4.240.0000.00716.52
7.4.230.0030.00316.57
7.4.220.0300.00916.43
7.4.210.0030.01816.45
7.4.200.0060.00316.43
7.4.160.0080.00916.49
7.4.150.0120.00617.40
7.4.140.0130.00917.86
7.4.130.0090.01616.48
7.4.120.0140.00616.44
7.4.110.0000.01816.46
7.4.100.0110.00716.40
7.4.90.0070.01016.33
7.4.80.0110.00619.39
7.4.70.0150.00316.41
7.4.60.0040.01216.46
7.4.50.0070.00716.43
7.4.40.0120.00616.44
7.4.30.0140.00616.56
7.4.00.0030.01014.84
7.3.330.0000.00613.06
7.3.320.0000.00513.16
7.3.310.0070.00016.21
7.3.300.0070.00016.37
7.3.290.0090.00616.29
7.3.280.0060.01316.31
7.3.270.0190.00017.40
7.3.260.0110.00916.56
7.3.250.0140.00816.43
7.3.240.0080.01016.72
7.3.230.0040.01616.50
7.3.210.0070.01016.54
7.3.200.0110.00616.30
7.3.190.0130.00416.63
7.3.180.0090.00916.38
7.3.170.0060.00916.34
7.3.160.0120.00916.32
7.3.00.0040.01116.53
7.2.330.0060.01816.78
7.2.320.0200.00616.70
7.2.310.0060.01016.70
7.2.300.0090.00816.57
7.2.290.0110.00616.55
7.2.130.0130.00316.87
7.2.120.0100.00716.87
7.2.110.0120.00416.81
7.2.100.0110.00416.94
7.2.90.0070.00716.86
7.2.80.0040.00716.84
7.2.70.0030.01316.76
7.2.60.0070.00916.97
7.2.50.0080.00416.91
7.2.40.0060.00617.02
7.2.30.0110.00416.98
7.2.20.0090.00317.09
7.2.10.0100.00616.88
7.2.00.0070.00416.89
7.1.250.0120.00315.68
7.1.240.0040.01115.65
7.1.230.0070.00715.64
7.1.220.0100.00715.89
7.1.210.0030.01015.52
7.1.200.0080.00515.77
7.1.190.0060.00615.72
7.1.180.0100.00315.76
7.1.170.0030.00915.70
7.1.160.0100.00715.76
7.1.150.0060.01015.71
7.1.140.0100.00615.86
7.1.130.0040.00715.50
7.1.120.0070.00715.46
7.1.110.0110.00415.87
7.1.100.0000.01115.99
7.1.90.0070.00715.71
7.1.80.0070.00715.63
7.1.70.0060.00316.52
7.1.60.0350.00624.52
7.1.50.0430.01224.32
7.1.40.0320.01324.09
7.1.30.0310.00724.34
7.1.20.0400.00724.26
7.1.10.0530.00814.98
7.1.00.0340.00515.41
7.0.330.0090.00615.27
7.0.320.0110.00415.10
7.0.310.0160.00015.20
7.0.300.0040.00715.36
7.0.290.0060.00615.22
7.0.280.0080.00315.48
7.0.270.0070.00715.38
7.0.260.0100.00315.37
7.0.250.0090.00315.35
7.0.240.0090.00615.13
7.0.230.0100.00315.34
7.0.220.0070.01015.28
7.0.210.0110.00415.35
7.0.200.0350.00715.06
7.0.190.0290.00615.09
7.0.180.0370.00514.82
7.0.170.0270.00814.80
7.0.160.0360.01014.90
7.0.150.0280.00814.96
7.0.140.0320.00515.16
7.0.130.0310.00715.00
7.0.120.0330.00714.71
7.0.110.0300.00814.95
7.0.100.0300.00514.91
7.0.90.0260.01014.74
7.0.80.0280.00814.87
7.0.70.0270.00914.75
7.0.60.0280.00514.60
7.0.50.0250.00714.83
7.0.40.0220.00814.03
7.0.30.0200.01213.99
7.0.20.0220.00914.06
7.0.10.0230.00813.95
7.0.00.0290.00514.01
5.6.380.0080.00314.14

preferences:
56.65 ms | 400 KiB | 5 Q