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.40.0110.00418.92
8.3.30.0070.00719.22
8.3.20.0040.00420.33
8.3.10.0040.00421.76
8.3.00.0080.00019.02
8.2.170.0030.01722.96
8.2.160.0080.00520.43
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0030.01426.16
8.2.120.0080.00021.00
8.2.110.0000.01022.29
8.2.100.0070.00419.46
8.2.90.0030.00519.36
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0030.00618.05
8.2.50.0030.00618.07
8.2.40.0000.00921.23
8.2.30.0050.00218.27
8.2.20.0060.00317.90
8.2.10.0050.00318.06
8.2.00.0050.00317.71
8.1.270.0000.00822.23
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0040.00423.91
8.1.230.0120.00019.23
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0080.00017.36
8.1.180.0070.00718.10
8.1.170.0080.00018.71
8.1.160.0000.00722.04
8.1.150.0000.00718.99
8.1.140.0000.00817.66
8.1.130.0020.00517.84
8.1.120.0050.00217.53
8.1.110.0040.00417.63
8.1.100.0040.00417.55
8.1.90.0000.00717.63
8.1.80.0020.00517.60
8.1.70.0030.00317.56
8.1.60.0040.00417.62
8.1.50.0050.00317.70
8.1.40.0060.00317.69
8.1.30.0040.00417.85
8.1.20.0000.00817.72
8.1.10.0000.00817.71
8.1.00.0030.00717.64
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0030.00318.38
8.0.270.0000.00717.34
8.0.260.0080.00017.28
8.0.250.0000.00716.99
8.0.240.0040.00417.17
8.0.230.0020.00517.13
8.0.220.0040.00417.02
8.0.210.0030.00317.04
8.0.200.0000.00717.11
8.0.190.0050.00217.00
8.0.180.0000.00717.11
8.0.170.0040.00416.92
8.0.160.0030.00617.06
8.0.150.0000.00716.83
8.0.140.0000.01016.98
8.0.130.0070.00213.53
8.0.120.0000.00816.87
8.0.110.0000.00717.04
8.0.100.0080.00017.07
8.0.90.0030.00516.85
8.0.80.0030.01316.92
8.0.70.0050.00317.08
8.0.60.0000.00717.00
8.0.50.0040.00416.93
8.0.30.0090.01117.34
8.0.20.0090.01217.40
8.0.10.0070.00017.15
8.0.00.0070.01016.70
7.4.330.0030.00315.03
7.4.320.0000.00616.73
7.4.300.0000.00716.66
7.4.290.0050.00216.74
7.4.280.0030.00616.63
7.4.270.0070.00016.76
7.4.260.0030.00316.66
7.4.250.0040.00416.66
7.4.240.0020.00516.74
7.4.230.0030.00316.76
7.4.220.0140.00316.71
7.4.210.0070.01316.82
7.4.200.0050.00316.77
7.4.160.0180.00416.70
7.4.150.0120.00617.40
7.4.140.0100.00817.86
7.4.130.0150.00616.67
7.4.120.0110.00516.59
7.4.110.0180.00316.50
7.4.100.0060.01116.64
7.4.90.0070.01016.48
7.4.80.0060.01219.39
7.4.70.0150.00916.66
7.4.60.0120.00916.63
7.4.50.0000.00816.52
7.4.40.0130.00316.73
7.4.30.0070.01016.59
7.4.10.0070.01115.26
7.4.00.0070.00715.07
7.3.330.0000.00513.16
7.3.320.0000.00513.15
7.3.310.0070.00016.39
7.3.300.0000.00716.45
7.3.290.0110.00516.32
7.3.280.0060.01116.26
7.3.270.0100.01417.40
7.3.260.0150.00616.52
7.3.240.0100.00716.50
7.3.230.0100.01016.54
7.3.210.0130.00316.33
7.3.200.0070.01019.39
7.3.190.0120.00416.66
7.3.180.0140.00416.73
7.3.170.0070.01016.80
7.3.160.0120.00916.39
7.3.130.0120.00614.68
7.3.120.0090.00414.93
7.3.110.0100.01014.94
7.3.100.0000.00815.02
7.3.90.0060.00315.03
7.3.80.0090.00614.72
7.3.70.0000.00915.02
7.3.60.0100.00314.79
7.3.50.0030.01514.48
7.3.40.0000.01015.03
7.3.30.0090.00615.05
7.3.20.0070.00716.60
7.3.10.0030.01316.79
7.3.00.0070.00316.41
7.2.330.0030.01316.82
7.2.320.0060.01316.77
7.2.310.0090.01216.87
7.2.300.0090.00917.00
7.2.290.0150.00816.94
7.2.260.0100.00715.44
7.2.250.0060.01315.16
7.2.240.0060.00615.29
7.2.230.0110.00715.38
7.2.220.0070.01015.05
7.2.210.0040.01115.24
7.2.200.0140.00015.21
7.2.190.0070.00715.11
7.2.180.0030.01215.10
7.2.170.0120.00415.16
7.2.160.0030.01314.88
7.2.150.0040.00717.16
7.2.140.0120.00317.07
7.2.130.0040.01116.75
7.2.120.0060.00316.92
7.2.110.0120.00417.23
7.2.100.0060.00917.18
7.2.90.0130.00317.19
7.2.80.0040.01516.92
7.2.70.0060.00916.73
7.2.60.0110.00416.95
7.2.50.0000.01717.06
7.2.40.0090.00617.03
7.2.30.0040.01116.91
7.2.20.0090.00616.80
7.2.10.0030.01017.02
7.2.00.0070.00518.30
7.1.330.0070.00716.14
7.1.320.0120.00316.07
7.1.310.0030.01016.06
7.1.300.0040.00816.02
7.1.290.0050.00515.52
7.1.280.0070.00716.11
7.1.270.0070.00715.98
7.1.260.0060.00616.06
7.1.250.0090.00315.89
7.1.240.0000.01215.78
7.1.230.0000.01416.01
7.1.220.0030.01015.60
7.1.210.0040.01115.73
7.1.200.0090.00616.14
7.1.190.0080.00316.11
7.1.180.0030.01015.90
7.1.170.0040.01115.75
7.1.160.0080.00416.05
7.1.150.0110.00415.79
7.1.140.0120.00316.03
7.1.130.0000.01416.00
7.1.120.0080.00515.70
7.1.110.0070.00416.02
7.1.100.0050.00817.16
7.1.90.0090.00615.95
7.1.80.0070.00716.14
7.1.70.0020.00716.61
7.1.60.0050.00917.81
7.1.50.0060.01416.58
7.1.40.0080.00815.99
7.1.30.0000.01616.05
7.1.20.0000.01415.89
7.1.10.0070.00715.92
7.1.00.0040.04419.17
7.0.330.0040.00815.54
7.0.320.0070.00715.61
7.0.310.0040.01115.59
7.0.300.0000.01515.75
7.0.290.0040.00415.54
7.0.280.0040.01115.48
7.0.270.0070.00315.45
7.0.260.0070.00715.11
7.0.250.0000.01615.68
7.0.240.0030.00915.57
7.0.230.0080.00815.65
7.0.220.0000.01515.66
7.0.210.0060.00615.60
7.0.200.0090.00216.12
7.0.190.0040.00815.67
7.0.180.0040.00415.63
7.0.170.0040.00815.70
7.0.160.0030.00715.62
7.0.150.0060.01115.55
7.0.140.0030.02218.63
7.0.130.0100.00315.43
7.0.120.0060.00615.39
7.0.110.0060.00915.18
7.0.100.0110.00315.54
7.0.90.0100.00715.56
7.0.80.0060.00615.62
7.0.70.0080.00815.70
7.0.60.0060.04117.75
7.0.50.0080.04516.78
7.0.40.0080.03016.89
7.0.30.0140.02516.88
7.0.20.0200.03816.79
7.0.10.0090.03516.91
7.0.00.0110.04317.01
5.6.400.0070.00714.50
5.6.390.0040.01114.65
5.6.380.0080.00314.33
5.6.370.0080.00514.64
5.6.360.0060.00914.42
5.6.350.0060.00614.36
5.6.340.0040.00714.19
5.6.330.0060.00914.73
5.6.320.0060.00313.91
5.6.310.0100.00014.76
5.6.300.0030.01014.16
5.6.290.0100.00714.60
5.6.280.0050.04017.71
5.6.270.0030.00814.29
5.6.260.0120.00314.34
5.6.250.0000.00914.41
5.6.240.0030.01414.37
5.6.230.0060.00314.52
5.6.220.0090.00614.37
5.6.210.0050.03117.41
5.6.200.0030.04716.27
5.6.190.0040.02617.47
5.6.180.0250.02217.34
5.6.170.0200.04017.42
5.6.160.0000.03017.46
5.6.150.0030.04616.22
5.6.140.0080.04416.29
5.6.130.0080.02616.40
5.6.120.0120.03917.70
5.6.110.0070.03717.63
5.6.100.0130.03817.75
5.6.90.0060.02517.74
5.6.80.0080.03717.32
5.6.70.0130.00314.43
5.6.60.0100.00314.23
5.6.50.0090.00314.13
5.6.40.0030.01014.48
5.6.30.0030.00714.04
5.6.20.0090.00014.28
5.6.10.0070.00714.40
5.6.00.0120.00014.47
5.5.380.0040.00814.42
5.5.370.0060.00614.45
5.5.360.0090.00614.43
5.5.350.0100.03517.35
5.5.340.0120.03016.29
5.5.330.0030.03017.33
5.5.320.0280.03117.47
5.5.310.0130.05017.15
5.5.300.0070.04516.13
5.5.290.0050.02716.16
5.5.280.0060.02617.54
5.5.270.0020.03517.53
5.5.260.0020.03917.57
5.5.250.0100.02217.54
5.5.240.0080.03317.24
5.5.230.0090.00614.29
5.5.220.0090.00314.11
5.5.210.0050.00314.39
5.5.200.0040.01114.34
5.5.190.0030.01314.02
5.5.180.0080.00414.21
5.5.170.0060.00614.57
5.5.160.0080.00614.10
5.5.150.0030.00914.23
5.5.140.0060.00613.91
5.5.130.0000.01114.16
5.5.120.0060.00314.09
5.5.110.0060.00314.48
5.5.100.0030.00714.41
5.5.90.0040.01114.34
5.5.80.0030.00614.30
5.5.70.0050.00314.29
5.5.60.0090.00314.44
5.5.50.0070.00714.39
5.5.40.0040.00414.17
5.5.30.0060.00914.20
5.5.20.0000.01614.12
5.5.10.0080.00414.50
5.5.00.0040.00814.30
5.4.450.0390.03115.25
5.4.440.0130.04815.31
5.4.430.0070.02915.15
5.4.420.0080.03215.34
5.4.410.0100.02715.13
5.4.400.0080.03015.35
5.4.390.0040.03215.24
5.4.380.0070.03015.16
5.4.370.0080.02714.82
5.4.360.0070.03214.80
5.4.350.0120.02514.74
5.4.340.0060.03014.90
5.4.330.0050.00510.82
5.4.320.0060.03414.88
5.4.310.0070.03114.76
5.4.300.0050.03214.68
5.4.290.0170.03214.76
5.4.280.0120.02714.96
5.4.270.0150.02514.84
5.4.260.0070.03214.85
5.4.250.0050.03514.74
5.4.240.0130.02314.72
5.4.230.0050.03414.87
5.4.220.0030.03814.87
5.4.210.0070.03014.85
5.4.200.0100.02713.73
5.4.190.0070.03214.70
5.4.180.0120.03214.93
5.4.170.0080.03114.87
5.4.160.0160.02214.88
5.4.150.0060.03314.85
5.4.140.0100.02913.51
5.4.130.0150.02513.66
5.4.120.0050.03113.69
5.4.110.0090.02713.80
5.4.100.0110.02513.55
5.4.90.0100.02713.50
5.4.80.0120.02413.58
5.4.70.0080.02713.68
5.4.60.0090.03013.69
5.4.50.0030.03213.70
5.4.40.0050.03213.55
5.4.30.0100.02313.59
5.4.20.0050.03213.53
5.4.10.0080.02813.75
5.4.00.0080.02513.21
5.3.290.0100.05714.64
5.3.280.0230.04014.52
5.3.270.0170.05014.59
5.3.260.0200.05714.66
5.3.250.0200.04714.68
5.3.240.0270.03714.70
5.3.230.0200.04314.60
5.3.220.0170.05014.66
5.3.210.0100.05714.57
5.3.200.0200.04314.64
5.3.190.0030.06314.55
5.3.180.0100.05314.47
5.3.170.0200.04314.64
5.3.160.0030.05714.57
5.3.150.0170.04714.65
5.3.140.0070.05714.55
5.3.130.0100.05314.53
5.3.120.0130.05314.60
5.3.110.0130.05014.55
5.3.100.0230.04014.07
5.3.90.0030.06014.11
5.3.80.0130.04714.00
5.3.70.0000.06313.91
5.3.60.0070.05314.08
5.3.50.0070.05713.89
5.3.40.0130.05013.94
5.3.30.0130.04713.90
5.3.20.0070.05313.67
5.3.10.0130.04713.75
5.3.00.0070.05313.74
5.2.170.0100.06011.09
5.2.160.0100.05711.11
5.2.150.0130.05711.12
5.2.140.0200.05011.17
5.2.130.0130.05311.07
5.2.120.0270.03711.14
5.2.110.0070.04311.27
5.2.100.0130.03711.14
5.2.90.0100.04711.05
5.2.80.0230.04711.07
5.2.70.0100.06011.15
5.2.60.0130.04011.11
5.2.50.0070.04311.03
5.2.40.0130.03311.05
5.2.30.0170.03310.88
5.2.20.0100.04010.99
5.2.10.0100.04010.84
5.2.00.0130.03710.83
5.1.60.0100.03010.00
5.1.50.0100.03010.05
5.1.40.0030.0409.97
5.1.30.0070.03710.32
5.1.20.0100.03310.45
5.1.10.0100.03310.16
5.1.00.0100.03310.10
5.0.50.0030.0308.56
5.0.40.0030.0308.38
5.0.30.0070.0408.26
5.0.20.0070.0278.21
5.0.10.0070.0278.15
5.0.00.0070.0408.14
4.4.90.0070.0205.89
4.4.80.0070.0205.85
4.4.70.0030.0235.91
4.4.60.0100.0175.89
4.4.50.0100.0175.87
4.4.40.0030.0375.90
4.4.30.0070.0205.90
4.4.20.0070.0205.95
4.4.10.0070.0205.98
4.4.00.0070.0335.94
4.3.110.0000.0275.88
4.3.100.0070.0205.75
4.3.90.0100.0175.84
4.3.80.0070.0305.78
4.3.70.0070.0205.78
4.3.60.0030.0235.91
4.3.50.0070.0205.77
4.3.40.0070.0305.84
4.3.30.0030.0234.57
4.3.20.0000.0234.52
4.3.10.0030.0204.53
4.3.00.0100.0236.97

preferences:
85.89 ms | 400 KiB | 5 Q