3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = ['This is. a. test.', 'This is a........... test.', 'This is. a test', 'This is a test', 'This. is... a. test.' ]; foreach ($strings as $string) { if (($offset = strpos($string, '...')) !== false) { echo "Yes, found 3 in a row ($string -> $offset)"; } else { echo "Nope, no occurrence of 3 dots in a row ($string)"; } echo "\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.4.130.0100.00820.34
8.4.120.0040.00620.66
8.4.110.0090.00922.57
8.4.100.0120.00517.70
8.4.90.0080.01018.53
8.4.80.0060.00417.91
8.4.70.0100.00918.07
8.4.60.0120.00718.84
8.4.50.0110.01017.63
8.4.40.0170.00317.66
8.4.30.0100.00017.69
8.4.20.0200.00019.34
8.4.10.0060.00320.50
8.3.260.0020.00616.54
8.3.250.0090.01019.11
8.3.240.0120.00416.63
8.3.230.0140.00516.57
8.3.220.0060.00417.28
8.3.210.0050.00616.58
8.3.200.0040.00416.75
8.3.190.0100.01017.35
8.3.180.0060.00416.39
8.3.170.0090.00918.73
8.3.160.0080.00816.41
8.3.150.0030.00617.08
8.3.140.0080.01116.63
8.3.130.0060.01018.34
8.3.120.0030.00619.03
8.3.110.0080.00820.94
8.3.100.0080.00018.52
8.3.90.0140.00026.77
8.3.80.0090.00019.36
8.3.70.0070.00718.18
8.3.60.0120.00316.63
8.3.50.0070.01018.20
8.3.40.0050.00918.84
8.3.30.0100.00318.90
8.3.20.0040.00420.77
8.3.10.0080.00021.89
8.3.00.0050.00318.05
8.2.290.0140.00622.31
8.2.280.0100.00320.32
8.2.270.0130.00616.99
8.2.260.0040.01418.71
8.2.250.0040.00418.57
8.2.240.0000.00918.61
8.2.230.0030.00622.58
8.2.220.0090.00024.06
8.2.210.0100.00526.77
8.2.200.0070.00318.88
8.2.190.0090.00916.58
8.2.180.0090.00618.17
8.2.170.0090.00922.96
8.2.160.0070.00718.91
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00019.77
8.2.120.0040.00426.35
8.2.110.0170.00721.14
8.2.100.0080.00317.66
8.2.90.0000.00820.45
8.2.80.0080.00020.49
8.2.70.0000.00817.63
8.2.60.0030.00617.90
8.2.50.0000.00818.07
8.2.40.0000.01218.16
8.2.30.0040.00417.76
8.2.20.0030.00618.07
8.2.10.0040.00418.05
8.2.00.0000.00719.40
8.1.330.0110.00821.95
8.1.320.0090.01015.84
8.1.310.0130.00718.36
8.1.300.0060.00318.18
8.1.290.0060.00330.84
8.1.280.0140.00325.92
8.1.270.0150.00022.13
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00022.13
8.1.230.0080.00320.72
8.1.220.0030.00617.74
8.1.210.0050.00318.95
8.1.200.0070.00317.35
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0000.00818.43
8.1.160.0040.00418.89
8.1.150.0000.00718.55
8.1.140.0040.00417.87
8.1.130.0000.00719.03
8.1.120.0030.00517.48
8.1.110.0040.00417.45
8.1.100.0000.00817.39
8.1.90.0070.00317.36
8.1.80.0030.00417.47
8.1.70.0060.00317.40
8.1.60.0030.00517.60
8.1.50.0000.00717.52
8.1.40.0030.00817.45
8.1.30.0000.00817.59
8.1.20.0060.00317.55
8.1.10.0040.00417.45
8.1.00.0050.00317.34
8.0.300.0040.00420.23
8.0.290.0040.00416.75
8.0.280.0040.00418.44
8.0.270.0040.00416.83
8.0.260.0080.00017.27
8.0.250.0070.00016.92
8.0.240.0000.00716.96
8.0.230.0030.00316.84
8.0.220.0070.00016.80
8.0.210.0050.00316.89
8.0.200.0030.00316.92
8.0.190.0080.00016.98
8.0.180.0030.00516.91
8.0.170.0030.00616.87
8.0.160.0050.00216.96
8.0.150.0050.00316.78
8.0.140.0040.00416.86
8.0.130.0050.00013.36
8.0.120.0000.00716.86
8.0.110.0000.00716.92
8.0.100.0040.00416.89
8.0.90.0070.00016.89
8.0.80.0060.01116.91
8.0.70.0050.00216.71
8.0.60.0040.00416.69
8.0.50.0000.00816.89
8.0.30.0070.01116.91
8.0.20.0100.01017.40
8.0.10.0000.00716.88
8.0.00.0090.00816.82
7.4.330.0020.00215.55
7.4.320.0000.00816.41
7.4.300.0000.00616.61
7.4.290.0070.00016.41
7.4.280.0050.00316.49
7.4.270.0030.00316.61
7.4.260.0050.00216.48
7.4.250.0030.00316.52
7.4.240.0000.00716.51
7.4.230.0000.00716.50
7.4.220.0040.00416.63
7.4.210.0060.00816.49
7.4.200.0070.00016.41
7.4.160.0070.00916.49
7.4.140.0100.00717.86
7.4.130.0080.00916.41
7.4.120.0100.00816.41
7.4.110.0030.01316.45
7.4.100.0120.00916.50
7.4.90.0140.00316.51
7.4.80.0030.01419.39
7.4.70.0110.00616.46
7.4.60.0070.01016.45
7.4.50.0070.01116.39
7.4.40.0110.00716.59
7.4.00.0080.00814.97
7.3.330.0050.00013.18
7.3.320.0060.00013.04
7.3.310.0030.00316.38
7.3.300.0070.00016.22
7.3.290.0030.00316.35
7.3.280.0050.01116.36
7.3.260.0060.01416.47
7.3.240.0120.00816.46
7.3.230.0090.00916.36
7.3.210.0160.00316.29
7.3.200.0050.01016.29
7.3.190.0140.00316.35
7.3.180.0070.00716.46
7.3.170.0040.01416.72
7.3.160.0080.00816.60
7.3.120.0080.00814.52
7.3.110.0040.01314.85
7.3.100.0030.01014.66
7.3.90.0030.01014.90
7.3.80.0070.00714.66
7.3.70.0080.00514.90
7.3.60.0000.01114.96
7.3.50.0120.00914.66
7.3.40.0080.00814.86
7.3.30.0040.00414.62
7.3.20.0030.00916.59
7.3.10.0030.00616.61
7.3.00.0000.01516.69
7.2.330.0060.01016.61
7.2.320.0100.01316.51
7.2.310.0110.00616.51
7.2.300.0120.00616.65
7.2.290.0100.01316.61
7.2.250.0150.00315.02
7.2.240.0040.01514.93
7.2.230.0090.00614.94
7.2.220.0060.00315.08
7.2.210.0030.00615.04
7.2.200.0070.00715.24
7.2.190.0060.00815.10
7.2.180.0030.01815.13
7.2.170.0070.00715.15
7.2.60.0040.00817.00
7.2.40.1000.01217.75
7.2.30.0760.00717.88
7.2.20.0740.00717.98
7.2.10.1110.00718.24
7.2.00.1050.01017.99
7.1.330.0070.00715.90
7.1.320.0060.00915.73
7.1.310.0070.00715.79
7.1.300.0000.01015.89
7.1.290.0000.01515.77
7.1.280.0060.00615.74
7.1.270.0000.01015.86
7.1.260.0000.01115.96
7.1.200.0110.00315.68
7.1.160.1220.00616.52
7.1.150.0980.00817.13
7.1.140.0810.00617.03
7.1.130.1100.00516.59
7.1.120.1040.00817.02
7.1.110.1130.00816.20
7.1.100.1190.00616.15
7.1.90.1320.00616.43
7.1.80.1010.00716.13
7.1.70.1790.00915.12
7.1.60.1950.01033.39
7.1.50.1290.01032.79
7.1.40.1610.00832.76
7.1.30.0290.01132.72
7.1.20.1140.01232.80
7.1.10.0810.00714.92
7.1.00.1230.01114.80

preferences:
34.25 ms | 403 KiB | 5 Q