3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageTag = '<img src = http://nycxplorer.com/wp-content/uploads/2012/02/bagel1-1.jpg >'; //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.40.0040.01118.88
8.3.30.0090.00919.07
8.3.20.0040.00420.34
8.3.10.0040.00422.14
8.3.00.0080.00022.51
8.2.170.0070.00722.96
8.2.160.0140.00021.20
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00017.88
8.2.110.0060.00322.43
8.2.100.0120.00017.84
8.2.90.0060.00319.34
8.2.80.0030.00617.97
8.2.70.0030.00717.75
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0080.00018.16
8.2.30.0040.00718.13
8.2.20.0040.00417.86
8.2.10.0000.00817.84
8.2.00.0000.00917.98
8.1.270.0040.00423.79
8.1.260.0000.00826.35
8.1.250.0100.00328.09
8.1.240.0090.00023.70
8.1.230.0120.00019.00
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.48
8.1.190.0000.00717.40
8.1.180.0000.00918.10
8.1.170.0000.00818.85
8.1.160.0000.00922.05
8.1.150.0040.00418.66
8.1.140.0070.00017.61
8.1.130.0040.00417.76
8.1.120.0050.00317.61
8.1.110.0000.00717.48
8.1.100.0040.00417.65
8.1.90.0040.00417.56
8.1.80.0030.00517.63
8.1.70.0030.00317.62
8.1.60.0030.00517.79
8.1.50.0030.00517.68
8.1.40.0070.00317.55
8.1.30.0030.00517.77
8.1.20.0000.00817.71
8.1.10.0000.00717.71
8.1.00.0020.00517.62
8.0.300.0000.00818.77
8.0.290.0050.00217.16
8.0.280.0040.00418.47
8.0.270.0040.00417.33
8.0.260.0000.00716.84
8.0.250.0030.00316.99
8.0.240.0080.00017.00
8.0.230.0030.00317.11
8.0.220.0050.00217.04
8.0.210.0070.00017.00
8.0.200.0060.00017.08
8.0.190.0030.00617.00
8.0.180.0000.00717.09
8.0.170.0040.00417.11
8.0.160.0030.00517.02
8.0.150.0030.00316.83
8.0.140.0000.00716.95
8.0.130.0060.00013.46
8.0.120.0040.00417.00
8.0.110.0030.00517.02
8.0.100.0050.00216.92
8.0.90.0020.00516.98
8.0.80.0100.00717.03
8.0.70.0000.00716.91
8.0.60.0000.00716.98
8.0.50.0040.00417.07
8.0.30.0080.01217.36
8.0.20.0120.00817.45
8.0.10.0000.00717.22
8.0.00.0110.00616.94
7.4.330.0050.00015.11
7.4.320.0060.00016.71
7.4.300.0000.00716.81
7.4.290.0030.00316.73
7.4.280.0000.00716.68
7.4.270.0030.00316.70
7.4.260.0000.00716.62
7.4.250.0040.00416.79
7.4.240.0040.00416.73
7.4.230.0030.00316.62
7.4.220.0070.01016.85
7.4.210.0080.00916.70
7.4.200.0090.00016.75
7.4.190.0050.00316.90
7.4.160.0030.01416.55
7.4.150.0040.01417.40
7.4.140.0090.00817.86
7.4.130.0060.01116.56
7.4.120.0110.00616.76
7.4.110.0000.02216.72
7.4.100.0140.00416.84
7.4.90.0120.00616.53
7.4.80.0130.00819.39
7.4.70.0150.00716.89
7.4.60.0110.00616.73
7.4.50.0090.00016.59
7.4.40.0090.00922.77
7.4.30.0130.00316.62
7.4.10.0110.00615.04
7.4.00.0060.01115.16
7.3.330.0050.00013.41
7.3.320.0060.00013.40
7.3.310.0040.00416.41
7.3.300.0000.00716.39
7.3.290.0100.00516.44
7.3.280.0100.01016.45
7.3.270.0180.00617.40
7.3.260.0100.00716.77
7.3.250.0080.01016.66
7.3.240.0090.00916.88
7.3.230.0150.00616.44
7.3.210.0040.01216.52
7.3.200.0070.01019.39
7.3.190.0110.01016.61
7.3.180.0120.00616.51
7.3.170.0110.00816.67
7.3.160.0070.01116.46
7.3.130.0070.01215.19
7.3.120.0100.00615.12
7.3.110.0100.00815.13
7.3.100.0060.00915.13
7.3.90.0090.00514.92
7.3.80.0070.00715.06
7.3.70.0090.00514.95
7.3.60.0080.00514.98
7.3.50.0020.01215.01
7.3.40.0020.01114.85
7.3.30.0050.00515.06
7.3.20.0050.00716.84
7.3.10.0050.00716.93
7.3.00.0080.00516.88
7.2.330.0160.00516.75
7.2.320.0120.01316.83
7.2.310.0130.00616.94
7.2.300.0030.01716.80
7.2.290.0060.01216.91
7.2.260.0080.01115.24
7.2.250.0080.00715.41
7.2.240.0070.00815.22
7.2.230.0040.01215.10
7.2.220.0090.00915.14
7.2.210.0050.00915.15
7.2.200.0070.00815.21
7.2.190.0040.01315.52
7.2.180.0090.00715.11
7.2.170.0050.01115.27
7.2.160.0040.00715.04
7.2.150.0050.01217.16
7.2.140.0070.00717.03
7.2.130.0050.00917.23
7.2.120.0030.01117.16
7.2.110.0070.00517.01
7.2.100.0060.00916.92
7.2.90.0070.00917.06
7.2.80.0000.01217.07
7.2.70.0090.00817.18
7.2.60.0080.01017.10
7.2.50.0050.01117.04
7.2.40.0070.01016.98
7.2.30.0030.01316.95
7.2.20.0080.00817.19
7.2.10.0000.01217.16
7.2.00.0060.00917.90
7.1.330.0040.01116.02
7.1.320.0070.00915.98
7.1.310.0080.00615.95
7.1.300.0050.01015.85
7.1.290.0060.00516.00
7.1.280.0040.00815.94
7.1.270.0030.00715.99
7.1.260.0120.00016.03
7.1.250.0050.00916.12
7.1.240.0110.00316.08
7.1.230.0070.00815.94
7.1.220.0060.00815.82
7.1.210.0050.00916.02
7.1.200.0070.00815.88
7.1.190.0020.01115.95
7.1.180.0030.01316.05
7.1.170.0070.00716.07
7.1.160.0070.00716.03
7.1.150.0050.00915.89
7.1.140.0080.00615.86
7.1.130.0050.00615.94
7.1.120.0030.01216.04
7.1.110.0050.00815.96
7.1.100.0020.01116.82
7.1.90.0070.00415.89
7.1.80.0060.00716.07
7.1.70.0060.00616.38
7.1.60.0070.01017.34
7.1.50.0070.01016.43
7.1.40.0040.00916.10
7.1.30.0050.00815.82
7.1.20.0020.00915.98
7.1.10.0040.01216.00
7.1.00.0030.03218.07
7.0.330.0080.00515.58
7.0.320.0100.00515.67
7.0.310.0050.00715.64
7.0.300.0050.00715.66
7.0.290.0060.00515.52
7.0.280.0040.01115.54
7.0.270.0050.00715.51
7.0.260.0040.01115.53
7.0.250.0090.00315.65
7.0.240.0040.01115.78
7.0.230.0050.00715.69
7.0.220.0070.00715.67
7.0.210.0030.00915.71
7.0.200.0090.00915.38
7.0.190.0010.01115.59
7.0.180.0070.00515.63
7.0.170.0060.00715.74
7.0.160.0090.00315.85
7.0.150.0070.00815.67
7.0.140.0040.03017.79
7.0.130.0090.00315.66
7.0.120.0050.00715.70
7.0.110.0040.00815.58
7.0.100.0050.01215.63
7.0.90.0020.01215.60
7.0.80.0060.00915.56
7.0.70.0080.00615.64
7.0.60.0070.02817.09
7.0.50.0040.02716.38
7.0.40.0060.03115.84
7.0.30.0140.02515.77
7.0.20.0130.01615.80
7.0.10.0080.02815.78
7.0.00.0070.03915.64
5.6.400.0080.00714.33
5.6.390.0100.00314.50
5.6.380.0110.00314.42
5.6.370.0050.00914.49
5.6.360.0060.00614.29
5.6.350.0030.01014.44
5.6.340.0030.01214.37
5.6.330.0050.00914.54
5.6.320.0090.00614.72
5.6.310.0030.01014.52
5.6.300.0060.00814.52
5.6.290.0090.00314.68
5.6.280.0070.02616.70
5.6.270.0020.01014.54
5.6.260.0060.00714.70
5.6.250.0030.00914.41
5.6.240.0030.00614.66
5.6.230.0060.00914.44
5.6.220.0030.00714.54
5.6.210.0040.02716.54
5.6.200.0060.03215.65
5.6.190.0010.03716.34
5.6.180.0120.03016.46
5.6.170.0100.02616.44
5.6.160.0070.03116.39
5.6.150.0050.02915.70
5.6.140.0080.03215.71
5.6.130.0070.01515.66
5.6.120.0070.03116.46
5.6.110.0090.02016.59
5.6.100.0100.02816.65
5.6.90.0060.03316.68
5.6.80.0060.02216.55
5.6.70.0110.02916.47
5.6.60.0050.00514.52
5.6.50.0090.00614.54
5.6.40.0070.00814.19
5.6.30.0060.00614.29
5.6.20.0030.00914.31
5.6.10.0060.00814.43
5.6.00.0060.00614.18
5.5.380.0100.00014.38
5.5.370.0060.01014.29
5.5.360.0060.00614.22
5.5.350.0180.02416.32
5.5.340.0050.03115.54
5.5.330.0070.03216.28
5.5.320.0040.02016.40
5.5.310.0170.02516.33
5.5.300.0090.02815.64
5.5.290.0100.03115.64
5.5.280.0050.02016.42
5.5.270.0050.03516.58
5.5.260.0060.03216.30
5.5.250.0090.02816.43
5.5.240.0050.02216.29
5.5.230.0050.00814.30
5.5.220.0050.01114.23
5.5.210.0070.00714.41
5.5.200.0080.00714.43
5.5.190.0080.00614.33
5.5.180.0090.00314.15
5.5.170.0090.00614.27
5.5.160.0020.01114.42
5.5.150.0050.00814.38
5.5.140.0070.00614.14
5.5.130.0080.00514.45
5.5.120.0040.01014.45
5.5.110.0060.00914.07
5.5.100.0040.00814.30
5.5.90.0000.01514.34
5.5.80.0060.00614.15
5.5.70.0060.00814.21
5.5.60.0050.00814.21
5.5.50.0070.00814.50
5.5.40.0050.00714.39
5.5.30.0050.01114.16
5.5.20.0050.01014.22
5.5.10.0000.01014.48
5.5.00.0110.00514.02
5.4.450.0130.01314.18
5.4.440.0120.01414.24
5.4.430.0120.01614.25
5.4.420.0080.03114.24
5.4.410.0170.02214.14
5.4.400.0090.02714.13
5.4.390.0100.03214.18
5.4.380.0110.02114.13
5.4.370.0150.01814.13
5.4.360.0140.02414.03
5.4.350.0090.02514.13
5.4.340.0130.02714.14
5.4.330.0080.00311.65
5.4.320.0170.02414.13
5.4.310.0130.02814.13
5.4.300.0130.01214.14
5.4.290.0110.02114.06
5.4.280.0130.02914.04
5.4.270.0150.02214.13
5.4.260.0100.02914.18
5.4.250.0130.02614.19
5.4.240.0110.02814.18
5.4.230.0150.02114.18
5.4.220.0140.02414.03
5.4.210.0150.02514.13
5.4.200.0150.02414.13
5.4.190.0100.02914.14
5.4.180.0140.02614.03
5.4.170.0170.02514.14
5.4.160.0120.02114.11
5.4.150.0110.01814.17
5.4.140.0110.01913.26
5.4.130.0110.01613.25
5.4.120.0170.01913.20
5.4.110.0070.02213.27
5.4.100.0110.02813.28
5.4.90.0170.02313.25
5.4.80.0110.02313.20
5.4.70.0140.02713.23
5.4.60.0110.02613.21
5.4.50.0130.02613.22
5.4.40.0120.02513.21
5.4.30.0140.01513.20
5.4.20.0140.02413.24
5.4.10.0120.02313.22
5.4.00.0110.02313.01
5.3.290.0130.01612.71
5.3.280.0110.02012.71
5.3.270.0150.02312.71
5.3.260.0130.02212.71
5.3.250.0140.02612.71
5.3.240.0090.02912.71
5.3.230.0160.02212.71
5.3.220.0100.01812.71
5.3.210.0120.01812.71
5.3.200.0110.02512.71
5.3.190.0080.02812.71
5.3.180.0140.02212.71
5.3.170.0130.01812.71
5.3.160.0110.03012.71
5.3.150.0110.01712.71
5.3.140.0110.01912.71
5.3.130.0100.02112.71
5.3.120.0080.02212.71
5.3.110.0110.02812.71
5.3.100.0110.02812.71
5.3.90.0100.02412.71
5.3.80.0140.02812.71
5.3.70.0140.02312.71
5.3.60.0160.02512.71
5.3.50.0080.03012.71
5.3.40.0110.03012.71
5.3.30.0100.02612.71
5.3.20.0130.01612.71
5.3.10.0150.02112.71
5.3.00.0170.02112.71
5.2.170.0270.03314.81
5.2.160.0270.05314.81
5.2.150.0270.05714.81
5.2.140.0170.04014.81
5.2.130.0230.04314.81
5.2.120.0230.04314.81
5.2.110.0270.06014.81
5.2.100.0270.05314.81
5.2.90.0200.05014.81
5.2.80.0230.06014.81
5.2.70.0200.04014.81
5.2.60.0200.04014.81
5.2.50.0200.04714.81
5.2.40.0230.05714.81
5.2.30.0230.04714.81
5.2.20.0170.05714.81
5.2.10.0270.03014.81
5.2.00.0300.04714.81
5.1.60.0200.05314.81
5.1.50.0170.05714.81
5.1.40.0230.05014.81
5.1.30.0200.04014.81
5.1.20.0230.05014.81
5.1.10.0170.05314.81
5.1.00.0230.05014.81
5.0.50.0130.04014.81
5.0.40.0100.05014.81
5.0.30.0130.05014.81
5.0.20.0170.03714.81
5.0.10.0200.04014.81
5.0.00.0100.05014.81
4.4.90.0100.03714.81
4.4.80.0200.02314.81
4.4.70.0130.02714.81
4.4.60.0130.02014.81
4.4.50.0100.02714.81
4.4.40.0130.04014.81
4.4.30.0130.02714.81
4.4.20.0130.02314.81
4.4.10.0100.02714.81
4.4.00.0100.05014.81
4.3.110.0100.03014.81
4.3.100.0070.02714.81
4.3.90.0130.02314.81
4.3.80.0070.04714.81
4.3.70.0070.03314.81
4.3.60.0130.02714.81
4.3.50.0170.02314.81
4.3.40.0130.03314.81
4.3.30.0030.02714.81
4.3.20.0030.03714.81
4.3.10.0070.03314.81
4.3.00.0070.02714.81

preferences:
43.27 ms | 400 KiB | 5 Q