3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @param string $haystack * @param string $needle * * @return bool */ function str_starts_with( $haystack, $needle ) { $length = strlen( $needle ); var_dump(substr( $haystack, 0, $length ), $needle); var_dump(substr( $haystack, 0, $length ) == $needle); var_dump(substr( $haystack, 0, $length ) === $needle); var_dump(hash_equals(substr( $haystack, 0, $length ), $needle)); } str_starts_with( '', '' );

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.40.0060.01218.72
8.3.30.0070.00718.71
8.3.20.0000.00721.76
8.3.10.0050.00323.36
8.3.00.0080.00017.64
8.2.170.0120.00322.96
8.2.160.0090.00620.90
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0080.00020.35
8.2.120.0080.00026.35
8.2.110.0060.00321.04
8.2.100.0080.00317.78
8.2.90.0030.00619.14
8.2.80.0060.00317.97
8.2.70.0040.00417.50
8.2.60.0090.00017.80
8.2.50.0040.00718.10
8.2.40.0050.00220.59
8.2.30.0000.00718.99
8.2.20.0050.00217.83
8.2.10.0040.00417.91
8.2.00.0070.00017.97
8.1.270.0080.00023.73
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0090.00022.31
8.1.230.0080.00320.88
8.1.220.0040.00417.74
8.1.210.0060.00618.77
8.1.200.0060.00317.23
8.1.190.0000.00817.13
8.1.180.0030.00518.10
8.1.170.0080.00018.66
8.1.160.0000.00718.79
8.1.150.0040.00420.06
8.1.140.0000.00819.44
8.1.130.0000.00818.67
8.1.120.0070.00017.40
8.1.110.0000.00717.27
8.1.100.0000.00817.36
8.1.90.0040.00417.29
8.1.80.0040.00417.20
8.1.70.0060.00017.38
8.1.60.0080.00017.36
8.1.50.0020.00517.39
8.1.40.0050.00217.35
8.1.30.0000.00717.53
8.1.20.0000.00717.51
8.1.10.0000.00717.41
8.1.00.0080.00017.25
8.0.300.0070.00019.89
8.0.290.0080.00016.58
8.0.280.0030.00318.30
8.0.270.0040.00417.11
8.0.260.0030.00516.80
8.0.250.0030.00316.91
8.0.240.0000.00816.80
8.0.230.0030.00316.86
8.0.220.0000.00716.71
8.0.210.0030.00316.79
8.0.200.0000.00916.88
8.0.190.0030.00616.78
8.0.180.0050.00516.85
8.0.170.0030.00316.74
8.0.160.0030.00516.89
8.0.150.0040.00416.81
8.0.140.0030.00316.77
8.0.130.0000.00513.21
8.0.120.0070.00016.84
8.0.110.0000.00816.84
8.0.100.0040.00416.81
8.0.90.0030.00516.74
8.0.80.0040.01116.78
8.0.70.0080.00016.79
8.0.60.0000.00716.88
8.0.50.0070.00016.68
8.0.30.0080.01416.93
8.0.20.0080.01317.40
8.0.10.0000.00716.82
8.0.00.0100.00716.65
7.4.330.0000.00515.55
7.4.320.0060.00016.67
7.4.300.0030.00316.66
7.4.290.0050.00516.66
7.4.280.0000.00716.60
7.4.270.0030.00316.59
7.4.260.0050.00013.32
7.4.250.0040.00416.38
7.4.240.0000.00716.42
7.4.230.0030.00316.69
7.4.220.0110.00716.45
7.4.210.0030.01616.66
7.4.200.0030.00316.52
7.4.160.0100.00716.51
7.4.150.0150.00617.40
7.4.140.0110.00817.86
7.4.130.0090.01316.55
7.4.120.0120.00716.47
7.4.110.0160.00616.51
7.4.100.0070.01316.37
7.4.90.0090.00916.53
7.4.80.0110.00719.39
7.4.70.0070.00916.49
7.4.60.0090.00616.38
7.4.50.0140.00316.39
7.4.40.0100.00716.28
7.4.30.0140.00316.45
7.4.00.0070.01114.89
7.3.330.0030.00313.38
7.3.320.0020.00213.40
7.3.310.0070.00016.25
7.3.300.0030.00316.33
7.3.290.0080.00616.36
7.3.280.0110.00616.36
7.3.270.0050.01017.40
7.3.260.0080.00816.25
7.3.250.0060.01316.57
7.3.240.0030.01516.44
7.3.230.0160.00016.40
7.3.210.0070.01116.42
7.3.200.0100.00616.72
7.3.190.0120.00916.28
7.3.180.0090.00616.73
7.3.170.0040.01316.34
7.3.160.0090.01316.26
7.3.10.0050.00816.70
7.3.00.0060.00616.58
7.2.330.0100.01016.45
7.2.320.0140.00916.45
7.2.310.0120.00616.65
7.2.300.0160.00716.52
7.2.290.0000.01716.64
7.2.130.0040.00716.64
7.2.120.0030.00916.80
7.2.110.0060.00916.78
7.2.100.0060.00616.75
7.2.90.0020.00916.62
7.2.80.0100.00516.60
7.2.70.0050.00716.82
7.2.60.0030.01016.84
7.2.50.0090.00516.69
7.2.40.0100.00516.76
7.2.30.0110.00516.83
7.2.20.0040.00716.85
7.2.10.0130.00516.88
7.2.00.0060.01017.73
7.1.250.0110.00215.89
7.1.240.0060.00315.48
7.1.230.0110.00415.71
7.1.220.0000.00915.63
7.1.210.0090.00615.71
7.1.200.0080.00515.75
7.1.190.0000.01715.75
7.1.180.0000.01415.38
7.1.170.0080.00815.90
7.1.160.0060.00915.78
7.1.150.0030.01015.54
7.1.140.0130.00615.59
7.1.130.0090.00615.40
7.1.120.0060.00615.60
7.1.110.0100.00015.73
7.1.100.0060.00615.72
7.1.90.0000.01115.83
7.1.80.0030.00615.72
7.1.70.0040.00616.58
7.1.60.0250.01224.43
7.1.50.0370.01224.47
7.1.40.0550.01224.28
7.1.30.0710.00924.36
7.1.20.0570.00724.14
7.1.10.0340.00915.26
7.1.00.0320.01015.12
7.0.330.0110.00715.36
7.0.320.0070.00714.88
7.0.310.0100.00315.58
7.0.300.0040.01115.52
7.0.290.0060.00915.18
7.0.280.0030.00615.48
7.0.270.0040.00415.43
7.0.260.0070.00015.56
7.0.250.0060.00615.39
7.0.240.0070.00415.46
7.0.230.0140.00315.45
7.0.220.0060.00615.11
7.0.210.0090.00315.09
7.0.200.0340.00315.27
7.0.190.0330.01015.14
7.0.180.0280.00914.86
7.0.170.0560.00714.85
7.0.160.0350.01314.79
7.0.150.0280.01114.86
7.0.140.0330.00915.00
7.0.130.0300.01015.11
7.0.120.0330.01315.05
7.0.110.0380.00315.06
7.0.100.0290.00714.77
7.0.90.0450.01314.88
7.0.80.0390.00514.79
7.0.70.0410.00514.99
7.0.60.0650.01014.96
7.0.50.0390.00615.00
7.0.40.0420.00814.01
7.0.30.0470.00814.03
7.0.20.0470.01214.01
7.0.10.0580.00514.07
7.0.00.0330.00814.12
5.6.380.0070.00714.07

preferences:
65.65 ms | 400 KiB | 5 Q