3v4l.org

run code in 300+ PHP versions simultaneously
<?php $texthtml = '<p>test</p><br><p><img src="1.jpeg" alt=""><br></p><p><img src="2.png" alt=""><br><img src="3.png" alt=""></p>'; $search = 'img src="'; $pos = strpos($texthtml, $search)+ strlen($search); $lenght= strpos($texthtml, '"', $pos)-$pos; echo substr($texthtml, $pos, $lenght);

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.140.0120.01017.40
8.4.130.0130.00418.82
8.4.120.0100.00824.16
8.4.110.0100.00922.27
8.4.100.0100.01217.73
8.4.90.0060.00320.42
8.4.80.0090.00219.06
8.4.70.0040.00420.76
8.4.60.0160.00520.50
8.4.50.0130.00622.32
8.4.40.0030.00619.42
8.4.30.0070.01319.52
8.4.20.0050.00519.14
8.4.10.0060.00319.29
8.3.270.0110.00816.26
8.3.260.0110.00616.64
8.3.250.0080.00818.67
8.3.240.0120.00816.66
8.3.230.0130.00716.50
8.3.220.0090.00420.57
8.3.210.0090.00916.48
8.3.200.0040.00516.45
8.3.190.0080.00718.69
8.3.180.0090.00619.03
8.3.170.0110.00717.05
8.3.160.0070.01116.54
8.3.150.0160.00316.45
8.3.140.0120.00618.95
8.3.130.0080.00018.19
8.3.120.0060.00320.63
8.3.110.0030.01316.69
8.3.100.0120.00316.52
8.3.90.0000.00826.77
8.3.80.0060.00317.97
8.3.70.0120.00318.43
8.3.60.0110.01118.43
8.3.50.0150.00317.37
8.3.40.0060.00818.46
8.3.30.0070.00718.68
8.3.20.0030.01020.38
8.3.10.0060.00320.73
8.3.00.0060.00320.95
8.2.290.0090.00917.01
8.2.280.0120.00620.16
8.2.270.0070.01116.79
8.2.260.0040.00416.90
8.2.250.0110.00416.41
8.2.240.0060.00317.29
8.2.230.0110.00420.94
8.2.220.0050.00324.06
8.2.210.0110.00726.77
8.2.200.0030.00616.88
8.2.190.0120.00316.58
8.2.180.0000.01418.16
8.2.170.0000.01422.96
8.2.160.0080.00620.64
8.2.150.0030.00524.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00419.54
8.2.110.0100.00022.25
8.2.100.0060.00617.91
8.2.90.0000.01119.23
8.2.80.0040.00419.29
8.2.70.0050.00517.75
8.2.60.0030.00617.90
8.2.50.0030.00618.10
8.2.40.0000.00820.48
8.2.30.0000.00719.13
8.2.20.0050.00218.07
8.2.10.0000.00817.93
8.2.00.0030.00618.05
8.1.330.0080.01121.75
8.1.320.0110.00921.99
8.1.310.0040.00416.80
8.1.300.0030.00617.58
8.1.290.0070.00330.84
8.1.280.0060.00925.92
8.1.270.0050.00322.20
8.1.260.0080.00026.35
8.1.250.0020.00528.09
8.1.240.0030.01322.88
8.1.230.0080.00317.64
8.1.220.0000.00817.77
8.1.210.0000.00918.77
8.1.200.0060.00317.13
8.1.190.0000.00816.98
8.1.180.0040.00418.10
8.1.170.0080.00018.65
8.1.160.0000.00719.05
8.1.150.0000.00718.75
8.1.140.0040.00419.50
8.1.130.0030.00617.43
8.1.120.0000.00817.45
8.1.110.0040.00417.28
8.1.100.0000.00717.38
8.1.90.0040.00417.46
8.1.80.0030.00317.46
8.1.70.0000.00717.29
8.1.60.0040.00417.40
8.1.50.0000.00717.38
8.1.40.0040.00417.29
8.1.30.0000.00817.60
8.1.20.0030.00617.64
8.1.10.0040.00417.53
8.1.00.0050.00217.42
8.0.300.0050.00218.77
8.0.290.0000.00716.75
8.0.280.0030.00318.46
8.0.270.0030.00316.89
8.0.260.0040.00416.73
8.0.250.0030.00316.99
8.0.240.0000.00816.88
8.0.230.0020.00516.76
8.0.220.0030.00316.82
8.0.210.0030.00316.76
8.0.200.0030.00316.87
8.0.190.0000.00816.89
8.0.180.0080.00016.89
8.0.170.0060.00316.78
8.0.160.0080.00016.91
8.0.150.0070.00016.71
8.0.140.0000.00916.67
8.0.130.0030.00313.22
8.0.120.0070.00016.69
8.0.110.0070.00016.72
8.0.100.0000.00716.87
8.0.90.0000.00716.66
8.0.80.0040.01116.86
8.0.70.0050.00216.70
8.0.60.0030.00516.66
8.0.50.0040.00416.87
8.0.30.0110.00817.07
8.0.20.0070.01217.40
8.0.10.0000.00816.82
8.0.00.0130.00316.72
7.4.330.0060.00015.55
7.4.320.0040.00416.43
7.4.300.0000.00716.53
7.4.290.0070.00016.57
7.4.280.0000.00716.54
7.4.270.0070.00016.52
7.4.260.0030.00316.46
7.4.250.0000.00716.50
7.4.240.0030.00316.47
7.4.230.0040.00416.30
7.4.220.0130.01316.43
7.4.210.0070.00716.44
7.4.200.0030.00316.48
7.4.160.0040.01416.29
7.4.150.0160.00617.40
7.4.140.0070.01117.86
7.4.130.0030.01716.28
7.4.120.0110.00716.45
7.4.110.0060.01016.43
7.4.100.0170.00716.50
7.4.90.0150.00416.44
7.4.80.0160.00517.99
7.4.70.0060.01216.41
7.4.60.0110.01016.56
7.4.50.0140.00516.40
7.4.40.0100.00716.58
7.4.30.0110.00816.50
7.4.20.0110.00816.59
7.4.10.0120.01016.41
7.4.00.0100.00715.55
7.3.330.0030.00313.21
7.3.320.0000.00513.17
7.3.310.0030.00316.16
7.3.300.0080.00016.17
7.3.290.0090.00716.24
7.3.280.0070.01016.24
7.3.270.0110.00817.40
7.3.260.0090.01016.53
7.3.250.0070.01416.56
7.3.240.0120.00616.45
7.3.230.0150.00316.34
7.3.220.0150.01116.30
7.3.210.0090.00916.33
7.3.200.0130.00716.46
7.3.190.0110.00816.48
7.3.180.0110.00516.46
7.3.170.0090.00816.41
7.3.160.0040.01216.39
7.3.150.0030.01416.17
7.3.140.0000.01816.38
7.3.130.0190.00416.60
7.3.120.0110.00616.25
7.3.110.0110.00616.50
7.3.100.0120.01216.17
7.3.90.0120.01216.25
7.3.80.0110.00916.15
7.3.70.0110.01216.34
7.3.60.0160.00316.40
7.3.50.0030.01516.32
7.3.40.0120.00916.29
7.3.30.0110.00716.36
7.3.20.0080.01416.39
7.3.10.0130.00516.53
7.3.00.0040.01916.37
7.2.340.0070.01316.31
7.2.330.0050.01216.45
7.2.320.0100.00916.54
7.2.310.0120.01116.56
7.2.300.0150.00416.54
7.2.290.0080.01016.40
7.2.280.0100.01016.48
7.2.270.0070.01116.48
7.2.260.0110.00816.53
7.2.250.0120.00616.48
7.2.240.0120.01116.63
7.2.230.0120.01616.29
7.2.220.0090.00916.46
7.2.210.0110.00616.54
7.2.200.0090.01216.20
7.2.190.0060.01316.67
7.2.180.0100.00916.51
7.2.170.0070.01116.48
7.2.160.0090.01216.37
7.2.150.1400.00616.47
7.2.140.0120.01116.38
7.2.130.0160.01116.56
7.2.120.0090.00916.55
7.2.110.0050.01616.47
7.2.100.0050.01416.67
7.2.90.0100.01216.52
7.2.80.0070.01116.47
7.2.70.0060.01516.51
7.2.60.0070.01316.72
7.2.50.0170.00716.44
7.2.40.0160.00416.36
7.2.30.0160.00716.39
7.2.20.0110.01116.26
7.2.10.0130.01616.53
7.2.00.0260.00816.45
7.1.330.0170.01715.65
7.1.320.0240.00715.45
7.1.310.0200.01315.59
7.1.300.0230.01015.41
7.1.290.0190.01415.58
7.1.280.0300.00615.70
7.1.270.0250.00815.51
7.1.260.0220.01115.62
7.1.250.0230.00915.46
7.1.240.0250.00915.48
7.1.230.0220.01115.45
7.1.220.0280.00515.48
7.1.210.0220.00915.61
7.1.200.0170.00615.67
7.1.190.0310.00415.57
7.1.180.0180.01115.70
7.1.170.0210.01215.34
7.1.160.0280.00415.39
7.1.150.0230.01115.55
7.1.140.0200.01015.71
7.1.130.0170.01115.55
7.1.120.0240.00515.41
7.1.110.0280.00615.73
7.1.100.0590.01115.72
7.1.90.0260.00815.52
7.1.80.1170.01116.47
7.1.70.1170.01015.92
7.1.60.1200.01127.99
7.1.50.1250.01327.77
7.1.40.1180.01027.35
7.1.30.1310.01527.53
7.1.20.1130.01327.50
7.1.10.0970.01315.59
7.1.00.1020.01315.68
7.0.330.0260.00615.18
7.0.320.0250.00915.18
7.0.310.0260.00315.35
7.0.300.0230.00715.19
7.0.290.0320.00715.35
7.0.280.0260.00615.14
7.0.270.0410.00715.13
7.0.260.0310.00015.32
7.0.250.0240.00515.20
7.0.240.0230.00715.21
7.0.230.0220.00715.26
7.0.220.0230.01115.28
7.0.210.0220.00815.30
7.0.200.1210.01115.64
7.0.190.1230.01415.65
7.0.180.1070.01215.25
7.0.170.0970.01415.20
7.0.160.1090.00815.31
7.0.150.0900.01115.27
7.0.140.1030.00815.48
7.0.130.1340.01015.43
7.0.120.1110.00815.36
7.0.110.1180.00915.27
7.0.100.1150.01115.28
7.0.90.1040.01115.37
7.0.80.1130.00715.53
7.0.70.1160.01115.31
7.0.60.1090.01315.16
7.0.50.1340.00915.47
7.0.40.1420.01415.42
7.0.30.1380.01115.52
7.0.20.1170.01115.51
7.0.10.1260.01015.47
7.0.00.1240.01015.43
5.6.400.0260.01415.79
5.6.390.0240.01615.87
5.6.380.0220.01115.75
5.6.370.0170.01715.79
5.6.360.0250.01115.59
5.6.350.0200.01315.95
5.6.340.0220.01215.95
5.6.330.0200.01215.96
5.6.320.0150.02015.95
5.6.310.0180.01516.10
5.6.300.0240.00915.89
5.6.290.0320.00015.91
5.6.280.0220.01216.06
5.6.270.0250.00715.76
5.6.260.0220.01415.90
5.6.250.0150.01515.70
5.6.240.0290.00716.00
5.6.230.0210.00915.64
5.6.220.0290.00515.77
5.6.210.0200.01815.79
5.6.200.0320.00615.90
5.6.190.0270.01015.70
5.6.180.0180.02015.75
5.6.170.0220.00816.02
5.6.160.0200.01316.06
5.6.150.0200.01415.87
5.6.140.0260.00616.07
5.6.130.0210.01515.77
5.6.120.0220.01115.88
5.6.110.0260.00915.80
5.6.100.0220.00915.71
5.6.90.0270.00415.96
5.6.80.0240.00615.77
5.6.70.0180.01115.83
5.6.60.0220.00816.05
5.6.50.0200.01515.86
5.6.40.0200.00915.54
5.6.30.0150.01615.88
5.6.20.0200.01515.66
5.6.10.0220.01415.86
5.6.00.0170.01715.74

preferences:
32.36 ms | 403 KiB | 5 Q