3v4l.org

run code in 300+ PHP versions simultaneously
<?php class World { public $name; public $numOnline; public $location; public $type; public $adtInfo; public $onlineRecord; public $creationDate; public $worldQuestTitles; function __construct() { } } $c = curl_init('http://www.tibia.com/community/?subtopic=worlds'); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); $html = curl_exec($c); if (curl_error($c)) die(curl_error($c)); curl_close($c); $html = strip_tags($html, "<tr><td><table>"); //Get the html code without remove the specific tags $start = strpos($html, "Additional Information"); //Start for substring $html = substr($html, $start); //Remove the first useless characters $end = strpos($html, "</table>"); //Get the end of the substring $html = substr($html, 22, ($end - 22)); //Last substring - Note: 22 = "Additional Information" Length $arr; preg_match_all("/<td>([^<]*)<\/td>/", $html, $arr); //Regex to the the groups //Array to build all worlds objects $worlds = array(); $index = 0; for($i = 0; $i < count($arr[0]); $i+=5) { $w = new World(); $w->name = $arr[0][$i]; $w->numOnline = $arr[0][$i + 1]; $w->location = $arr[0][$i + 2]; $w->type = $arr[0][$i + 3]; $w->adtInfo = $arr[0][$i + 4]; array_push($worlds, $w); } var_dump($worlds); die(); foreach($worlds as $w){ if(is_object($w)){ //echo $w->name."<br />"; $string = "http://www.tibia.com/community/?subtopic=worlds&world=".$w->name; $ch = curl_init($string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HEADER, true); $html2 = curl_exec($ch); if (curl_error($ch)) die(curl_error($ch)); curl_close($ch); $html2 = strip_tags($html2, "<tr><td><table>"); $start = strpos($html2, "World Information"); $html2 = substr($html2, $start); echo $string."<br />". $html; return; $end = strpos($html2, "</table>"); $html2 = substr($html2, 17, ($end - 17)); echo $start." ".$end; break; } }

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.0110.00716.75
8.3.50.0080.01021.14
8.3.40.0000.01618.88
8.3.30.0150.00618.67
8.3.20.0040.00420.30
8.3.10.0060.00321.73
8.3.00.0040.00422.34
8.2.180.0140.00716.63
8.2.170.0110.00722.96
8.2.160.0070.00720.35
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0050.00326.16
8.2.120.0030.00617.50
8.2.110.0100.00019.27
8.2.100.0090.00317.63
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0000.00817.49
8.2.60.0030.00517.80
8.2.50.0030.00518.07
8.2.40.0080.00021.07
8.2.30.0000.01019.81
8.2.20.0040.00417.72
8.2.10.0000.00817.95
8.2.00.0040.00418.09
8.1.280.0150.00625.92
8.1.270.0040.00420.27
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00424.00
8.1.230.0130.00317.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0100.00017.13
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0050.00318.54
8.1.160.0040.00421.93
8.1.150.0020.00518.80
8.1.140.0080.00017.27
8.1.130.0030.00317.52
8.1.120.0070.00017.27
8.1.110.0000.00817.44
8.1.100.0070.00017.28
8.1.90.0000.00717.38
8.1.80.0070.00017.37
8.1.70.0000.00717.31
8.1.60.0060.00317.39
8.1.50.0040.00417.46
8.1.40.0080.00017.37
8.1.30.0040.00417.46
8.1.20.0040.00417.68
8.1.10.0040.00417.45
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.43
8.0.270.0000.00717.25
8.0.260.0000.00617.16
8.0.250.0000.00717.01
8.0.240.0000.00716.94
8.0.230.0000.00716.86
8.0.220.0070.00016.91
8.0.210.0040.00416.84
8.0.200.0030.00516.88
8.0.190.0050.00317.04
8.0.180.0000.00717.00
8.0.170.0040.00416.95
8.0.160.0030.00616.93
8.0.150.0000.00716.92
8.0.140.0030.00416.95
8.0.130.0030.00313.40
8.0.120.0040.00416.87
8.0.110.0050.00316.77
8.0.100.0040.00417.02
8.0.90.0000.00716.81
8.0.80.0080.00716.90
8.0.70.0000.00816.72
8.0.60.0000.00716.82
8.0.50.0040.00416.82
8.0.30.0070.01116.91
8.0.20.0110.00817.40
8.0.10.0000.00717.06
8.0.00.0070.01016.74
7.4.330.0050.00015.08
7.4.320.0030.00316.52
7.4.300.0030.00316.59
7.4.290.0000.00716.49
7.4.280.0070.00016.46
7.4.270.0030.00316.54
7.4.260.0040.00416.49
7.4.250.0000.00816.32
7.4.240.0040.00416.57
7.4.230.0040.00416.48
7.4.220.0090.01016.33
7.4.210.0080.00716.56
7.4.200.0000.00816.56
7.4.160.0090.00616.52
7.4.150.0000.01917.40
7.4.140.0150.00817.86
7.4.130.0100.01016.49
7.4.120.0130.00616.58
7.4.110.0140.00316.55
7.4.100.0090.01016.65
7.4.90.0030.01316.35
7.4.80.0050.01219.39
7.4.70.0090.00916.46
7.4.60.0100.00716.50
7.4.50.0030.00616.49
7.4.40.0110.00716.58
7.4.30.0120.00616.52
7.4.00.0060.00615.14
7.3.330.0000.00613.36
7.3.320.0000.00513.14
7.3.310.0070.00016.45
7.3.300.0040.00216.22
7.3.290.0030.00316.23
7.3.280.0090.01016.41
7.3.270.0130.01017.40
7.3.260.0130.01016.46
7.3.250.0080.01016.32
7.3.240.0070.01116.34
7.3.230.0080.00816.39
7.3.210.0110.00616.50
7.3.200.0070.01419.39
7.3.190.0030.01316.37
7.3.180.0060.01116.30
7.3.170.0130.00716.47
7.3.160.0090.01216.51
7.2.330.0070.01016.41
7.2.320.0090.01016.57
7.2.310.0070.01016.52
7.2.300.0100.00716.70
7.2.290.0170.00416.64
7.2.60.0040.00816.59
7.2.00.0040.01119.10
7.1.200.0030.01015.57
7.1.100.0100.00617.68
7.1.70.0000.01016.74
7.1.60.0100.01620.03
7.1.50.0040.00816.57
7.1.00.0000.07722.40
7.0.200.0030.00616.33
7.0.60.0100.08020.02
7.0.50.0100.04717.94
7.0.40.0170.05720.30
7.0.30.0270.05720.24
7.0.20.0330.07020.09
7.0.10.0100.05720.15
7.0.00.0100.06020.30
5.6.210.0100.07020.52
5.6.200.0030.04718.24
5.6.190.0230.03720.61
5.6.180.0370.06720.46
5.6.170.0170.04720.55
5.6.160.0100.04320.52
5.6.150.0100.04718.15
5.6.140.0070.03718.15
5.6.130.0030.08718.15
5.6.120.0070.05721.03
5.6.110.0070.05321.03
5.6.100.0100.08020.98
5.6.90.0170.07321.14
5.6.80.0130.07320.40
5.6.70.4200.03720.38
5.5.350.0170.06020.36
5.5.340.0030.05317.98
5.5.330.0000.09320.33
5.5.320.0230.04720.35
5.5.310.0230.08320.34
5.5.300.0030.06317.98
5.5.290.0030.08717.97
5.5.280.0070.04720.79
5.5.270.0070.08320.90
5.5.260.0130.09320.88
5.5.250.0030.07320.61
5.5.240.0330.04720.20
5.4.450.0130.06019.34
5.4.440.0200.04719.60
5.4.430.0400.05719.37
5.4.420.0730.04719.16
5.4.410.0830.04019.34
5.4.400.0570.05319.09
5.4.390.0730.05319.25
5.4.380.0500.05019.00
5.4.370.0200.04719.32
5.4.360.0230.05319.25
5.4.350.0130.05718.95
5.4.340.0330.04319.32
5.4.320.0100.05719.11
5.4.310.0070.05718.84
5.4.300.0200.05019.29
5.4.290.0070.06019.21
5.4.280.0200.05319.23
5.4.270.0000.06319.31
5.4.260.0100.05019.21
5.4.250.0730.05019.11
5.4.240.0670.05319.22
5.4.230.0700.04719.32
5.4.220.0700.05019.07
5.4.210.0230.05718.98
5.4.200.0130.04716.96
5.4.190.0630.05319.11
5.4.180.0500.06318.88
5.4.170.0100.05719.21
5.4.160.0200.05019.08
5.4.150.0170.04719.14
5.4.140.0070.05716.39
5.4.130.0170.04716.42
5.4.120.0200.04716.32
5.4.110.0170.04716.54
5.4.100.0200.05316.31
5.4.90.0170.05716.46
5.4.80.0100.05016.41
5.4.70.0230.04016.30
5.4.60.0200.04016.25
5.4.50.0000.03316.44
5.4.40.0100.04016.45
5.4.30.0370.05716.44
5.4.20.0270.06316.54

preferences:
41.11 ms | 401 KiB | 5 Q