3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = '<img src="source.jpg">'; $string = '<div id="pf1" class="pf w0 h0" data-page-no="1"> <div class="pc pc1 w0 h0"> <img class="bi x0 y0 w0 h0" alt="" src="../images/cover.jpg"/> </div>'; $find = '/<img(.*?)\/>/'; echo preg_replace($find, $source, $string);

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.0110.01017.68
8.4.130.0080.00118.07
8.4.120.0050.00320.81
8.4.110.0110.00918.02
8.4.100.0130.00817.99
8.4.90.0070.00420.78
8.4.80.0060.00418.89
8.4.70.0100.00320.56
8.4.60.0120.00320.39
8.4.50.0080.01118.66
8.4.40.0140.00717.78
8.4.30.0090.00920.55
8.4.20.0080.00520.81
8.4.10.0160.00319.54
8.3.270.0120.00916.62
8.3.260.0080.00616.86
8.3.250.0110.00718.65
8.3.240.0070.00316.44
8.3.230.0040.00616.53
8.3.220.0020.00619.05
8.3.210.0080.01216.81
8.3.200.0030.00616.54
8.3.190.0080.01017.01
8.3.180.0120.00718.80
8.3.170.0030.01419.00
8.3.160.0150.00316.63
8.3.150.0120.00617.16
8.3.140.0140.00420.79
8.3.130.0050.00518.28
8.3.120.0050.00520.69
8.3.110.0130.00620.94
8.3.100.0050.00324.06
8.3.90.0000.00826.77
8.3.80.0030.00617.97
8.3.70.0100.00616.38
8.3.60.0160.00018.09
8.3.50.0080.00524.63
8.3.40.0140.00718.97
8.3.30.0040.01418.76
8.3.20.0070.00020.90
8.3.10.0040.00423.48
8.3.00.0070.00020.71
8.2.290.0160.00616.79
8.2.280.0100.00820.05
8.2.270.0110.00716.47
8.2.260.0040.00416.93
8.2.250.0090.00018.59
8.2.240.0150.00416.99
8.2.230.0060.00322.58
8.2.220.0080.00037.54
8.2.210.0080.00026.77
8.2.200.0080.00016.75
8.2.190.0030.01718.33
8.2.180.0030.01318.66
8.2.170.0160.00622.96
8.2.160.0110.00422.02
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0090.00026.16
8.2.120.0080.00019.83
8.2.110.0070.00820.58
8.2.100.0090.00718.60
8.2.90.0120.01018.44
8.2.80.0080.00619.04
8.2.70.0080.00818.36
8.2.60.0110.00818.54
8.2.50.0180.00518.54
8.2.40.0100.00118.54
8.2.30.0090.00318.63
8.2.20.0060.00618.60
8.2.10.0140.00418.82
8.2.00.0090.00519.04
8.1.330.0090.01116.39
8.1.320.0120.00716.30
8.1.310.0030.00516.75
8.1.300.0000.00819.87
8.1.290.0000.01018.88
8.1.280.0120.00425.92
8.1.270.0050.00324.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00321.29
8.1.230.0100.00420.64
8.1.220.0140.00618.16
8.1.210.0050.00719.31
8.1.200.0170.00617.79
8.1.190.0070.01117.82
8.1.180.0090.00418.26
8.1.170.0040.00718.49
8.1.160.0010.01018.74
8.1.150.0100.00619.33
8.1.140.0100.00418.62
8.1.130.0090.00419.12
8.1.120.0050.00918.20
8.1.110.0110.00418.29
8.1.100.0080.00618.32
8.1.90.0080.00618.24
8.1.80.0070.00618.32
8.1.70.0090.00418.35
8.1.60.0130.00318.39
8.1.50.0140.00918.33
8.1.40.0130.00718.40
8.1.30.0130.00718.49
8.1.20.0150.00918.50
8.1.10.0150.00418.27
8.1.00.0110.00618.28
8.0.300.0090.01018.75
8.0.290.0150.00517.40
8.0.280.0080.00618.21
8.0.270.0150.00617.77
8.0.260.0160.00318.65
8.0.250.0150.00417.70
8.0.240.0070.00617.74
8.0.230.0090.00517.81
8.0.220.0080.00317.65
8.0.210.0140.00417.71
8.0.200.0130.00517.67
8.0.190.0100.00817.65
8.0.180.0090.00717.70
8.0.170.0150.00317.65
8.0.160.0110.00917.69
8.0.150.0170.00517.54
8.0.140.0130.00517.62
8.0.130.0140.00416.51
8.0.120.0130.00517.51
8.0.110.0140.00517.61
8.0.100.0150.00517.51
8.0.90.0110.00517.56
8.0.80.0150.00517.61
8.0.70.0120.00617.58
8.0.60.0080.00717.59
8.0.50.0100.00617.56
8.0.30.0100.00517.73
8.0.20.0130.00717.76
8.0.10.0110.00317.69
8.0.00.0090.00717.91
7.4.330.0080.00315.51
7.4.320.0110.00517.84
7.4.300.0100.00417.29
7.4.290.0040.00817.42
7.4.280.0140.00517.33
7.4.270.0070.00517.40
7.4.260.0080.00416.25
7.4.250.0090.00317.38
7.4.240.0110.00117.17
7.4.230.0090.00717.27
7.4.220.0050.00717.19
7.4.210.0110.00617.40
7.4.200.0060.00717.28
7.4.190.0130.00717.80
7.4.180.0100.00717.81
7.4.160.0080.00817.69
7.4.150.0100.00817.69
7.4.140.0110.00517.64
7.4.130.0150.00717.36
7.4.120.0140.00317.28
7.4.110.0140.00817.37
7.4.100.0200.00417.35
7.4.90.0170.00517.39
7.4.80.0210.00518.25
7.4.70.0120.00917.27
7.4.60.0130.00417.11
7.4.50.0130.00716.92
7.4.40.0140.00716.94
7.4.30.0170.00517.06
7.4.20.0160.00517.05
7.4.10.0100.00716.90
7.4.00.0120.00516.63
7.3.330.0130.00617.51
7.3.320.0100.00515.98
7.3.310.0170.00317.13
7.3.300.0090.00417.12
7.3.290.0100.00616.70
7.3.280.0110.00816.89
7.3.270.0190.00717.50
7.3.260.0140.01017.03
7.3.250.0150.01117.39
7.3.240.0200.00517.17
7.3.230.0140.00917.07
7.3.220.0180.00917.35
7.3.210.0180.00717.03
7.3.200.0150.01017.02
7.3.190.0160.00716.90
7.3.180.0080.00916.70
7.3.170.0120.00416.81
7.3.160.0100.00916.77
7.3.150.0170.00316.63
7.3.140.0130.00516.82
7.3.130.0150.00716.91
7.3.120.0090.00916.89
7.3.110.0140.00616.42
7.3.100.0140.00616.34
7.3.90.0110.01016.47
7.3.80.0120.00816.29
7.3.70.0090.00716.43
7.3.60.0090.00816.51
7.3.50.0100.00616.57
7.3.40.0090.00816.48
7.3.30.0100.00716.50
7.3.20.0160.00416.85
7.3.10.0140.00716.80
7.3.00.0130.00316.82
7.2.340.0070.00418.43
7.2.330.0150.00617.27
7.2.320.0180.00517.21
7.2.310.0140.00416.96
7.2.300.0180.00417.14
7.2.290.0140.00816.85
7.2.280.0140.00817.09
7.2.270.0090.00816.95
7.2.260.0100.00717.14
7.2.250.0150.00217.03
7.2.240.0100.00716.70
7.2.230.0110.00816.65
7.2.220.0120.00716.59
7.2.210.0110.00616.57
7.2.200.0160.00616.73
7.2.190.0140.00716.63
7.2.180.0100.01016.59
7.2.170.0140.00716.62
7.2.160.0120.00816.72
7.2.150.0130.00617.00
7.2.140.0150.00817.06
7.2.130.0150.00317.15
7.2.120.0130.00817.11
7.2.110.0120.00717.03
7.2.100.0150.00717.04
7.2.90.0140.00817.07
7.2.80.0130.00917.07
7.2.70.0120.01017.05
7.2.60.0160.00817.13
7.2.50.0140.00717.13
7.2.40.0120.00717.02
7.2.30.0110.00917.12
7.2.20.0140.00516.96
7.2.10.0210.00617.13
7.2.00.0090.00817.18
7.1.330.0060.00816.08
7.1.320.0130.00816.07
7.1.310.0170.00515.98
7.1.300.0140.00816.05
7.1.290.0120.00816.03
7.1.280.0170.00316.06
7.1.270.0140.00716.04
7.1.260.0150.00716.02
7.1.250.0140.00715.95
7.1.240.0130.00816.46
7.1.230.0170.00416.46
7.1.220.0180.00516.46
7.1.210.0160.00516.58
7.1.200.0140.00716.51
7.1.190.0140.00816.49
7.1.180.0140.00516.39
7.1.170.0130.00516.71
7.1.160.0130.00416.42
7.1.150.0140.00516.44
7.1.140.0120.00616.54
7.1.130.0180.00416.39
7.1.120.0160.00716.47
7.1.110.0150.00416.58
7.1.100.0150.00616.50
7.1.90.0170.00816.48
7.1.80.0190.00416.56
7.1.70.0190.00516.43
7.1.60.0150.00716.55
7.1.50.0140.00616.53
7.1.40.0170.00616.57
7.1.30.0100.01116.67
7.1.20.0160.00716.52
7.1.10.0170.00816.51
7.1.00.0120.00616.52

preferences:
139.12 ms | 403 KiB | 5 Q