3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ReferenceChecker { const FIRST = 0; function __initialize($starter = "AWB0") { $this->starter = $starter; } function check($reference) { return strpos($reference, $this->starter) === FIRST; } } $checker = new ReferenceChecker; $subject = "AWB012345"; $result = $checker->check($subject); var_dump($result); $subject = "12345"; $result = $checker->check($subject); var_dump($result);

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.0090.00618.54
8.3.60.0100.00718.20
8.3.50.0130.00722.10
8.3.40.0100.01018.84
8.3.30.0110.00419.08
8.3.20.0070.00020.16
8.3.10.0030.00620.52
8.3.00.0090.00019.50
8.2.180.0100.01016.50
8.2.170.0060.00922.96
8.2.160.0070.00720.47
8.2.150.0020.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00322.11
8.2.110.0070.00319.45
8.2.100.0060.00617.84
8.2.90.0030.00519.95
8.2.80.0000.00817.97
8.2.70.0000.00917.93
8.2.60.0050.00318.03
8.2.50.0050.00318.10
8.2.40.0000.00918.09
8.2.30.0000.00818.07
8.2.20.0000.00717.75
8.2.10.0040.00418.00
8.2.00.0000.00817.87
8.1.280.0110.00425.92
8.1.270.0060.00322.06
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0060.00322.50
8.1.230.0060.00621.04
8.1.220.0040.00417.91
8.1.210.0080.00018.92
8.1.200.0000.00817.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0080.00018.84
8.1.160.0000.00821.94
8.1.150.0070.00018.98
8.1.140.0040.00417.49
8.1.130.0000.00717.88
8.1.120.0040.00417.38
8.1.110.0040.00417.46
8.1.100.0020.00517.51
8.1.90.0050.00217.34
8.1.80.0040.00417.46
8.1.70.0030.00317.46
8.1.60.0060.00317.61
8.1.50.0050.00517.57
8.1.40.0000.00717.54
8.1.30.0090.00017.52
8.1.20.0030.00617.65
8.1.10.0040.00417.50
8.1.00.0000.00917.48
8.0.300.0050.00219.97
8.0.290.0000.00916.88
8.0.280.0000.00718.45
8.0.270.0000.00717.18
8.0.260.0030.00317.13
8.0.250.0030.00316.94
8.0.240.0030.00317.05
8.0.230.0030.00317.00
8.0.220.0000.00716.92
8.0.210.0030.00316.91
8.0.200.0000.00717.00
8.0.190.0040.00417.00
8.0.180.0040.00417.02
8.0.170.0000.00817.01
8.0.160.0000.00717.00
8.0.150.0000.00816.87
8.0.140.0000.00816.93
8.0.130.0060.00013.34
8.0.120.0000.00816.92
8.0.110.0040.00416.86
8.0.100.0080.00016.82
8.0.90.0040.00416.96
8.0.80.0090.01216.91
8.0.70.0040.00416.82
8.0.60.0030.00516.76
8.0.50.0020.00516.84
8.0.30.0130.00617.18
8.0.20.0110.01117.40
8.0.10.0040.00416.95
8.0.00.0130.00916.71
7.4.330.0050.00015.15
7.4.320.0030.00316.56
7.4.300.0060.00016.55
7.4.290.0000.00716.61
7.4.280.0000.00816.59
7.4.270.0000.00716.64
7.4.260.0020.00516.50
7.4.250.0040.00416.48
7.4.240.0030.00416.60
7.4.230.0070.00016.70
7.4.220.0070.01716.37
7.4.210.0120.00416.51
7.4.200.0030.00316.41
7.4.160.0120.00916.38
7.4.150.0120.00917.40
7.4.140.0100.00717.86
7.4.130.0120.00816.50
7.4.120.0070.01116.54
7.4.110.0070.01016.48
7.4.100.0150.00316.48
7.4.90.0170.00716.54
7.4.80.0060.01019.39
7.4.70.0030.01416.50
7.4.60.0120.00416.42
7.4.50.0030.00616.71
7.4.40.0140.00316.50
7.4.30.0120.00316.63
7.4.00.0090.00615.26
7.3.330.0030.00313.22
7.3.320.0000.00513.30
7.3.310.0000.00716.27
7.3.300.0030.00316.25
7.3.290.0030.01016.38
7.3.280.0070.00916.42
7.3.270.0070.01017.40
7.3.260.0100.00716.29
7.3.250.0100.01016.47
7.3.240.0100.00716.55
7.3.230.0140.00416.39
7.3.210.0140.00416.32
7.3.200.0080.00919.39
7.3.190.0150.00616.31
7.3.180.0130.00716.43
7.3.170.0130.00916.60
7.3.160.0060.01016.47
7.3.10.0130.00016.53
7.3.00.0060.00916.33
7.2.330.0120.00616.70
7.2.320.0040.01516.73
7.2.310.0070.01016.45
7.2.300.0060.01616.38
7.2.290.0100.01016.89
7.2.130.0060.00916.84
7.2.120.0040.00716.68
7.2.110.0030.00716.85
7.2.100.0030.01016.94
7.2.90.0040.01116.73
7.2.80.0040.01116.56
7.2.70.0090.00617.02
7.2.60.0140.00716.82
7.2.50.0030.01016.71
7.2.40.0090.00916.65
7.2.30.0000.01217.02
7.2.20.0090.00616.85
7.2.10.0060.00616.63
7.2.00.0090.00316.34
7.1.250.0110.00315.79
7.1.200.0060.00615.73
7.1.100.0100.00317.96
7.1.70.0070.00317.02
7.1.60.0100.01419.32
7.1.50.0280.01234.86
7.1.00.0030.07722.54
7.0.200.0040.00416.58
7.0.140.0030.07722.12
7.0.60.0000.09319.88
7.0.50.0070.07717.87
7.0.40.0100.07020.23
7.0.30.0300.07720.28
7.0.20.0230.06020.09
7.0.10.0100.08720.10
7.0.00.0100.05720.22
5.6.280.0030.07320.79
5.6.210.0100.07720.70
5.6.200.0130.07318.25
5.6.190.0030.04720.61
5.6.180.3270.04020.60
5.6.170.0230.06720.45
5.6.160.0070.08720.55
5.6.150.0100.07718.23
5.6.140.0030.04318.16
5.6.130.0070.08018.15
5.6.120.0100.03321.15
5.6.110.0070.03721.00
5.6.100.0130.07020.98
5.6.90.0070.09321.13
5.6.80.0130.07720.54
5.6.70.4230.03320.50
5.5.350.0030.04720.38
5.5.340.0030.08018.04
5.5.330.0100.08320.29
5.5.320.0230.04020.30
5.5.310.0230.08320.30
5.5.300.0000.05317.97
5.5.290.0030.04017.95
5.5.280.0000.04720.91
5.5.270.0100.07320.64
5.5.260.0030.05020.73
5.5.250.0000.07020.59
5.5.240.0070.07320.13
5.4.450.1000.05019.39
5.4.440.0200.04319.57
5.4.430.0130.05019.48
5.4.420.0670.00019.51
5.4.410.0630.00019.26
5.4.400.0600.00019.22
5.4.390.0730.00019.13
5.4.380.0630.00019.13
5.4.370.0600.00019.21
5.4.360.0600.00019.03
5.4.350.0670.00019.16
5.4.340.0600.00018.98
5.4.320.0140.05612.50
5.4.310.0140.03812.50
5.4.300.0050.04112.51
5.4.290.0070.03812.50
5.4.280.0080.03712.39
5.4.270.0060.03712.40
5.4.260.0090.05312.40
5.4.250.0100.04712.40
5.4.240.0110.05912.40
5.4.230.0110.04012.39
5.4.220.0090.04912.39
5.4.210.0130.04912.39
5.4.200.0120.05712.39
5.4.190.0100.06212.39
5.4.180.0090.05912.39
5.4.170.0080.04512.40
5.4.160.0150.04112.39
5.4.150.0360.10512.39
5.4.140.0100.05612.07
5.4.130.0230.09612.06
5.4.120.0170.08012.02
5.4.110.0100.05512.02
5.4.100.0140.06712.02
5.4.90.0160.10312.02
5.4.80.0180.06612.01
5.4.70.0110.05512.02
5.4.60.0050.06312.01
5.4.50.0050.04812.02
5.4.40.0090.04512.00
5.4.30.0060.04512.00
5.4.20.0190.08012.00
5.4.10.0130.05812.00
5.4.00.0130.06411.48
5.3.290.0100.04412.80
5.3.280.0090.04212.71
5.3.270.0080.05012.73
5.3.260.0140.07612.72
5.3.250.0060.03912.72
5.3.240.0130.05112.72
5.3.230.0070.04312.71
5.3.220.0190.05512.68
5.3.210.0120.05312.68
5.3.200.0120.04712.68
5.3.190.0070.04912.68
5.3.180.0070.03812.68
5.3.170.0070.03812.67
5.3.160.0060.04012.67
5.3.150.0100.05112.68
5.3.140.0050.04912.66
5.3.130.0110.04612.66
5.3.120.0140.04812.66
5.3.110.0100.05512.66
5.3.100.0100.04012.12
5.3.90.0100.03412.11
5.3.80.0080.03612.09
5.3.70.0060.03812.09
5.3.60.0070.03512.07
5.3.50.0110.03112.03
5.3.40.0070.04512.03
5.3.30.0100.03611.99
5.3.20.0100.05811.77
5.3.10.0110.04411.73
5.3.00.0120.05811.72
5.2.170.0080.0499.23
5.2.160.0050.0419.23
5.2.150.0100.0419.22
5.2.140.0260.0809.22
5.2.130.0140.0429.18
5.2.120.0210.0549.18
5.2.110.0050.0319.18
5.2.100.0040.0309.19
5.2.90.0040.0309.18
5.2.80.0060.0319.18
5.2.70.0030.0349.18
5.2.60.0080.0279.13
5.2.50.0050.0329.10
5.2.40.0030.0319.07
5.2.30.0060.0339.05
5.2.20.0050.0329.04
5.2.10.0070.0358.95
5.2.00.0100.0298.82
5.1.60.0050.0238.09
5.1.50.0070.0218.09
5.1.40.0050.0258.07
5.1.30.0070.0238.42
5.1.20.0060.0288.45
5.1.10.0060.0248.17
5.1.00.0050.0248.16
5.0.50.0020.0226.65
5.0.40.0030.0216.50
5.0.30.0040.0356.32
5.0.20.0040.0196.29
5.0.10.0060.0176.26
5.0.00.0040.0306.25
4.4.90.0020.0164.78
4.4.80.0040.0144.76
4.4.70.0030.0164.75
4.4.60.0040.0154.76
4.4.50.0080.0174.77
4.4.40.0100.0264.71
4.4.30.0040.0204.75
4.4.20.0060.0204.84
4.4.10.0110.0184.85
4.4.00.0040.0244.76
4.3.110.0030.0164.67
4.3.100.0030.0154.66
4.3.90.0030.0144.63
4.3.80.0020.0254.59
4.3.70.0020.0154.63
4.3.60.0050.0134.63
4.3.50.0040.0144.63
4.3.40.0030.0234.54
4.3.30.0020.0163.30
4.3.20.0000.0183.28
4.3.10.0010.0173.23
4.3.00.0000.02013.59

preferences:
42.53 ms | 401 KiB | 5 Q