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) - $length;$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.0090.00617.92
8.3.40.0140.00018.76
8.3.30.0110.00418.69
8.3.20.0070.00021.80
8.3.10.0040.00421.61
8.3.00.0040.00419.79
8.2.180.0120.00918.16
8.2.170.0090.00622.96
8.2.160.0040.01120.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00020.38
8.2.120.0000.00826.35
8.2.110.0030.00622.15
8.2.100.0080.00417.84
8.2.90.0040.00419.20
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0080.00017.93
8.2.50.0000.00818.10
8.2.40.0040.00420.60
8.2.30.0000.00921.00
8.2.20.0000.00718.13
8.2.10.0000.00817.98
8.2.00.0040.00418.05
8.1.280.0070.00725.92
8.1.270.0080.00020.45
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0070.00319.14
8.1.230.0070.00719.08
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0030.00517.11
8.1.180.0050.00318.10
8.1.170.0000.00818.57
8.1.160.0040.00419.01
8.1.150.0080.00020.61
8.1.140.0040.00419.57
8.1.130.0040.00418.89
8.1.120.0030.00317.43
8.1.110.0000.00717.50
8.1.100.0000.00717.45
8.1.90.0000.00717.47
8.1.80.0000.00717.47
8.1.70.0000.00717.45
8.1.60.0040.00417.46
8.1.50.0050.00317.55
8.1.40.0050.00517.50
8.1.30.0000.00917.63
8.1.20.0050.00217.68
8.1.10.0000.00917.50
8.1.00.0040.00417.49
8.0.300.0040.00419.84
8.0.290.0000.00716.75
8.0.280.0070.00018.43
8.0.270.0000.00717.30
8.0.260.0030.00319.11
8.0.250.0030.00316.86
8.0.240.0070.00016.97
8.0.230.0000.00716.85
8.0.220.0000.00716.93
8.0.210.0090.00016.89
8.0.200.0000.00716.91
8.0.190.0080.00016.96
8.0.180.0000.00716.80
8.0.170.0000.00716.82
8.0.160.0000.00816.98
8.0.150.0040.00416.84
8.0.140.0030.00516.89
8.0.130.0030.00313.33
8.0.120.0040.00416.76
8.0.110.0000.00716.84
8.0.100.0000.00716.88
8.0.90.0040.00416.76
8.0.80.0060.00916.77
8.0.70.0080.00016.87
8.0.60.0050.00316.71
8.0.50.0040.00416.67
8.0.30.0090.01017.01
8.0.20.0130.00717.40
8.0.10.0030.00616.98
8.0.00.0030.01416.49
7.4.330.0000.00615.55
7.4.320.0050.00316.52
7.4.300.0030.00316.43
7.4.290.0040.00416.34
7.4.280.0040.00416.57
7.4.270.0030.00316.44
7.4.260.0000.00716.43
7.4.250.0040.00416.50
7.4.240.0040.00416.49
7.4.230.0030.00316.28
7.4.220.0110.00716.57
7.4.210.0030.01016.41
7.4.200.0070.00016.52
7.4.160.0090.00816.41
7.4.150.0030.01917.40
7.4.140.0120.01017.86
7.4.130.0130.01316.37
7.4.120.0120.00816.39
7.4.110.0140.00716.55
7.4.100.0060.01116.43
7.4.90.0070.01116.50
7.4.80.0090.00919.39
7.4.70.0100.00716.44
7.4.60.0160.00716.43
7.4.50.0070.01116.51
7.4.40.0150.00616.52
7.4.30.0060.01216.48
7.4.00.0040.00914.88
7.3.330.0060.00013.18
7.3.320.0050.00013.24
7.3.310.0080.00016.29
7.3.300.0000.00616.24
7.3.290.0090.00716.38
7.3.280.0070.01116.30
7.3.270.0050.01017.40
7.3.260.0090.00716.36
7.3.250.0090.01016.49
7.3.240.0070.00916.44
7.3.230.0060.01516.31
7.3.210.0060.01116.59
7.3.200.0040.01116.37
7.3.190.0030.01716.37
7.3.180.0120.00316.38
7.3.170.0160.00616.43
7.3.160.0100.00716.60
7.2.330.0130.00716.54
7.2.320.0120.01516.76
7.2.310.0100.00716.56
7.2.300.0100.00716.40
7.2.290.0110.00416.48
7.2.60.0130.00316.79
7.2.00.0000.01319.53
7.1.200.0090.00315.91
7.1.100.6330.01018.17
7.1.70.0070.01017.30
7.1.60.1100.02333.32
7.1.50.1200.00733.09
7.1.40.1070.01732.79
7.1.30.1200.01332.58
7.1.20.0800.00732.88
7.1.10.0530.01014.91
7.1.00.0430.01714.77
7.0.200.0930.01314.87
7.0.190.1330.01014.99
7.0.180.0900.01314.36
7.0.170.1100.01014.41
7.0.160.1330.01014.52
7.0.150.1000.00714.61
7.0.140.0530.01014.71
7.0.130.0600.00714.73
7.0.120.0600.01714.71
7.0.110.0670.01014.58
7.0.100.0500.01014.57
7.0.90.0470.01314.40
7.0.80.0400.01714.48
7.0.70.0530.01014.65
7.0.60.0570.00714.36
7.0.50.0500.01014.60
7.0.40.0700.01014.55
7.0.30.0500.01014.41
7.0.20.0730.00714.48
7.0.10.0530.01714.49
7.0.00.0530.00314.68

preferences:
63.56 ms | 400 KiB | 5 Q