3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageTag = '<img src = http://nycxplorer.com/wp-content/uploads/2012/02/bagel1-1.jpg >'; //grab the src portion of the image tag $srcPattern = "/src.*?=.*?(\s|>)/s"; preg_match($srcPattern, $imageTag, $srcParts); $srcPart = $srcParts[0]; //remove all whitespace from within and around the src portion $srcPart = trim(preg_replace('/[\s]+/','', $srcPart //grab the src URL $oldUrl = substr($srcPart, 4); //if there are quotes at the beginning of the url, cut them off if(strpos($oldUrl, '"') == 0 || strpos($oldUrl, "'") == 0) { $oldUrl = substr($oldUrl, 1, strlen($oldUrl)-2); } print_r($oldUrl); ?>

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.160.0030.03719.23
5.4.150.0130.07318.96
5.4.140.0030.06016.50
5.4.130.0000.04016.39
5.4.120.0070.03316.37
5.4.110.0030.03716.49
5.4.100.0100.07016.32
5.4.90.0070.06016.28
5.4.80.0070.07016.44
5.4.70.0030.07716.45
5.4.60.0100.07016.37
5.4.50.0070.06316.29
5.4.40.0000.07716.37
5.4.30.0030.05716.31
5.4.20.0070.03716.36
5.4.10.0170.06016.27
5.4.00.0000.05015.88
5.3.260.0030.06314.54
5.3.250.0030.08014.55
5.3.240.0000.04014.53
5.3.230.0170.05714.56
5.3.220.0070.03714.60
5.3.210.0000.04014.51
5.3.200.0100.06014.39
5.3.190.0030.05014.50
5.3.180.0200.06314.49
5.3.170.0070.05014.49
5.3.160.0030.05014.36
5.3.150.0100.04014.58
5.3.140.0100.05014.65
5.3.130.0030.07014.48
5.3.120.0000.05314.45
5.3.110.0130.04014.52
5.3.100.0130.07014.00
5.3.90.0000.05713.96
5.3.80.0070.04313.96
5.3.70.0130.04314.11
5.3.60.0030.03714.02
5.3.50.0100.06313.89
5.3.40.0030.08014.04
5.3.30.0100.06713.86
5.3.20.0100.05713.52
5.3.10.0000.04013.59
5.3.00.0000.07013.57

preferences:
138.8 ms | 1394 KiB | 7 Q