3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NukesSpam($input) { $blacklist = array('domain.com','visual.merriam-webster.com','example.com'); $output=$input; foreach $blacklist as $a_blacklisted { $output = preg_replace('/<img(.*?)src=.http(.*?)'.str_replace('.','\.',$a_blacklisted).'(.*?)>/', '<img src="http://standardsurvival.com/faces/64/drusz.png">', $input); } return $output; } echo NukesSpam('<img src="http://www.domain.com/test1.jpg">');

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)
5.4.260.0130.05718.98
5.4.250.0200.06718.98
5.4.240.0130.05318.93
5.4.230.0200.06018.76
5.4.220.0270.05718.79
5.4.210.0070.05318.80
5.4.200.0070.05718.76
5.4.190.0100.05719.08
5.4.180.0070.06318.73
5.4.170.0100.05319.07
5.4.160.0200.06019.01
5.4.150.0100.05018.97
5.4.140.0070.05016.31
5.4.130.0230.03316.28
5.4.120.0130.04316.49
5.4.110.0100.05316.52
5.4.100.0100.05016.46
5.4.90.0070.05016.46
5.4.80.0070.04716.31
5.4.70.0070.05016.46
5.4.60.0100.04716.38
5.4.50.0070.05016.46
5.4.40.0230.04716.36
5.4.30.0130.04316.53
5.4.20.0130.04716.30
5.4.10.0170.04716.62
5.4.00.0030.07715.87
5.3.280.0070.05014.56
5.3.270.0030.06014.50
5.3.260.0100.05714.79
5.3.250.0130.05314.68
5.3.240.0030.05314.76
5.3.230.0100.05014.77
5.3.220.0070.05014.65
5.3.210.0030.08014.73
5.3.200.0170.06014.63
5.3.190.0100.05314.78
5.3.180.0030.05714.73
5.3.170.0000.06014.55
5.3.160.0030.05014.57
5.3.150.0130.05014.65
5.3.140.0170.04014.62
5.3.130.0100.05014.71
5.3.120.0100.05714.55
5.3.110.0100.05014.45
5.3.100.0100.05314.05
5.3.90.0100.04714.09
5.3.80.0100.06014.00
5.3.70.0070.05013.85
5.3.60.0200.03714.08
5.3.50.0070.05013.95
5.3.40.0130.04714.03
5.3.30.0130.04313.97
5.3.20.0030.05013.85
5.3.10.0000.05713.65
5.3.00.0100.04713.71
5.2.170.0130.04011.12
5.2.160.0070.05310.97
5.2.150.0000.04711.31
5.2.140.0030.04311.12
5.2.130.0130.03311.16
5.2.120.0100.03311.17
5.2.110.0000.06011.31
5.2.100.0100.03711.16
5.2.90.0070.03711.09
5.2.80.0000.04311.17
5.2.70.0030.04710.99
5.2.60.0070.04011.13
5.2.50.0030.04311.11
5.2.40.0100.05010.82
5.2.30.0100.03310.95
5.2.20.0030.04311.03
5.2.10.0070.03711.08
5.2.00.0030.04310.80
5.1.60.0000.03710.15
5.1.50.0030.0439.92
5.1.40.0130.03310.07
5.1.30.0100.03310.41
5.1.20.0070.04010.42
5.1.10.0070.03310.13
5.1.00.0170.04010.03
5.0.50.0030.0408.63
5.0.40.0100.0238.46
5.0.30.0030.0478.05
5.0.20.0070.0238.39
5.0.10.0000.0338.13
5.0.00.0030.0408.00
4.4.90.0070.0306.90
4.4.80.0000.0236.90
4.4.70.0070.0176.90
4.4.60.0000.0236.90
4.4.50.0030.0206.90
4.4.40.0130.0306.90
4.4.30.0030.0206.90
4.4.20.0000.0336.90
4.4.10.0030.0236.90
4.4.00.0030.0436.90
4.3.110.0000.0236.90
4.3.100.0030.0206.90
4.3.90.0030.0206.90
4.3.80.0030.0336.90
4.3.70.0000.0236.90
4.3.60.0030.0206.90
4.3.50.0130.0206.90
4.3.40.0030.0306.90
4.3.30.0000.0236.90
4.3.20.0030.0206.90
4.3.10.0000.0236.90
4.3.00.0130.0209.30

preferences:
143.28 ms | 1394 KiB | 7 Q