3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageTag = '<img src = http://nycxplorer.com/wp-content/uploads/2012/02/bagel1-1.jpg height="300" width="200">'; //remove all whitespace from within and around the src portion //$imageTag = trim(preg_replace('/[\s]+/','', $imageTag)); //print_r($imageTag . "\n"); //grab the src portion of the image tag $srcPattern = "/src.*?=.*?(\s|>)/s"; preg_match($srcPattern, $imageTag, $srcParts); $srcPart = $srcParts[0]; print_r($srcPart. "\n"); //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. "\n"); ?>

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.0060.01218.43
8.3.50.0150.00721.99
8.3.40.0040.01118.92
8.3.30.0140.00019.02
8.3.20.0040.00418.86
8.3.10.0040.00420.86
8.3.00.0040.00423.51
8.2.180.0060.01216.75
8.2.170.0090.00622.96
8.2.160.0030.01020.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00721.31
8.2.110.0090.00920.30
8.2.100.0040.00718.03
8.2.90.0050.00319.17
8.2.80.0080.00018.04
8.2.70.0060.00617.75
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0040.00421.28
8.2.20.0040.00417.97
8.2.10.0000.00717.83
8.2.00.0020.00917.92
8.1.280.0110.00425.92
8.1.270.0070.00023.99
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00024.01
8.1.230.0110.00020.96
8.1.220.0030.00518.77
8.1.210.0080.00018.77
8.1.200.0080.00517.38
8.1.190.0090.00017.53
8.1.180.0000.00818.10
8.1.170.0050.00318.89
8.1.160.0040.00419.05
8.1.150.0070.00018.86
8.1.140.0050.00317.63
8.1.130.0000.00717.82
8.1.120.0000.01017.72
8.1.110.0030.00617.53
8.1.100.0090.00017.55
8.1.90.0000.00817.52
8.1.80.0040.00417.65
8.1.70.0000.00717.61
8.1.60.0070.00417.74
8.1.50.0080.00017.54
8.1.40.0050.00217.60
8.1.30.0030.00617.80
8.1.20.0030.00517.80
8.1.10.0040.00417.66
8.1.00.0070.00617.71
8.0.300.0030.00620.01
8.0.290.0090.00017.16
8.0.280.0070.00018.41
8.0.270.0030.00617.30
8.0.260.0060.00317.00
8.0.250.0070.00017.04
8.0.240.0080.00317.15
8.0.230.0040.00417.07
8.0.220.0050.00317.06
8.0.210.0030.00316.98
8.0.200.0060.00017.02
8.0.190.0000.00717.20
8.0.180.0000.00717.00
8.0.170.0050.00317.08
8.0.160.0000.00717.08
8.0.150.0040.00416.87
8.0.140.0070.00016.93
8.0.130.0040.00413.56
8.0.120.0070.00016.96
8.0.110.0040.00417.13
8.0.100.0070.00017.06
8.0.90.0000.00816.93
8.0.80.0090.00617.07
8.0.70.0030.00616.86
8.0.60.0030.00516.95
8.0.50.0040.00416.93
8.0.30.0120.01117.16
8.0.20.0090.01317.45
8.0.10.0000.00717.11
8.0.00.0050.01217.15
7.4.330.0000.00615.02
7.4.320.0060.00016.73
7.4.300.0030.00316.82
7.4.290.0030.00316.85
7.4.280.0040.00416.73
7.4.270.0000.00716.70
7.4.260.0000.00713.46
7.4.250.0040.00416.61
7.4.240.0070.00016.67
7.4.230.0000.00716.93
7.4.220.0080.01116.79
7.4.210.0060.00816.79
7.4.200.0030.00316.93
7.4.190.0040.00316.80
7.4.160.0100.00616.59
7.4.150.0110.01417.40
7.4.140.0130.00517.86
7.4.130.0080.01016.81
7.4.120.0090.00916.85
7.4.110.0110.01116.73
7.4.100.0030.01416.75
7.4.90.0110.00716.87
7.4.80.0100.01319.39
7.4.70.0100.01016.69
7.4.60.0160.00016.65
7.4.50.0090.00016.52
7.4.40.0090.00522.52
7.4.30.0060.01216.68
7.4.00.0060.00615.10
7.3.330.0050.00013.25
7.3.320.0030.00313.43
7.3.310.0050.00316.55
7.3.300.0000.00716.41
7.3.290.0140.00716.61
7.3.280.0080.01016.51
7.3.270.0110.00617.40
7.3.260.0080.01318.24
7.3.250.0040.01316.64
7.3.240.0090.00916.55
7.3.230.0090.00916.96
7.3.210.0070.01016.71
7.3.200.0150.00919.39
7.3.190.0090.01216.33
7.3.180.0160.00516.58
7.3.170.0070.01316.96
7.3.160.0060.00916.70
7.3.120.0060.00815.08
7.3.00.0030.01016.53
7.2.330.0070.01016.84
7.2.320.0060.01216.75
7.2.310.0180.00016.76
7.2.300.0030.01316.89
7.2.290.0030.01416.85
7.2.130.0090.00317.21
7.2.120.0040.01216.73
7.2.110.0110.00617.08
7.2.100.0060.00916.89
7.2.90.0040.01016.93
7.2.80.0050.00716.63
7.2.70.0000.01117.04
7.2.60.0090.00316.89
7.2.50.0070.00716.83
7.2.40.0090.00317.18
7.2.30.0040.00816.86
7.2.20.0070.00516.75
7.2.10.0030.01316.77
7.2.00.0090.00616.91
7.1.250.0040.00416.02
7.1.240.0050.01215.90
7.1.230.0080.00415.94
7.1.220.0040.00815.63
7.1.210.0120.00015.93
7.1.200.0040.00716.05
7.1.190.0040.00816.01
7.1.180.0030.00915.86
7.1.170.0130.00615.79
7.1.160.0060.00515.96
7.1.150.0040.00815.98
7.1.140.0030.01316.05
7.1.130.0070.00715.66
7.1.120.0000.01415.88
7.1.110.0110.00315.92
7.1.100.0040.00715.73
7.1.90.0060.00615.72
7.1.80.0110.00015.95
7.1.70.0020.00716.68
7.1.60.0100.00717.69
7.1.50.0090.00916.54
7.1.40.0080.00815.73
7.1.30.0000.01415.98
7.1.20.0050.00515.56
7.1.10.0040.01115.47
7.1.00.0030.02219.13
7.0.330.0000.01215.23
7.0.320.0100.00415.46
7.0.310.0050.00515.48
7.0.300.0030.01215.52
7.0.290.0150.00315.50
7.0.280.0000.01115.42
7.0.270.0030.01015.41
7.0.260.0060.00915.29
7.0.250.0110.00315.64
7.0.240.0090.00315.38
7.0.230.0030.00815.39
7.0.220.0040.01115.53
7.0.210.0030.00915.32
7.0.200.0040.00816.30
7.0.190.0040.01115.61
7.0.180.0090.00615.42
7.0.170.0030.00915.66
7.0.160.0030.00715.50
7.0.150.0070.00515.55
7.0.140.0000.04518.71
7.0.130.0050.00515.22
7.0.120.0070.00715.31
7.0.110.0050.00515.70
7.0.100.0050.00515.75
7.0.90.0000.01215.37
7.0.80.0090.00615.64
7.0.70.0050.04318.58
7.0.60.0060.04118.52
7.0.50.0020.03918.86
7.0.40.0050.03816.94
7.0.30.0070.04216.75
7.0.20.0070.04516.79
7.0.10.0120.03616.77
7.0.00.0020.03016.77
5.6.380.0060.00914.59
5.6.370.0090.00614.48
5.6.360.0000.01214.33
5.6.350.0080.00014.55
5.6.340.0170.00014.44
5.6.330.0030.00914.07
5.6.320.0060.00614.51
5.6.310.0090.00314.03
5.6.300.0070.00314.46
5.6.290.0060.00914.48
5.6.280.0020.04217.52
5.6.270.0070.00314.52
5.6.260.0040.00814.41
5.6.250.0000.01414.59
5.6.240.0000.01114.41
5.6.230.0040.00714.34
5.6.220.0090.04617.52
5.6.210.0110.03717.48
5.6.200.0070.02817.74
5.6.190.0060.03417.67
5.6.180.0110.03817.68
5.6.170.0070.04317.59
5.6.160.0060.03417.58
5.6.150.0040.02717.78
5.6.140.0030.04917.79
5.6.130.0030.05017.62
5.6.120.0030.05217.78
5.6.110.0050.04717.59
5.6.100.0070.04817.79
5.6.90.0070.04017.66
5.6.80.0070.03217.33
5.6.70.0060.04317.28
5.6.60.0030.04417.26
5.6.50.0050.04017.32
5.6.40.0020.04917.22
5.6.30.0180.03217.33
5.6.20.0030.04117.34
5.6.10.0070.04317.35
5.6.00.0070.04217.34
5.5.380.0050.00311.18
5.5.370.0000.00711.18
5.5.360.0050.04315.81
5.5.350.0060.03715.88
5.5.340.0060.03416.04
5.5.330.0060.04415.98
5.5.320.0050.04316.04
5.5.310.0070.02716.05
5.5.300.0040.04216.00
5.5.290.0050.04515.95
5.5.280.0010.04415.97
5.5.270.0080.03516.12
5.5.260.0090.04115.95
5.5.250.0070.03915.92
5.5.240.0030.04015.69
5.5.230.0070.04215.72
5.5.220.0050.03315.68
5.5.210.0050.03815.71
5.5.200.0050.04315.68
5.5.190.0080.03815.70
5.5.180.0030.04515.63
5.5.170.0090.00011.18
5.5.160.0030.04515.72
5.5.150.0060.02515.71
5.5.140.0000.03815.66
5.5.130.0070.03515.68
5.5.120.0070.03215.67
5.5.110.0070.03715.69
5.5.100.0090.03815.65
5.5.90.0050.04315.65
5.5.80.0060.03915.63
5.5.70.0050.04015.62
5.5.60.0030.04215.64
5.5.50.0040.02315.66
5.5.40.0060.02615.64
5.5.30.0090.03315.61
5.5.20.0030.03215.68
5.5.10.0050.04415.63
5.5.00.0080.03715.61
5.4.450.0030.04515.31
5.4.440.0070.04215.24
5.4.430.0030.02715.36
5.4.420.0020.03215.27
5.4.410.0040.02915.26
5.4.400.0020.04214.98
5.4.390.0060.03515.07
5.4.380.0050.04014.98
5.4.370.0040.04215.10
5.4.360.0070.03914.98
5.4.350.0050.02715.15
5.4.340.0050.04215.10
5.4.330.0040.00411.18
5.4.320.0050.03815.11
5.4.310.0020.04115.14
5.4.300.0050.03515.12
5.4.290.0070.03715.14
5.4.280.0010.04015.03
5.4.270.0040.04115.20
5.4.260.0050.03515.08
5.4.250.0060.03915.12
5.4.240.0090.03715.11
5.4.230.0050.04215.04
5.4.220.0090.02415.15
5.4.210.0060.04015.11
5.4.200.0070.03715.20
5.4.190.0030.03815.11
5.4.180.0010.04415.20
5.4.170.0070.03815.14
5.4.160.0040.04314.97
5.4.150.0000.04515.19
5.4.140.0040.03513.73
5.4.130.0040.03013.77
5.4.120.0080.03013.76
5.4.110.0030.04013.71
5.4.100.0050.02613.71
5.4.90.0050.03013.80
5.4.80.0050.04113.79
5.4.70.0060.03813.79
5.4.60.0050.04113.72
5.4.50.0090.03313.68
5.4.40.0040.04213.79
5.4.30.0020.03713.75
5.4.20.0020.04113.68
5.4.10.0050.04013.71
5.4.00.0030.03913.37
5.3.290.0060.04012.87
5.3.280.0050.02812.81
5.3.270.0020.04312.84
5.3.260.0050.04112.84
5.3.250.0040.04212.88
5.3.240.0030.04112.88
5.3.230.0010.02612.87
5.3.220.0050.04512.86
5.3.210.0060.02512.87
5.3.200.0050.03712.85
5.3.190.0020.04212.80
5.3.180.0060.03712.86
5.3.170.0000.04212.82
5.3.160.0030.04112.80
5.3.150.0080.03712.79
5.3.140.0070.04012.85
5.3.130.0030.04212.79
5.3.120.0040.04012.85
5.3.110.0020.03812.84
5.3.100.0020.04212.60
5.3.90.0050.03312.57
5.3.80.0050.03512.58
5.3.70.0060.02012.57
5.3.60.0070.03512.57
5.3.50.0010.04012.49
5.3.40.0020.04012.56
5.3.30.0020.03812.52
5.3.20.0020.03212.36
5.3.10.0050.03612.39
5.3.00.0000.04312.33
5.2.170.0000.03711.68
5.2.160.0060.03011.68
5.2.150.0030.03011.68
5.2.140.0000.03611.68
5.2.130.0020.02211.68
5.2.120.0040.02211.68
5.2.110.0050.02811.68
5.2.100.0040.03111.68
5.2.90.0030.02711.68
5.2.80.0020.03411.68
5.2.70.0050.02711.68
5.2.60.0030.02111.68
5.2.50.0030.03411.68
5.2.40.0050.03311.68
5.2.30.0070.02911.68
5.2.20.0030.03311.68
5.2.10.0020.02711.68
5.2.00.0060.02011.68
5.1.60.0050.02811.68
5.1.50.0060.02511.68
5.1.40.0050.02611.68
5.1.30.0020.02411.68
5.1.20.0030.03111.68
5.1.10.0000.02711.68
5.1.00.0000.03111.68
5.0.50.0030.01811.68
5.0.40.0060.00811.68
5.0.30.0040.02711.68
5.0.20.0010.01311.68
5.0.10.0030.02111.68
5.0.00.0050.03211.68
4.4.90.0020.01811.68
4.4.80.0030.01811.68
4.4.70.0040.01211.68
4.4.60.0000.02411.68
4.4.50.0030.01711.68
4.4.40.0030.02711.68
4.4.30.0020.02011.68
4.4.20.0000.01711.68
4.4.10.0000.01811.68
4.4.00.0020.01711.68
4.3.110.0020.01511.68
4.3.100.0010.01311.68
4.3.90.0030.01611.68
4.3.80.0000.02511.68
4.3.70.0030.01311.68
4.3.60.0020.01411.68
4.3.50.0020.01911.68
4.3.40.0010.02511.68
4.3.30.0000.02011.68
4.3.20.0030.01811.68
4.3.10.0000.01611.68
4.3.00.0030.01511.68

preferences:
71.09 ms | 401 KiB | 5 Q