3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function stringContains(string $needle, string $haystack): bool { return strpos($haystack, $needle) !== false; } assert(stringContains('Ahoy', 'Ahoy World!') === true); assert(stringContains('Hello', 'Ahoy World!') === false); function stringStartsWith(string $needle, string $haystack): bool { return strpos($haystack, $needle) === 0; } assert(stringStartsWith('Ahoy', 'Ahoy World!') === true); assert(stringStartsWith('Hello', 'AhoyWorld') === false); function stringEndsWith(string $needle, string $haystack): bool { return strpos($haystack, $needle) === strlen($haystack) - strlen($needle); } assert(stringEndsWith('World!', 'Ahoy World!') === true); assert(stringEndsWith('Ahoy', 'Ahoy World!') === false);

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.4.10.0070.00419.18
8.3.140.0080.00017.20
8.3.130.0060.00318.39
8.3.120.0100.01018.76
8.3.110.0090.00020.94
8.3.100.0070.00324.06
8.3.90.0000.00818.26
8.3.80.0060.00618.30
8.3.70.0130.00718.31
8.3.60.0110.00718.56
8.3.50.0120.00624.43
8.3.40.0040.01118.63
8.3.30.0110.00418.83
8.3.20.0070.00024.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.250.0040.00418.40
8.2.240.0090.00017.36
8.2.230.0040.00422.58
8.2.220.0000.00837.54
8.2.210.0030.00526.77
8.2.200.0040.00416.75
8.2.190.0070.00716.58
8.2.180.0100.01025.92
8.2.170.0110.00718.84
8.2.160.0030.01022.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00020.93
8.2.110.0050.00519.43
8.2.100.0090.00317.84
8.2.90.0050.00319.11
8.2.80.0070.00417.97
8.2.70.0030.00617.63
8.2.60.0040.00417.50
8.2.50.0050.00318.10
8.2.40.0050.00319.17
8.2.30.0000.00819.03
8.2.20.0040.00418.02
8.2.10.0050.00319.05
8.2.00.0000.00719.14
8.1.300.0000.00818.09
8.1.290.0030.00730.84
8.1.280.0110.00725.92
8.1.270.0100.00020.51
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00319.08
8.1.230.0030.00820.99
8.1.220.0070.00317.74
8.1.210.0050.00318.77
8.1.200.0080.00017.10
8.1.190.0000.01117.10
8.1.180.0030.00618.10
8.1.170.0080.00018.59
8.1.160.0020.00518.96
8.1.150.0090.00018.82
8.1.140.0030.00518.84
8.1.130.0070.00017.21
8.1.120.0070.00017.41
8.1.110.0060.00317.24
8.1.100.0030.00617.38
8.1.90.0040.00417.28
8.1.80.0080.00017.33
8.1.70.0030.00317.30
8.1.60.0080.00017.50
8.1.50.0040.00417.53
8.1.40.0030.00617.40
8.1.30.0030.00517.63
8.1.20.0040.00417.59
8.1.10.0070.00417.58
8.1.00.0000.00917.36
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0030.00318.41
8.0.270.0040.00416.73
8.0.260.0050.00316.84
8.0.250.0030.00316.96
8.0.240.0040.00416.91
8.0.230.0000.00616.93
8.0.220.0000.00716.89
8.0.210.0040.00416.94
8.0.200.0030.00616.92
8.0.190.0030.00316.96
8.0.180.0050.00316.86
8.0.170.0030.00616.77
8.0.160.0030.00616.97
8.0.150.0040.00416.74
8.0.140.0000.00716.77
8.0.130.0030.00313.37
8.0.120.0000.00716.73
8.0.110.0070.00016.78
8.0.100.0000.00716.91
8.0.90.0030.00316.75
8.0.80.0070.01016.86
8.0.70.0000.00716.96
8.0.60.0030.00616.96
8.0.50.0040.00416.82
8.0.30.0110.01417.31
8.0.20.0090.01017.28
8.0.10.0000.00816.85
8.0.00.0100.01016.95
7.4.330.0060.00015.55
7.4.320.0000.00616.48
7.4.300.0040.00416.36
7.4.290.0040.00416.44
7.4.280.0040.00416.46
7.4.270.0000.00716.56
7.4.260.0000.00613.27
7.4.250.0030.00316.54
7.4.240.0000.00816.58
7.4.230.0070.00016.26
7.4.220.0030.00316.62
7.4.210.0040.01116.48
7.4.200.0070.00316.39
7.4.130.0100.01016.58
7.4.120.0150.00616.48
7.4.110.0120.00516.53
7.4.100.0090.00816.62
7.4.90.0120.00516.59
7.4.80.0040.01517.99
7.4.70.0100.00816.36
7.4.60.0120.00716.35
7.4.50.0110.00716.26
7.4.40.0110.01016.33
7.4.30.0090.01116.36
7.4.20.0060.01516.35
7.4.10.0100.00916.38
7.4.00.0120.00816.44
7.3.330.0040.00416.36
7.3.320.0050.00013.28
7.3.310.0000.00716.51
7.3.300.0000.00716.32
7.3.290.0090.00716.48
7.3.280.0180.00316.43
7.3.260.0090.00916.68
7.3.250.0130.00616.38
7.3.240.0070.01016.57
7.3.230.0030.01316.44
7.3.220.0120.00616.45
7.3.210.0110.00516.43
7.3.200.0120.00616.49
7.3.190.0110.00616.37
7.3.180.0110.00616.40
7.3.170.0110.00816.45
7.3.160.0120.00516.50
7.3.150.0110.01016.34
7.3.140.0110.01016.30
7.3.130.0080.01016.29
7.3.120.0110.00616.36
7.3.110.0090.00916.30
7.3.100.0090.00916.42
7.3.90.0120.00916.42
7.3.80.0100.00816.48
7.3.70.0060.01316.39
7.3.60.0110.00816.38
7.3.50.0100.00916.37
7.3.40.0110.00616.45
7.3.30.0100.00916.41
7.3.20.0100.00917.32
7.3.10.0080.01117.18
7.3.00.0120.00817.23
7.2.340.0250.00416.66
7.2.330.0180.00616.61
7.2.320.0200.01116.50
7.2.310.0150.00816.34
7.2.300.0130.01016.46
7.2.290.0110.01016.40
7.2.280.0110.01116.33
7.2.270.0130.00916.33
7.2.260.0100.01116.36
7.2.250.0130.00816.38
7.2.240.0110.01116.36
7.2.230.0120.01016.37
7.2.220.0140.00916.50
7.2.210.0140.00716.57
7.2.200.0220.00916.48
7.2.190.0130.01016.38
7.2.180.0160.00716.46
7.2.170.0130.00816.49
7.2.160.0140.00916.59
7.2.150.0150.00817.48
7.2.140.0150.00817.39
7.2.130.0140.00917.45
7.2.120.0150.00817.19
7.2.110.0130.01117.29
7.2.100.0130.00917.31
7.2.90.0160.00617.38
7.2.80.0140.00717.32
7.2.70.0110.01117.40
7.2.60.0160.00717.24
7.2.50.0180.00917.44
7.2.40.0160.00917.33
7.2.30.0130.01017.32
7.2.20.0140.00717.52
7.2.10.0150.00917.30
7.2.00.0130.01017.33

preferences:
56.41 ms | 403 KiB | 5 Q