3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DAL { function getNoAnnonces() { return array( "12334", "233455" ); } function getURLRecherches() { //$line = "Nissan, Rogue, 2008, 1000, 9000, 10000, 110000"; //$line2 = "Nissan, Rogue, 2009, 1000, 9000, 10000, 90000"; return array( "http://www.kijiji.ca/b-autos-camions/grand-montreal/suv+vgm-nissan-rogue-2001__2009/c174l80002a138a54a1000054a68?sort=priceAsc&price=2000.00__40000.00&kilometres=10000__110000", "http://www.kijiji.ca/b-autos-camions/grand-montreal/suv+vgm-bmw-x5-2001__2009/c174l80002a138a54a1000054a68?sort=priceAsc&price=2000.00__40000.00&kilometres=10000__110000" //split(",", $line, 7), //split(",", $line2, 7) ); } } class AdsListExtractor { private $html; function __construct($a1) { $this->html = $a1; //echo $this->html; } function getURLs() { $regexa = '/\<a(.*)\<\/a\>/'; preg_match($regexa, $this->html, $matches); $a = $matches[1]; //echo $a; //echo "\n"; //echo "\n"; //Extract no d'annonces $regexno = '/name="(\d+)"/i'; preg_match($regexno, $a, $matches); //echo 'id:'; //echo $matches[1]; //echo "\n"; //Extract url des fiches $regexurl = '/href="(\S+)"/i'; preg_match($regexurl, $a, $matches); //echo 'url:'; //echo $matches[1]; //echo "\n"; $url_fiche = 'http://www.kijiji.ca' . $matches[1]; //echo $url_fiche; //echo "\n"; return $matches; } } class AdInfoExtractor { private $html = 0; function __construct($a1) { $this->html = $a1; } function getHMTL() { $regexatt = '/\<table class="ad-attributes">(.*)\<\/table\>/'; preg_match($regexatt, $this->html, $matches); $a = $matches[1]; $regexcontent = '/\<div id="UserContent">(.*)\<\/div\>/'; preg_match($regexcontent, $this->html, $matches); $b = $matches[1]; return $a . $b; } } class HTMLReader { function getHMTL($url) { return 'dhoaudg od oaeywgdoad <table class="ad-attributes">yesser</table> dfdssd <div id="UserContent">good</div> dfdfdf df df'; } } //'http://montreal.kijiji.ca/c-ViewAd?AdId=576130148' $url_liste = "http://www.kijiji.ca/b-autos-camions/grand-montreal/suv+vgm-bmw-x5-2001__2009/c174l80002a138a54a1000054a68?sort=priceAsc&price=2000.00__40000.00&kilometres=10000__110000"; $html_test = "<td class=\"description\"><a href=\"/v-autos-camions/ville-de-montreal/2008-bmw-x5-suv/568081363\" class=\"title enable-search-navigation-flag\" name=\"568081363\">2008 BMW X5 SUV</a><p>"; //$html_liste = file_get_contents($url_liste); $liste = new AdsListExtractor($html_test); foreach ($liste->getURLs() as $line_num => $line) { $reader = new HTMLReader(); $htmlfiche = $reader->getHMTL($line); $ad_info = new AdInfoExtractor($htmlfiche); echo $ad_info->getHMTL(); echo "\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.0070.01119.16
8.3.30.0040.01119.21
8.3.20.0080.00020.30
8.3.10.0080.00022.04
8.3.00.0080.00022.40
8.2.170.0100.00722.96
8.2.160.0140.00019.34
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00019.61
8.2.110.0110.00622.38
8.2.100.0030.01020.02
8.2.90.0040.00419.40
8.2.80.0030.00518.05
8.2.70.0050.00317.75
8.2.60.0080.00017.93
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0040.00418.12
8.2.20.0040.00417.81
8.2.10.0000.00818.00
8.2.00.0040.00417.92
8.1.270.0040.00424.01
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.84
8.1.230.0050.00519.20
8.1.220.0000.00817.78
8.1.210.0080.00018.77
8.1.200.0070.00317.60
8.1.190.0000.00917.49
8.1.180.0000.00918.97
8.1.170.0000.00818.82
8.1.160.0070.00022.31
8.1.150.0000.00818.84
8.1.140.0000.00817.64
8.1.130.0000.00717.80
8.1.120.0030.00317.63
8.1.110.0030.00517.69
8.1.100.0040.00417.61
8.1.90.0000.00717.58
8.1.80.0000.00717.62
8.1.70.0030.00317.57
8.1.60.0000.00817.83
8.1.50.0040.00417.59
8.1.40.0040.00417.65
8.1.30.0000.00917.84
8.1.20.0030.00517.79
8.1.10.0040.00417.76
8.1.00.0000.00817.71
8.0.300.0070.00018.77
8.0.290.0030.00517.18
8.0.280.0070.00018.55
8.0.270.0040.00417.20
8.0.260.0030.00316.99
8.0.250.0050.00317.24
8.0.240.0040.00417.14
8.0.230.0030.00317.04
8.0.220.0030.00317.05
8.0.210.0000.00717.04
8.0.200.0020.00517.03
8.0.190.0000.00717.18
8.0.180.0000.00816.96
8.0.170.0040.00417.09
8.0.160.0060.00317.07
8.0.150.0050.00217.11
8.0.140.0040.00417.04
8.0.130.0030.00313.48
8.0.120.0040.00417.01
8.0.110.0030.00516.98
8.0.100.0050.00317.05
8.0.90.0040.00416.98
8.0.80.0130.00317.03
8.0.70.0040.00417.08
8.0.60.0060.00316.95
8.0.50.0030.00516.94
8.0.30.0130.00817.28
8.0.20.0090.00917.40
8.0.10.0070.00017.21
8.0.00.0130.00817.15
7.4.330.0030.00315.02
7.4.320.0030.00316.63
7.4.300.0000.00716.73
7.4.290.0070.00016.77
7.4.280.0000.00716.75
7.4.270.0030.00316.84
7.4.260.0030.00316.73
7.4.250.0040.00416.71
7.4.240.0050.00216.88
7.4.230.0040.00416.95
7.4.220.0070.01116.65
7.4.210.0080.01016.79
7.4.200.0040.00416.83
7.4.190.0040.00416.95
7.4.160.0060.01016.75
7.4.150.0110.00717.40
7.4.140.0120.00617.86
7.4.130.0120.00716.75
7.4.120.0130.00616.78
7.4.110.0030.01416.87
7.4.100.0100.01316.85
7.4.90.0040.01716.70
7.4.80.0090.00919.39
7.4.70.0130.00716.63
7.4.60.0100.00716.63
7.4.50.0050.00316.74
7.4.40.0080.00822.77
7.4.30.0070.01016.82
7.4.00.0030.01515.25
7.3.330.0050.00013.53
7.3.320.0060.00013.51
7.3.310.0000.00716.59
7.3.300.0030.00316.53
7.3.290.0110.00316.43
7.3.280.0030.01616.50
7.3.270.0140.00717.40
7.3.260.0160.00316.59
7.3.250.0060.01116.57
7.3.240.0030.01316.59
7.3.230.0180.00916.61
7.3.210.0110.00716.86
7.3.200.0100.01119.39
7.3.190.0070.01016.50
7.3.180.0040.01216.66
7.3.170.0070.01016.72
7.3.160.0030.01316.70
7.3.120.0090.00315.09
7.2.330.0100.00716.79
7.2.320.0060.01116.95
7.2.310.0060.01317.01
7.2.300.0120.00616.93
7.2.290.0120.00317.01
7.1.70.0060.00917.28
7.1.60.0120.00919.82
7.1.50.0070.01416.99
7.1.00.0070.08722.38
7.0.200.0040.00416.92
7.0.140.0100.06722.06
7.0.100.0230.02719.98
7.0.90.0030.04720.00
7.0.80.0130.03320.00
7.0.70.0000.04319.94
7.0.60.0030.05019.95
7.0.50.0000.04320.38
7.0.40.0070.03720.13
7.0.30.0030.04320.04
7.0.20.0030.05720.11
7.0.10.0070.04020.16
7.0.00.0030.04319.99
5.6.280.0070.06721.14
5.6.250.0070.04020.62
5.6.240.0070.04020.59
5.6.230.0070.03720.62
5.6.220.0100.03320.63
5.6.210.0030.04320.47
5.6.200.0030.04721.20
5.6.190.0070.04021.06
5.6.180.0070.04321.10
5.6.170.0000.04721.03
5.6.160.0030.04321.13
5.6.150.0100.03320.96
5.6.140.0030.04721.04
5.6.130.0000.04720.95
5.6.120.0070.04021.10
5.6.110.0070.07321.08
5.6.100.0100.04721.12
5.6.90.0070.04021.13
5.6.80.0030.06020.45
5.6.70.0070.05720.50
5.6.60.0030.08020.47
5.6.50.0100.07320.48
5.6.40.0030.07020.48
5.6.30.0130.07320.43
5.6.20.0170.06720.54
5.6.10.0170.06320.48
5.6.00.0070.08020.46
5.5.380.0030.04320.56
5.5.370.0030.04020.41
5.5.360.0100.03720.52
5.5.350.0070.08320.44
5.5.340.0070.03720.93
5.5.330.0070.04020.88
5.5.320.0070.04320.86
5.5.310.0100.06020.82
5.5.300.0030.07020.92
5.5.290.0030.04020.92
5.5.280.0100.03320.82
5.5.270.0070.03720.94
5.5.260.0130.04720.76
5.5.250.0070.04320.63
5.5.240.0000.08320.29
5.5.230.0070.07320.16
5.5.220.0070.07720.25
5.5.210.0100.07320.29
5.5.200.0030.08320.28
5.5.190.0070.06720.27
5.5.180.0030.07020.20
5.5.160.0230.06020.20
5.5.150.0200.05720.00
5.5.140.0130.07320.29
5.5.130.0170.04020.23
5.5.120.0100.06320.20
5.5.110.0030.06320.00
5.5.100.0100.07320.20
5.5.90.0030.08020.18
5.5.80.0070.07320.18
5.5.70.0070.07320.08
5.5.60.0030.07020.16
5.5.50.0100.07320.13
5.5.40.0070.05020.07
5.5.30.0200.06020.15
5.5.20.0000.07320.07
5.5.10.0030.05020.10
5.5.00.0130.06720.10
5.4.450.0070.04319.48
5.4.440.0030.05019.37
5.4.430.0000.04319.22
5.4.420.0030.04019.41
5.4.410.0100.03319.07
5.4.400.0000.08019.21
5.4.390.0070.07719.02
5.4.380.0100.07019.12
5.4.370.0030.06719.16
5.4.360.0100.06719.12
5.4.350.0100.07019.03
5.4.340.0030.07719.12
5.4.320.0070.07319.04
5.4.310.0000.06319.03
5.4.300.0070.07019.04
5.4.290.0170.06319.23
5.4.280.0030.03719.12
5.4.270.0100.05719.03
5.4.260.0000.07718.84
5.4.250.0170.06718.84
5.4.240.0130.06018.94
5.4.230.0070.04018.87
5.4.220.0070.07018.89
5.4.210.0130.06319.06
5.4.200.0100.06719.04
5.4.190.0070.08019.17
5.4.180.0100.07319.04
5.4.170.0100.07719.20
5.4.160.0030.08018.86
5.4.150.0030.05719.02
5.4.140.0030.07016.52
5.4.130.0030.03316.50
5.4.120.0130.06316.24
5.4.110.0070.05316.52
5.4.100.0000.07716.29
5.4.90.0100.06716.39
5.4.80.0100.06316.54
5.4.70.0070.06716.48
5.4.60.0070.07016.40
5.4.50.0100.06016.48
5.4.40.0070.04316.46
5.4.30.0000.05016.25
5.4.20.0030.07316.39
5.4.10.0030.05316.44
5.4.00.0200.04315.67
5.3.290.0030.07015.58
5.3.280.0100.07315.58
5.3.270.0030.08315.58
5.3.260.0100.06015.58
5.3.250.0030.04715.58
5.3.240.0000.06715.58
5.3.230.0170.06015.58
5.3.220.0100.07015.58
5.3.210.0030.07715.58
5.3.200.0000.04315.58
5.3.190.0070.06015.58
5.3.180.0070.07715.58
5.3.170.0030.06015.58
5.3.160.0070.06015.58
5.3.150.0100.07315.58
5.3.140.0070.08015.58
5.3.130.0170.07015.58
5.3.120.0130.06715.58
5.3.110.0100.06715.58
5.3.100.0030.08015.58
5.3.90.0070.08015.58
5.3.80.0030.07015.58
5.3.70.0070.06715.58
5.3.60.0070.05715.58
5.3.50.0030.05015.58
5.3.40.0100.06015.58
5.3.30.0070.07315.58
5.3.20.0070.04015.58
5.3.10.0100.04015.58
5.3.00.0170.06315.58
5.2.170.0030.04715.58
5.2.160.0100.05715.58
5.2.150.0070.05015.58
5.2.140.0070.06015.58
5.2.130.0030.06315.58
5.2.120.0100.05015.58
5.2.110.0030.05715.58
5.2.100.0030.06715.58
5.2.90.0000.07015.58
5.2.80.0100.05715.58
5.2.70.0100.05715.58
5.2.60.0030.06015.58
5.2.50.0070.04315.58
5.2.40.0100.05315.58
5.2.30.0070.03015.58
5.2.20.0000.05015.58
5.2.10.0030.03715.58
5.2.00.0030.03715.58
5.1.60.0000.02715.58
5.1.50.0030.04715.58
5.1.40.0070.04715.58
5.1.30.0030.04015.58
5.1.20.0070.05715.58
5.1.10.0000.06015.58
5.1.00.0000.05715.58
5.0.50.0000.03715.58
5.0.40.0070.03715.58
5.0.30.0000.07015.58
5.0.20.0070.03715.58
5.0.10.0030.03715.58
5.0.00.0000.06315.58
4.4.90.0000.02015.58
4.4.80.0030.01715.58
4.4.70.0000.03715.58
4.4.60.0000.01715.58
4.4.50.0030.02015.58
4.4.40.0100.03015.58
4.4.30.0030.03715.58
4.4.20.0000.03315.58
4.4.10.0030.03715.58
4.4.00.0000.05715.58
4.3.110.0030.02015.58
4.3.100.0030.02015.58
4.3.90.0030.03315.58
4.3.80.0000.05315.58
4.3.70.0000.01315.58
4.3.60.0000.03315.58
4.3.50.0000.03715.58
4.3.40.0030.05015.58
4.3.30.0000.03015.58
4.3.20.0000.03015.58
4.3.10.0000.03715.58
4.3.00.0030.03315.58

preferences:
41.16 ms | 400 KiB | 5 Q