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); } 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.70.0130.00318.42
8.3.60.0100.01018.52
8.3.50.0130.00316.50
8.3.40.0150.00318.72
8.3.30.0070.00718.69
8.3.20.0080.00021.78
8.3.10.0040.00423.35
8.3.00.0030.00617.79
8.2.190.0120.00616.58
8.2.180.0120.00318.41
8.2.170.0120.00322.96
8.2.160.0070.00720.73
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00420.47
8.2.120.0000.00726.35
8.2.110.0060.00319.29
8.2.100.0080.00317.78
8.2.90.0080.00018.96
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0080.00017.80
8.2.50.0060.00318.10
8.2.40.0080.00020.64
8.2.30.0040.00418.98
8.2.20.0000.00717.81
8.2.10.0040.00417.99
8.2.00.0000.00717.80
8.1.280.0080.00825.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00321.00
8.1.230.0060.00619.15
8.1.220.0080.00017.74
8.1.210.0050.00518.77
8.1.200.0000.00917.10
8.1.190.0000.00817.11
8.1.180.0070.00018.10
8.1.170.0060.00318.56
8.1.160.0040.00418.75
8.1.150.0040.00420.11
8.1.140.0070.00019.38
8.1.130.0000.00718.81
8.1.120.0040.00417.22
8.1.110.0050.00217.30
8.1.100.0070.00017.32
8.1.90.0000.00717.37
8.1.80.0040.00417.33
8.1.70.0030.00317.32
8.1.60.0060.00317.34
8.1.50.0050.00317.37
8.1.40.0040.00417.35
8.1.30.0050.00317.51
8.1.20.0040.00417.55
8.1.10.0000.00717.27
8.1.00.0040.00417.18
8.0.300.0070.00019.98
8.0.290.0070.00016.62
8.0.280.0030.00318.30
8.0.270.0070.00016.98
8.0.260.0070.00016.69
8.0.250.0050.00216.82
8.0.240.0000.00816.80
8.0.230.0070.00016.77
8.0.220.0040.00416.80
8.0.210.0030.00316.79
8.0.200.0000.00816.92
8.0.190.0000.00816.88
8.0.180.0050.00316.88
8.0.170.0040.00416.80
8.0.160.0070.00016.75
8.0.150.0000.00716.72
8.0.140.0070.00016.84
8.0.130.0030.00313.26
8.0.120.0050.00316.76
8.0.110.0000.00716.88
8.0.100.0000.00716.75
8.0.90.0050.00216.72
8.0.80.0060.00916.82
8.0.70.0040.00416.64
8.0.60.0000.00816.77
8.0.50.0040.00416.80
8.0.30.0100.01017.04
8.0.20.0110.00917.40
8.0.10.0040.00416.96
8.0.00.0060.01216.66
7.4.330.0050.00015.55
7.4.320.0040.00416.35
7.4.300.0000.00616.57
7.4.290.0030.00616.42
7.4.280.0030.00516.50
7.4.270.0000.00916.60
7.4.260.0000.00513.26
7.4.250.0000.00816.50
7.4.240.0070.00016.66
7.4.230.0000.00716.38
7.4.220.0100.01016.54
7.4.210.0130.00616.63
7.4.200.0070.00016.38
7.4.160.0110.00916.60
7.4.150.0190.00417.40
7.4.140.0120.00517.86
7.4.130.0050.01716.36
7.4.120.0110.00816.50
7.4.110.0050.01116.62
7.4.100.0080.01316.64
7.4.90.0080.01416.57
7.4.80.0120.00619.39
7.4.70.0030.01316.54
7.4.60.0030.01616.37
7.4.50.0070.00716.36
7.4.40.0120.00616.35
7.4.30.0120.00616.48
7.4.10.0030.01414.80
7.4.00.0090.00814.85
7.3.330.0030.00313.35
7.3.320.0000.00513.31
7.3.310.0070.00016.18
7.3.300.0000.00716.36
7.3.290.0070.00816.37
7.3.280.0090.00816.35
7.3.270.0070.01017.40
7.3.260.0140.00416.42
7.3.250.0160.00916.43
7.3.240.0110.00916.31
7.3.230.0310.01816.37
7.3.210.0120.00416.66
7.3.200.0140.00316.40
7.3.190.0060.01216.43
7.3.180.0140.00316.23
7.3.170.0130.00316.55
7.3.160.0070.01016.32
7.3.130.0060.01215.06
7.3.120.0040.01515.02
7.3.110.0040.01514.50
7.3.100.0060.00914.96
7.3.90.0000.01414.96
7.3.80.0080.00014.80
7.3.70.0040.01114.95
7.3.60.0040.01114.80
7.3.50.0060.00314.81
7.3.40.0070.00714.85
7.3.30.0060.00914.57
7.3.20.0060.00316.66
7.3.10.0080.00516.54
7.3.00.0080.00716.47
7.2.330.0120.00316.72
7.2.320.0140.00416.57
7.2.310.0040.01316.30
7.2.300.0030.01316.44
7.2.290.0000.01616.56
7.2.260.0030.01315.05
7.2.250.0060.01215.14
7.2.240.0090.00315.13
7.2.230.0060.01015.14
7.2.220.0060.01214.99
7.2.210.0060.01014.84
7.2.200.0070.00714.69
7.2.190.0040.00814.92
7.2.180.0030.00615.10
7.2.170.0060.00914.70
7.2.160.0000.01215.02
7.2.150.0030.01016.93
7.2.140.0040.01116.64
7.2.130.0070.00616.73
7.2.120.0060.00716.74
7.2.110.0070.00716.74
7.2.100.0060.00916.81
7.2.90.0020.01316.88
7.2.80.0060.00616.60
7.2.70.0040.00816.62
7.2.60.0060.00716.84
7.2.50.0110.00416.70
7.2.40.0100.00416.79
7.2.30.0060.00616.77
7.2.20.0070.00816.80
7.2.10.0040.00916.79
7.2.00.0060.00517.48
7.1.330.0070.01015.41
7.1.320.0070.00716.05
7.1.310.0040.01115.64
7.1.300.0060.00915.60
7.1.290.0040.01115.84
7.1.280.0090.00015.91
7.1.270.0040.00815.89
7.1.260.0030.01015.82
7.1.250.0050.00915.65
7.1.240.0030.01315.82
7.1.230.0080.00415.60
7.1.220.0060.00915.84
7.1.210.0070.00415.84
7.1.200.0020.00815.57
7.1.190.0030.01215.54
7.1.180.0040.01115.75
7.1.170.0030.00915.70
7.1.160.0090.00315.85
7.1.150.0100.00615.96
7.1.140.0060.00315.93
7.1.130.0030.01015.59
7.1.120.0100.00315.89
7.1.110.0100.00315.72
7.1.100.0090.00415.97
7.1.90.0040.01115.66
7.1.80.0080.00315.56
7.1.70.0040.00516.46
7.1.60.0580.00624.65
7.1.50.0550.01124.32
7.1.40.0320.00824.29
7.1.30.0320.01424.31
7.1.20.0430.01124.27
7.1.10.0430.00715.31
7.1.00.0230.00615.31
7.0.330.0130.00015.47
7.0.320.0000.01415.33
7.0.310.0100.00315.26
7.0.300.0120.00615.45
7.0.290.0080.00815.45
7.0.280.0060.00315.26
7.0.270.0040.00815.12
7.0.260.0090.00615.44
7.0.250.0040.00415.45
7.0.240.0030.01015.64
7.0.230.0030.00615.51
7.0.220.0000.00915.42
7.0.210.0030.01015.42
7.0.200.0310.00815.21
7.0.190.0520.00615.19
7.0.180.0280.00814.88
7.0.170.0320.00714.99
7.0.160.0490.00714.91
7.0.150.0350.00914.77
7.0.140.0230.01014.92
7.0.130.0290.00914.85
7.0.120.0430.01015.13
7.0.110.0320.00914.95
7.0.100.0450.00814.98
7.0.90.0370.00814.91
7.0.80.0350.01414.93
7.0.70.0320.01214.84
7.0.60.0350.00614.90
7.0.50.0440.00515.21
7.0.40.0300.01214.16
7.0.30.0550.00714.20
7.0.20.0250.00713.97
7.0.10.0280.01014.15
7.0.00.0200.00814.00
5.6.400.0030.01414.41
5.6.390.0060.00314.14
5.6.380.0070.01114.35
5.6.370.0130.00314.18
5.6.360.0070.00714.41
5.6.350.0060.01014.07
5.6.340.0070.00714.04
5.6.330.0000.00914.32
5.6.320.0070.00714.21
5.6.310.0120.00014.19
5.6.300.0090.00414.22
5.6.290.0070.00714.17
5.6.280.0040.01114.30
5.6.270.0130.00014.18
5.6.260.0000.01514.36
5.6.250.0030.01214.57
5.6.240.0000.01313.98
5.6.230.0090.00614.36
5.6.220.0060.00614.28
5.6.210.0000.01413.99
5.6.200.0070.01014.11
5.6.190.0090.00614.27
5.6.180.0000.01114.25
5.6.170.0090.00014.37
5.6.160.0060.00914.32
5.6.150.0100.00014.07
5.6.140.0060.01014.00
5.6.130.0070.00714.32
5.6.120.0070.01314.18
5.6.110.0100.00614.19
5.6.100.0000.01114.11
5.6.90.0120.00313.84
5.6.80.0090.00613.86
5.6.70.0060.00614.36
5.6.60.0090.00613.81
5.6.50.0000.01414.28
5.6.40.0000.01114.26
5.6.30.0040.00714.19
5.6.20.0070.00714.15
5.6.10.0070.00713.86
5.6.00.0080.00014.00

preferences:
51.32 ms | 401 KiB | 5 Q