3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'qwe <img src="http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg" /> sdfj <img src="http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg" style="width: 200px;" /> gbfkljho <img src=\'http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg\' /> sdfj <img src=\'http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg\' style=\'width: 200px;\' /> gbfkljho <img src=http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg /> sdfj <img style="width: 200px;" src=http://img7.arrivo.ru/inlabu/47/0/sfsjho.jpg /> gbfkljho'; $oldImage = [ 'path' => 'inlabu', 'id' => 47, 'url' => 'sfsjho.jpg', ]; $text = preg_replace('|<img(?!.*width)(.+)http://img7\.arrivo\.ru/'.$oldImage['path'].'/'.$oldImage['id'].'/\d/'.str_replace('.', '\.', urlencode($oldImage['url'])).'(?!.*width)(.*)>|U', '<img\\1\\2http://google.com\\3\\4>', $text); var_dump($text);

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.0140.00018.31
8.3.50.0150.00323.00
8.3.40.0110.00418.96
8.3.30.0100.00719.22
8.3.20.0040.00420.34
8.3.10.0000.00721.73
8.3.00.0040.00418.92
8.2.180.0110.01116.75
8.2.170.0110.00722.96
8.2.160.0100.00320.26
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00626.16
8.2.120.0000.00821.06
8.2.110.0030.00622.36
8.2.100.0110.00018.03
8.2.90.0040.00419.09
8.2.80.0030.00518.95
8.2.70.0060.00317.75
8.2.60.0000.00817.88
8.2.50.0080.00019.45
8.2.40.0000.00819.65
8.2.30.0080.00018.34
8.2.20.0030.00518.01
8.2.10.0070.00018.20
8.2.00.0000.00717.79
8.1.280.0130.00325.92
8.1.270.0000.00823.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0110.00023.87
8.1.230.0090.00318.89
8.1.220.0040.00418.78
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0050.00817.22
8.1.180.0060.00318.10
8.1.170.0030.00517.62
8.1.160.0040.00421.97
8.1.150.0040.00418.90
8.1.140.0030.00617.68
8.1.130.0030.00317.89
8.1.120.0020.00517.51
8.1.110.0040.00417.63
8.1.100.0070.00017.57
8.1.90.0070.00017.60
8.1.80.0030.00517.51
8.1.70.0070.00017.63
8.1.60.0080.00017.67
8.1.50.0030.00517.69
8.1.40.0040.00417.64
8.1.30.0000.00817.71
8.1.20.0050.00317.75
8.1.10.0000.00717.76
8.1.00.0000.01117.74
8.0.300.0070.00018.77
8.0.290.0030.00616.88
8.0.280.0030.00518.38
8.0.270.0040.00417.16
8.0.260.0000.00817.23
8.0.250.0000.00717.09
8.0.240.0000.00717.11
8.0.230.0030.00316.99
8.0.220.0030.00416.92
8.0.210.0000.00716.96
8.0.200.0000.00717.00
8.0.190.0030.00317.19
8.0.180.0000.00717.06
8.0.170.0000.00817.05
8.0.160.0050.00317.07
8.0.150.0000.00717.03
8.0.140.0060.00617.00
8.0.130.0040.00713.43
8.0.120.0040.00416.98
8.0.110.0050.00217.03
8.0.100.0070.00017.02
8.0.90.0070.00017.12
8.0.80.0000.01517.09
8.0.70.0000.00817.09
8.0.60.0000.00717.10
8.0.50.0080.00016.96
8.0.30.0140.00617.18
8.0.20.0080.01117.50
8.0.10.0070.00017.15
8.0.00.0070.01017.03
7.4.330.0000.00515.03
7.4.320.0000.00616.82
7.4.300.0000.00616.57
7.4.290.0030.00316.82
7.4.280.0000.00816.81
7.4.270.0070.00016.83
7.4.260.0030.00316.80
7.4.250.0000.00816.74
7.4.240.0030.00516.84
7.4.230.0030.00316.86
7.4.220.0070.01816.84
7.4.210.0100.00616.77
7.4.200.0000.00716.75
7.4.160.0030.01416.71
7.4.150.0090.00917.40
7.4.140.0100.00717.86
7.4.130.0120.00516.67
7.4.120.0110.00616.62
7.4.110.0090.01516.62
7.4.100.0080.01116.79
7.4.90.0080.00816.54
7.4.80.0110.00919.39
7.4.70.0060.01216.81
7.4.60.0100.01416.73
7.4.50.0000.00416.75
7.4.40.0030.01516.71
7.4.30.0100.00616.67
7.4.00.0030.01215.31
7.3.330.0030.00313.39
7.3.320.0000.00513.18
7.3.310.0000.00716.36
7.3.300.0070.00016.41
7.3.290.0090.00816.39
7.3.280.0080.01016.36
7.3.270.0150.00317.40
7.3.260.0140.00716.68
7.3.250.0070.01316.53
7.3.240.0060.01616.93
7.3.230.0130.00316.39
7.3.210.0060.00916.51
7.3.200.0060.01319.39
7.3.190.0050.01116.54
7.3.180.0090.00616.58
7.3.170.0070.01016.42
7.3.160.0100.00616.57
7.3.00.0160.00316.57
7.2.330.0060.01116.77
7.2.320.0100.01316.94
7.2.310.0070.01016.86
7.2.300.0110.00716.76
7.2.290.0030.01616.77
7.2.130.0090.00617.14
7.2.120.0120.00417.00
7.2.110.0060.00617.03
7.2.100.0030.00817.06
7.2.90.0080.00616.74
7.2.80.0080.00517.12
7.2.70.0070.01016.87
7.2.60.0030.01017.21
7.2.50.0040.00717.20
7.2.40.0030.01017.23
7.2.30.0030.01217.26
7.2.20.0070.00716.99
7.2.10.0060.00616.82
7.2.00.0050.00718.40
7.1.250.0080.00815.84
7.1.240.0030.00915.63
7.1.230.0030.01016.11
7.1.220.0100.00316.05
7.1.210.0060.00615.95
7.1.200.0040.00715.82
7.1.190.0150.00016.15
7.1.180.0050.00516.13
7.1.170.0030.00716.10
7.1.160.0100.00715.74
7.1.150.0000.00915.98
7.1.140.0040.00816.05
7.1.130.0060.00616.08
7.1.120.0000.01015.73
7.1.110.0040.00715.72
7.1.100.0070.00517.06
7.1.90.0060.00615.83
7.1.80.0080.00815.99
7.1.70.0030.00716.62
7.1.60.0080.01117.83
7.1.50.0030.01216.38
7.1.40.0000.01415.90
7.1.30.0000.01015.89
7.1.20.0100.00316.07
7.1.10.0030.01015.68
7.1.00.0050.03819.13
7.0.330.0330.00015.63
7.0.320.0080.00415.55
7.0.310.0030.01015.22
7.0.300.0070.00315.59
7.0.290.0000.00915.44
7.0.280.0040.00415.63
7.0.270.0160.00415.50
7.0.260.0080.00415.69
7.0.250.0100.00015.50
7.0.240.0090.00315.59
7.0.230.0070.00715.70
7.0.220.0070.00715.29
7.0.210.0070.00315.69
7.0.200.0070.00416.22
7.0.190.0050.00515.68
7.0.180.0070.00415.39
7.0.170.0150.00415.63
7.0.160.0110.00315.46
7.0.150.0040.01115.52
7.0.140.0030.02218.90
7.0.130.0060.00615.64
7.0.120.0040.01115.42
7.0.110.0080.00415.68
7.0.100.0160.00015.53
7.0.90.0000.01015.39
7.0.80.0030.00715.70
7.0.70.0000.01115.62
7.0.60.0070.04517.84
7.0.50.0070.04416.69
7.0.40.0100.04316.66
7.0.30.0150.02216.93
7.0.20.0200.03916.87
7.0.10.0080.04016.73
7.0.00.0030.04917.01
5.6.380.0040.00814.63
5.6.370.0060.00614.51
5.6.360.0060.00614.61
5.6.350.0030.01213.96
5.6.340.0120.00014.34
5.6.330.0070.00314.34
5.6.320.0060.01114.45
5.6.310.0090.00314.16
5.6.300.0110.00314.52
5.6.290.0060.00614.55
5.6.280.0030.04217.55
5.6.270.0130.00014.55
5.6.260.0070.01114.48
5.6.250.0090.00514.40
5.6.240.0030.01014.24
5.6.230.0030.00914.38
5.6.220.0060.00914.29
5.6.210.0050.02817.38
5.6.200.0050.04216.19
5.6.190.0050.03317.42
5.6.180.0250.03617.36
5.6.170.0150.04517.26
5.6.160.0080.04317.38
5.6.150.0020.02816.29
5.6.140.0070.03016.25
5.6.130.0020.04716.41
5.6.120.0100.03717.62
5.6.110.0000.04317.66
5.6.100.0050.04617.55
5.6.90.0090.04217.64
5.6.80.0080.02917.43
5.6.70.0040.00814.32
5.6.60.0000.00914.15
5.6.50.0090.00914.39
5.6.40.0030.01214.50
5.6.30.0040.00714.35
5.6.20.0060.00614.59
5.6.10.0050.00514.55
5.6.00.0050.00514.45
5.5.380.0000.00911.08
5.5.370.0060.00311.26
5.5.360.0000.00611.16
5.5.350.0110.04115.71
5.5.340.0000.02814.54
5.5.330.0080.02115.68
5.5.320.0180.04315.61
5.5.310.0160.03315.71
5.5.300.0050.02314.56
5.5.290.0020.04714.46
5.5.280.0100.04115.89
5.5.270.0140.02615.89
5.5.260.0100.04315.99
5.5.250.0030.02415.89
5.5.240.0010.03315.52
5.5.230.0070.00311.11
5.5.220.0070.00311.00
5.5.210.0060.00611.14
5.5.200.0030.00611.13
5.5.190.0030.00711.21
5.5.180.0040.00410.87
5.5.170.0040.00411.13
5.5.160.0090.00311.23
5.5.150.0050.00911.00
5.5.140.0000.00811.02
5.5.130.0060.00610.89
5.5.120.0070.00411.17
5.5.110.0070.00411.01
5.5.100.0000.00810.94
5.5.90.0040.00411.00
5.5.80.0040.00411.36
5.5.70.0060.00311.16
5.5.60.0070.00711.02
5.5.50.0000.00911.07
5.5.40.0050.00811.07
5.5.30.0000.00910.75
5.5.20.0050.00311.11
5.5.10.0060.00310.89
5.5.00.0070.00010.95
5.4.450.0480.03315.19
5.4.440.0100.02815.35
5.4.430.0030.03115.22
5.4.420.0070.03215.26
5.4.410.0000.03814.98
5.4.400.0050.03215.18
5.4.390.0140.02214.93
5.4.380.0120.02715.06
5.4.370.0130.02314.76
5.4.360.0120.02814.82
5.4.350.0130.02814.99
5.4.340.0080.03014.92
5.4.330.0000.01111.34
5.4.320.0130.03714.58
5.4.310.0130.03514.80
5.4.300.0070.04114.74
5.4.290.0080.03214.67
5.4.280.0060.02914.72
5.4.270.0080.03014.73
5.4.260.0140.03314.89
5.4.250.0150.02414.77
5.4.240.0070.03115.02
5.4.230.0070.02814.82
5.4.220.0050.03214.95
5.4.210.0120.02515.03
5.4.200.0090.02713.88
5.4.190.0120.02514.59
5.4.180.0090.02814.69
5.4.170.0100.02914.70
5.4.160.0160.02114.72
5.4.150.0070.03014.66
5.4.140.0000.03613.53
5.4.130.0050.03013.52
5.4.120.0060.02913.55
5.4.110.0120.02213.46
5.4.100.0140.02113.54
5.4.90.0100.02613.44
5.4.80.0080.02913.65
5.4.70.0080.04213.59
5.4.60.0080.03313.60
5.4.50.0100.03113.62
5.4.40.0080.02713.58
5.4.30.0050.03113.51
5.4.20.0100.03013.71
5.4.10.0140.02013.57
5.4.00.0080.02613.35
5.3.290.0100.02812.48
5.3.280.0100.02612.33
5.3.270.0030.03512.36
5.3.260.0100.02612.41
5.3.250.0070.02812.39
5.3.240.0110.02612.36
5.3.230.0090.02912.33
5.3.220.0130.02612.28
5.3.210.0120.02512.24
5.3.200.0030.03212.34
5.3.190.0060.02912.25
5.3.180.0070.02812.48
5.3.170.0110.02512.45
5.3.160.0100.02612.37
5.3.150.0070.03212.40
5.3.140.0050.03012.43
5.3.130.0080.03012.43
5.3.120.0080.02812.37
5.3.110.0110.02612.34
5.3.100.0170.01812.10
5.3.90.0080.02612.13
5.3.80.0070.03012.08
5.3.70.0050.03411.96
5.3.60.0120.03211.99
5.3.50.0100.02511.98
5.3.40.0050.03011.96
5.3.30.0130.02011.88
5.3.20.0070.02711.89
5.3.10.0060.02811.76
5.3.00.0070.02711.75
5.2.170.0090.02010.19
5.2.160.0090.01710.28
5.2.150.0050.02410.17
5.2.140.0080.02010.23
5.2.130.0050.02510.18
5.2.120.0080.02010.20
5.2.110.0130.01510.10
5.2.100.0100.01810.11
5.2.90.0050.02210.24
5.2.80.0040.02310.11
5.2.70.0120.01710.21
5.2.60.0070.02210.04
5.2.50.0030.0259.99
5.2.40.0000.02710.01
5.2.30.0030.02510.07
5.2.20.0030.02610.00
5.2.10.0050.0229.95
5.2.00.0050.0239.84
5.1.60.0020.0229.56
5.1.50.0040.0199.47
5.1.40.0080.0169.53
5.1.30.0050.0219.71
5.1.20.0100.0179.72
5.1.10.0040.0199.58
5.1.00.0050.0209.54
5.0.50.0100.0108.78
5.0.40.0050.0188.74
5.0.30.0030.0258.63
5.0.20.0050.0158.63
5.0.10.0050.0138.62
5.0.00.0030.0238.60
4.4.90.0020.0147.45
4.4.80.0030.0127.44
4.4.70.0030.0137.43
4.4.60.0020.0147.42
4.4.50.0020.0137.43
4.4.40.0070.0237.40
4.4.30.0030.0127.44
4.4.20.0030.0147.48
4.4.10.0030.0127.47
4.4.00.0000.0207.46
4.3.110.0020.0147.42
4.3.100.0030.0137.37
4.3.90.0070.0087.39
4.3.80.0020.0207.45
4.3.70.0000.0167.38
4.3.60.0020.0147.39
4.3.50.0050.0157.38
4.3.40.0050.0157.37
4.3.30.0000.0146.80
4.3.20.0000.0136.79
4.3.10.0020.0166.77
4.3.00.0070.0137.98

preferences:
47.37 ms | 401 KiB | 5 Q