3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "This is a test"; $search = "is"; $pos = 0; $loop = true; while($loop) { # Check if the word can be found in the text $pos = stripos($html,$search,$pos); if($pos !== false) { $spanStart = "<span style='background-color:khaki;'>"; $spanEnd = "</span>"; $html = substr($html,0,$pos) . $spanStart . substr($html,$pos,strlen($search)) . $spanEnd . substr($html,$pos+strlen($search),strlen($html)); $pos = $pos + strlen($search) + strlen($spanStart) + strlen($spanEnd); } else { $loop = false; } } echo "html=[$html]";

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.60.0040.01416.62
8.3.50.0210.01122.99
8.3.40.0140.00018.59
8.3.30.0030.01019.10
8.3.20.0030.00620.04
8.3.10.0080.00023.66
8.3.00.0080.00019.25
8.2.180.0100.01016.63
8.2.170.0130.00618.86
8.2.160.0040.01122.96
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0030.00521.00
8.2.110.0060.00322.12
8.2.100.0110.00017.84
8.2.90.0000.00719.05
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0040.00417.80
8.2.50.0070.00318.07
8.2.40.0000.00820.07
8.2.30.0000.00717.96
8.2.20.0080.00017.58
8.2.10.0030.00518.09
8.2.00.0040.00417.79
8.1.280.0110.00425.92
8.1.270.0080.00023.97
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0040.00423.85
8.1.230.0090.00319.09
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.13
8.1.190.0050.00317.22
8.1.180.0050.00318.10
8.1.170.0000.00818.72
8.1.160.0040.00422.00
8.1.150.0040.00418.88
8.1.140.0000.00817.52
8.1.130.0000.00817.90
8.1.120.0060.00317.50
8.1.110.0040.00417.32
8.1.100.0040.00417.45
8.1.90.0000.00817.38
8.1.80.0030.00517.47
8.1.70.0030.00317.40
8.1.60.0040.00417.63
8.1.50.0040.00417.46
8.1.40.0050.00317.57
8.1.30.0000.00917.62
8.1.20.0070.00017.71
8.1.10.0040.00417.47
8.1.00.0050.00317.30
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.45
8.0.270.0000.00817.19
8.0.260.0000.00617.28
8.0.250.0000.00716.84
8.0.240.0030.00316.84
8.0.230.0000.00716.83
8.0.220.0000.00716.78
8.0.210.0050.00316.82
8.0.200.0000.00716.86
8.0.190.0070.00416.91
8.0.180.0050.00216.82
8.0.170.0060.00316.86
8.0.160.0040.00416.86
8.0.150.0000.00716.82
8.0.140.0000.00716.76
8.0.130.0000.00613.30
8.0.120.0030.00516.81
8.0.110.0070.00016.92
8.0.100.0080.00016.88
8.0.90.0000.00816.82
8.0.80.0060.00916.94
8.0.70.0080.00016.83
8.0.60.0050.00316.80
8.0.50.0000.00716.90
8.0.30.0120.00716.99
8.0.20.0080.01317.40
8.0.10.0040.00417.06
8.0.00.0080.01116.74
7.4.330.0050.00015.00
7.4.320.0070.00016.45
7.4.300.0030.00316.35
7.4.290.0000.00816.57
7.4.280.0050.00316.43
7.4.270.0000.00716.59
7.4.260.0030.00316.47
7.4.250.0040.00416.55
7.4.240.0040.00316.54
7.4.230.0070.00016.59
7.4.220.0140.00316.52
7.4.210.0030.01216.66
7.4.200.0000.00816.71
7.4.160.0120.00316.66
7.4.150.0130.00617.40
7.4.140.0090.00717.86
7.4.130.0100.00716.41
7.4.120.0120.00616.43
7.4.110.0110.00516.39
7.4.100.0120.00616.53
7.4.90.0070.01016.46
7.4.80.0090.01319.39
7.4.70.0090.00916.45
7.4.60.0100.00716.46
7.4.50.0030.00516.49
7.4.40.0080.00816.43
7.4.30.0000.01516.41
7.4.10.0000.01515.06
7.4.00.0080.00814.88
7.3.330.0000.00513.16
7.3.320.0000.00613.04
7.3.310.0030.00316.41
7.3.300.0030.00316.27
7.3.290.0040.01116.32
7.3.280.0080.01016.30
7.3.270.0230.03017.40
7.3.260.0120.00616.50
7.3.250.0080.00916.25
7.3.240.0070.01116.62
7.3.230.0130.00316.57
7.3.210.0080.01516.25
7.3.200.0080.00819.39
7.3.190.0080.00816.32
7.3.180.0130.00316.55
7.3.170.0120.00916.41
7.3.160.0040.01116.37
7.3.130.0110.00814.73
7.3.120.0080.00814.67
7.3.110.0070.01014.69
7.3.100.0050.00914.94
7.3.90.0090.00714.79
7.3.80.0020.01214.78
7.3.70.0040.00914.92
7.3.60.0040.00814.88
7.3.50.0050.00714.74
7.3.40.0030.00814.78
7.3.30.0080.00314.85
7.3.20.0050.01016.60
7.3.10.0050.00916.46
7.3.00.0050.01116.71
7.2.330.0090.00916.50
7.2.320.0100.01016.66
7.2.310.0060.01016.73
7.2.300.0060.00916.70
7.2.290.0090.00616.67
7.2.260.0090.00915.02
7.2.250.0090.00915.10
7.2.240.0050.01114.80
7.2.230.0020.01015.00
7.2.220.0070.00415.12
7.2.210.0060.00615.15
7.2.200.0050.00515.05
7.2.190.0020.01214.88
7.2.180.0080.00814.77
7.2.170.0040.00715.02
7.2.160.0000.01115.05
7.2.150.0060.00916.76
7.2.140.0030.00916.63
7.2.130.0040.01116.86
7.2.120.0060.01216.93
7.2.110.0100.00716.78
7.2.100.0030.00716.80
7.2.90.0060.00616.67
7.2.80.0070.01016.94
7.2.70.0040.01516.79
7.2.60.0050.00916.86
7.2.50.0040.00916.85
7.2.40.0070.00717.05
7.2.30.0070.01017.00
7.2.20.0080.00316.74
7.2.10.0030.00717.04
7.2.00.0060.00618.08
7.1.330.0060.00915.80
7.1.320.0110.00015.76
7.1.310.0030.01115.81
7.1.300.0020.01415.75
7.1.290.0080.00815.74
7.1.280.0050.00715.88
7.1.270.0020.01115.96
7.1.260.0060.00815.74
7.1.250.0070.00715.71
7.1.240.0090.00615.87
7.1.230.0060.00315.91
7.1.220.0000.01015.81
7.1.210.0070.00716.00
7.1.200.0070.00415.91
7.1.190.0030.00915.98
7.1.180.0070.00415.75
7.1.170.0040.01115.93
7.1.160.0040.00715.95
7.1.150.0040.00415.85
7.1.140.0090.00315.90
7.1.130.0060.00315.82
7.1.120.0060.01215.81
7.1.110.0100.00715.94
7.1.100.0110.01016.92
7.1.90.0000.00815.85
7.1.80.0060.00915.59
7.1.70.0020.01116.50
7.1.60.0050.01217.52
7.1.50.0140.00925.36
7.1.40.0040.00715.58
7.1.30.0040.01115.80
7.1.20.0000.01015.75
7.1.10.0120.00315.77
7.1.00.0080.03719.03
7.0.330.0000.01415.37
7.0.320.0070.00715.53
7.0.310.0090.00915.48
7.0.300.0000.01515.36
7.0.290.0060.01015.54
7.0.280.0000.00915.46
7.0.270.0040.01215.41
7.0.260.0150.00315.28
7.0.250.0000.01215.44
7.0.240.0090.00615.34
7.0.230.0000.00715.38
7.0.220.0120.00615.65
7.0.210.0060.00615.32
7.0.200.0060.00616.11
7.0.190.0030.00915.59
7.0.180.0040.00715.21
7.0.170.0060.00915.54
7.0.160.0030.01315.42
7.0.150.0080.00315.55
7.0.140.0030.04118.72
7.0.130.0060.01015.53
7.0.120.0030.01015.63
7.0.110.0140.00315.30
7.0.100.0030.00915.48
7.0.90.0100.00015.09
7.0.80.0000.01715.54
7.0.70.0000.01215.52
7.0.60.0090.03917.65
7.0.50.0010.04016.53
7.0.40.0060.04116.74
7.0.30.0130.04916.71
7.0.20.0200.02516.68
7.0.10.0130.02916.78
7.0.00.0030.04016.69
5.6.400.0030.00614.36
5.6.390.0070.00314.30
5.6.380.0090.00614.30
5.6.370.0110.00414.36
5.6.360.0070.00714.39
5.6.350.0030.01114.62
5.6.340.0000.01114.63
5.6.330.0140.00314.63
5.6.320.0060.00914.36
5.6.310.0070.00714.22
5.6.300.0100.00314.49
5.6.290.0030.01014.27
5.6.280.0080.03617.62
5.6.270.0110.00414.42
5.6.260.0100.00014.10
5.6.250.0040.00814.39
5.6.240.0000.00914.39
5.6.230.0060.00814.37
5.6.220.0070.00314.37
5.6.210.0080.03817.37
5.6.200.0030.03016.26
5.6.190.0130.04317.31
5.6.180.0030.03617.62
5.6.170.0150.04217.42
5.6.160.0040.02417.42
5.6.150.0060.02316.11
5.6.140.0150.03716.29
5.6.130.0050.03216.29
5.6.120.0050.04017.71
5.6.110.0030.02517.71
5.6.100.0030.04617.80
5.6.90.0060.02817.75
5.6.80.0080.04317.48
5.6.70.0080.00013.94
5.6.60.0070.00714.55
5.6.50.0030.00914.54
5.6.40.0060.00314.37
5.6.30.0100.00314.09
5.6.20.0070.00714.15
5.6.10.0150.00014.32
5.6.00.0130.00014.23
5.5.380.0040.00814.20
5.5.370.0120.00314.46
5.5.360.0050.00413.89
5.5.350.0150.03817.07
5.5.340.0110.03815.97
5.5.330.0020.05017.50
5.5.320.0120.02517.27
5.5.310.0180.03317.30
5.5.300.0080.04516.14
5.5.290.0120.03816.04
5.5.280.0050.03017.45
5.5.270.0070.03017.66
5.5.260.0130.04017.57
5.5.250.0030.05317.30
5.5.240.0080.04017.33
5.5.230.0070.00313.97
5.5.220.0030.01014.00
5.5.210.0060.00514.27
5.5.200.0030.00914.16
5.5.190.0080.00314.20
5.5.180.0000.01414.04
5.5.170.0030.00614.25
5.5.160.0060.00314.12
5.5.150.0120.00313.90
5.5.140.0090.00614.37
5.5.130.0040.00714.07
5.5.120.0130.00314.02
5.5.110.0040.00814.17
5.5.100.0080.00514.13
5.5.90.0000.01414.18
5.5.80.0070.00714.02
5.5.70.0070.00714.23
5.5.60.0040.00414.33
5.5.50.0070.00714.39
5.5.40.0100.00314.29
5.5.30.0000.01214.21
5.5.20.0060.00313.91
5.5.10.0000.01114.05
5.5.00.0030.00713.96
5.4.450.0430.02715.68
5.4.440.0350.02915.86
5.4.430.0400.03315.67
5.4.420.0250.03315.85
5.4.410.0100.03715.52
5.4.400.0180.02715.46
5.4.390.0160.03415.47
5.4.380.0120.02515.41
5.4.370.0050.02215.46
5.4.360.0050.02315.38
5.4.350.0090.04112.11
5.4.340.0040.02412.11
5.4.330.0020.00512.24
5.4.320.0060.02012.35
5.4.310.0040.02112.35
5.4.300.0030.02112.35
5.4.290.0030.02512.34
5.4.280.0050.02112.29
5.4.270.0050.01912.29
5.4.260.0020.02412.29
5.4.250.0060.02212.29
5.4.240.0040.02112.29
5.4.230.0040.02112.29
5.4.220.0050.01912.29
5.4.210.0050.01912.29
5.4.200.0030.02212.29
5.4.190.0040.02212.29
5.4.180.0020.02412.29
5.4.170.0060.01912.29
5.4.160.0050.02012.29
5.4.150.0050.02112.29
5.4.140.0070.02012.13
5.4.130.0050.01912.13
5.4.120.0060.02112.10
5.4.110.0050.01912.10
5.4.100.0040.02512.10
5.4.90.0050.02012.10
5.4.80.0030.02412.10
5.4.70.0020.02112.10
5.4.60.0050.01912.10
5.4.50.0030.02212.10
5.4.40.0050.02212.10
5.4.30.0060.01712.10
5.4.20.0080.01512.09
5.4.10.0070.02112.09
5.4.00.0040.02211.84
5.3.290.0060.03912.80
5.3.280.0040.04512.71
5.3.270.0070.03712.73
5.3.260.0070.05112.72
5.3.250.0110.03612.72
5.3.240.0110.04412.72
5.3.230.0080.03512.71
5.3.220.0040.04412.68
5.3.210.0080.03612.68
5.3.200.0060.04312.68
5.3.190.0060.04612.67
5.3.180.0060.03912.67
5.3.170.0060.03712.67
5.3.160.0060.03612.67
5.3.150.0030.04012.67
5.3.140.0070.03412.66
5.3.130.0050.03912.66
5.3.120.0040.04112.66
5.3.110.0050.04212.66
5.3.100.0070.04812.12
5.3.90.0060.04312.09
5.3.80.0040.03812.07
5.3.70.0060.03512.07
5.3.60.0050.03812.06
5.3.50.0090.03112.00
5.3.40.0070.03412.00
5.3.30.0060.03311.95
5.3.20.0100.03611.72
5.3.10.0050.03411.69
5.3.00.0060.03511.68
5.2.170.0060.0319.18
5.2.160.0050.0359.18
5.2.150.0040.0379.18
5.2.140.0040.0309.18
5.2.130.0030.0319.14
5.2.120.0030.0289.14
5.2.110.0030.0389.15
5.2.100.0050.0279.14
5.2.90.0010.0319.14
5.2.80.0050.0299.14
5.2.70.0060.0339.13
5.2.60.0060.0339.09
5.2.50.0050.0299.06
5.2.40.0050.0289.04
5.2.30.0050.0409.01
5.2.20.0040.0309.00
5.2.10.0040.0298.92
5.2.00.0040.0308.79
5.1.60.0040.0248.07
5.1.50.0030.0258.07
5.1.40.0020.0268.04
5.1.30.0040.0288.39
5.1.20.0080.0288.41
5.1.10.0060.0268.14
5.1.00.0040.0328.14
5.0.50.0020.0216.63
5.0.40.0010.0206.49
5.0.30.0030.0316.30
5.0.20.0010.0226.28
5.0.10.0040.0196.25
5.0.00.0050.0296.25
4.4.90.0020.0164.78
4.4.80.0030.0164.75
4.4.70.0000.0174.76
4.4.60.0030.0204.75
4.4.50.0030.0184.77
4.4.40.0000.0274.71
4.4.30.0020.0234.76
4.4.20.0010.0194.85
4.4.10.0050.0194.85
4.4.00.0020.0264.76
4.3.110.0060.0194.67
4.3.100.0030.0184.67
4.3.90.0020.0194.64
4.3.80.0020.0294.58
4.3.70.0000.0164.63
4.3.60.0020.0144.63
4.3.50.0010.0164.63
4.3.40.0020.0244.54
4.3.30.0020.0163.30
4.3.20.0030.0163.27
4.3.10.0020.0153.24
4.3.00.0130.0207.91

preferences:
35.24 ms | 401 KiB | 5 Q