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-bmw-x5-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; echo "\n"; } 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() { echo '------'.$this->html; $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 getHTML($url) { if ($url='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"') { return "liste <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>"; } else { return 'fiche <table class="ad-attributes">yesser</table> dfdssd <div id="UserContent">good</div> dfdfdf df df'; } } } $dal = new DAL(); $mail_html = ''; foreach ($dal->getURLRecherches() as $line_num => $line) { echo $line; echo "\n"; $reader = new HTMLReader(); $liste = new AdsListExtractor($reader->getHTML($line)); foreach ($liste->getURLs() as $line_number => $line2) { $htmlfiche = $reader->getHTML($line2); $ad_info = new AdInfoExtractor($htmlfiche); $mail_html = $mail_html . $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.60.0090.00618.55
8.3.50.0250.00522.11
8.3.40.0160.00319.12
8.3.30.0100.00320.20
8.3.20.0080.00019.06
8.3.10.0050.00321.09
8.3.00.0060.00319.79
8.2.180.0040.01217.13
8.2.170.0040.01222.96
8.2.160.0070.01420.47
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.07
8.2.110.0090.00319.37
8.2.100.0040.00818.03
8.2.90.0030.00619.20
8.2.80.0100.00017.97
8.2.70.0040.00417.88
8.2.60.0050.00717.80
8.2.50.0100.00318.07
8.2.40.0080.00020.07
8.2.30.0030.00519.60
8.2.20.0040.00418.09
8.2.10.0040.00418.04
8.2.00.0040.00418.07
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00421.39
8.1.230.0120.00017.77
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0050.00517.38
8.1.190.0030.00617.48
8.1.180.0080.00018.10
8.1.170.0000.00818.83
8.1.160.0000.00719.00
8.1.150.0030.00518.75
8.1.140.0040.00417.53
8.1.130.0000.00717.90
8.1.120.0000.01017.67
8.1.110.0060.00317.62
8.1.100.0030.00517.63
8.1.90.0050.00317.70
8.1.80.0000.00817.61
8.1.70.0040.00417.64
8.1.60.0030.00717.79
8.1.50.0000.00917.70
8.1.40.0050.00317.70
8.1.30.0000.00817.84
8.1.20.0030.00517.82
8.1.10.0030.00517.74
8.1.00.0080.00417.75
8.0.300.0000.00718.77
8.0.290.0030.00517.00
8.0.280.0060.00318.40
8.0.270.0070.00017.33
8.0.260.0000.00717.00
8.0.250.0040.00417.20
8.0.240.0050.00517.11
8.0.230.0070.00017.16
8.0.220.0040.00417.05
8.0.210.0070.00017.15
8.0.200.0050.00317.21
8.0.190.0040.00417.26
8.0.180.0000.00717.24
8.0.170.0060.00317.12
8.0.160.0040.00417.16
8.0.150.0000.00716.99
8.0.140.0040.00417.03
8.0.130.0060.00013.56
8.0.120.0040.00417.13
8.0.110.0000.00816.94
8.0.100.0030.00617.07
8.0.90.0050.00217.17
8.0.80.0100.01017.18
8.0.70.0080.00017.27
8.0.60.0080.00017.21
8.0.50.0030.00517.07
8.0.30.0110.00917.41
8.0.20.0070.01417.40
8.0.10.0080.00017.35
8.0.00.0110.00716.99
7.4.330.0000.00516.83
7.4.320.0020.00516.75
7.4.300.0030.00316.88
7.4.290.0040.00416.89
7.4.280.0060.00216.78
7.4.270.0030.00316.89
7.4.260.0060.00013.46
7.4.250.0050.00316.74
7.4.240.0040.00416.88
7.4.230.0000.00716.91
7.4.220.0050.01416.82
7.4.210.0090.00916.84
7.4.200.0070.00016.89
7.4.190.0070.00016.75
7.4.160.0090.00916.73
7.4.150.0040.01517.40
7.4.140.0100.01017.86
7.4.130.0150.00416.82
7.4.120.0110.00816.75
7.4.110.0100.01016.80
7.4.100.0140.00716.96
7.4.90.0090.01116.80
7.4.80.0140.00619.39
7.4.70.0090.00816.65
7.4.60.0100.01316.80
7.4.50.0030.00616.61
7.4.40.0040.01222.77
7.4.30.0040.01416.87
7.4.00.0130.00315.20
7.3.330.0050.00013.48
7.3.320.0000.00613.44
7.3.310.0000.00816.50
7.3.300.0000.00716.56
7.3.290.0030.01016.59
7.3.280.0050.01316.52
7.3.270.0060.01217.40
7.3.260.0130.00918.24
7.3.250.0140.00316.69
7.3.240.0160.00916.82
7.3.230.0120.00616.65
7.3.210.0040.02116.73
7.3.200.0100.01019.39
7.3.190.0130.01016.68
7.3.180.0140.00716.53
7.3.170.0100.00716.58
7.3.160.0100.00716.68
7.3.120.0000.01415.19
7.3.10.0040.00717.16
7.3.00.0050.00516.96
7.2.330.0100.01016.91
7.2.320.0130.01016.95
7.2.310.0130.00616.90
7.2.300.0080.00816.90
7.2.290.0130.00417.00
7.2.130.0000.01417.00
7.2.120.0000.01417.14
7.2.110.0040.00816.86
7.2.100.0090.00616.99
7.2.90.0000.01417.14
7.2.80.0030.00917.17
7.2.70.0100.00317.42
7.2.60.0070.00716.77
7.2.50.0070.00717.32
7.2.40.0070.00717.23
7.2.30.0000.01017.21
7.2.20.0030.01017.30
7.2.10.0030.00917.14
7.2.00.0080.00418.50
7.1.250.0070.01015.79
7.1.200.0080.00816.02
7.1.70.0080.00417.13
7.1.60.0070.00717.53
7.1.50.0080.00817.29
7.1.40.0070.01516.89
7.1.30.0130.01016.94
7.1.20.0080.00817.16
7.1.10.0090.00316.83
7.1.00.0050.01216.87
7.0.200.0070.01117.01
7.0.190.0060.00616.99
7.0.180.0060.00616.33
7.0.170.0080.00816.57
7.0.160.0140.00516.32
7.0.150.0060.00616.29
7.0.140.0060.00616.45
7.0.130.0100.00517.01
7.0.120.0120.00816.65
7.0.110.0110.00716.54
7.0.100.0040.01416.70
7.0.90.0090.00316.59
7.0.80.0120.00216.54
7.0.70.0080.00416.43
7.0.60.0050.00516.37
7.0.50.0030.00716.54
7.0.40.0070.00414.78
7.0.30.0070.00514.78
7.0.20.0000.01414.78
7.0.10.0080.00814.78
7.0.00.0070.01014.78
5.6.300.0060.04920.91
5.6.290.0030.04820.58
5.6.280.0000.09520.93
5.6.270.0100.04621.02
5.6.260.0030.04520.82
5.6.250.0200.06920.96
5.6.240.0030.04720.95
5.6.230.0210.03920.91
5.6.220.0140.03420.75
5.6.210.0000.05220.57
5.6.200.0060.04520.82
5.6.190.0100.03820.89
5.6.180.0190.02720.82
5.6.170.0100.03820.72
5.6.160.0070.04220.79
5.6.150.0100.08020.79
5.6.140.0000.06020.91
5.6.130.0100.04020.89
5.6.120.0070.08820.78
5.6.110.0100.04720.80
5.6.100.0150.07920.77
5.6.90.0030.04420.73
5.6.80.0070.07120.07
5.6.70.0130.05020.36
5.6.60.0070.05020.36
5.6.50.0160.04220.29
5.6.40.0070.03820.29
5.6.30.0130.07720.14
5.6.20.0040.04720.23
5.6.10.0200.06120.13
5.6.00.0200.06720.13
5.5.380.0000.04317.59
5.5.370.0070.04217.61
5.5.360.0030.04717.54
5.5.350.0070.03917.62
5.5.340.0000.04618.10
5.5.330.0040.03918.09
5.5.320.0070.06017.75
5.5.310.0030.04017.84
5.5.300.0070.07918.09
5.5.290.0000.05118.00
5.5.280.0030.04818.09
5.5.270.0060.04618.02
5.5.260.0070.07318.09
5.5.250.0070.07217.84
5.5.240.0090.05617.45
5.5.230.0030.05417.38
5.5.220.0130.04617.61
5.5.210.0040.04317.44
5.5.200.0100.06817.22
5.5.190.0030.08217.45
5.5.180.0030.07317.53
5.5.160.0170.04717.36
5.5.150.0030.04217.53
5.5.140.0040.04217.52
5.5.130.0090.03517.44
5.5.120.0070.04217.35
5.5.110.0030.04217.43
5.5.100.0000.09417.39
5.5.90.0110.03917.29
5.5.80.0030.03717.00
5.5.70.0030.08117.33
5.5.60.0070.03717.23
5.5.50.0130.03017.33
5.5.40.0030.06017.12
5.5.30.0000.04517.32
5.5.20.0030.04417.29
5.5.10.0070.04017.41
5.5.00.0000.04317.09
5.4.450.0030.04719.56
5.4.440.0090.03619.31
5.4.430.0030.04019.35
5.4.420.0100.05219.45
5.4.410.0130.07219.31
5.4.400.0030.06719.12
5.4.390.0030.04019.08
5.4.380.0000.06519.00
5.4.370.0030.04218.95
5.4.360.0030.04218.98
5.4.350.0070.04819.06
5.4.340.0000.07019.21
5.4.320.0030.04819.11
5.4.310.0000.04218.98
5.4.300.0030.04318.97
5.4.290.0030.04019.06
5.4.280.0030.04019.13
5.4.270.0070.07719.10
5.4.260.0070.06219.09
5.4.250.0170.03618.94
5.4.240.0030.08019.14
5.4.230.0030.04219.10
5.4.220.0070.03619.14
5.4.210.0070.05318.96
5.4.200.0000.04619.10
5.4.190.0030.04118.91
5.4.180.0130.03619.23
5.4.170.0100.03418.88
5.4.160.0100.03918.92
5.4.150.0130.03919.23
5.4.140.0030.03916.80
5.4.130.0070.03216.73
5.4.120.0060.03516.79
5.4.110.0030.03616.75
5.4.100.0070.03416.87
5.4.90.0060.03416.75
5.4.80.0000.04316.74
5.4.70.0070.03416.78
5.4.60.0070.03716.45
5.4.50.0070.03616.75
5.4.40.0070.05216.66
5.4.30.0060.03516.67
5.4.20.0070.03516.75
5.4.10.0030.03616.43
5.4.00.0000.03915.95
5.3.290.0100.03414.78
5.3.280.0000.04314.92
5.3.270.0030.04414.78
5.3.260.0000.04814.98
5.3.250.0030.03714.91
5.3.240.0030.04014.78
5.3.230.0030.03814.82
5.3.220.0070.03414.78
5.3.210.0000.04114.88
5.3.200.0030.04014.87
5.3.190.0100.05714.86
5.3.180.0030.03914.94
5.3.170.0000.06614.87
5.3.160.0030.05314.86
5.3.150.0070.04014.89
5.3.140.0000.04214.83
5.3.130.0060.03514.83
5.3.120.0100.03214.83
5.3.110.0030.03914.83
5.3.100.0030.03514.83
5.3.90.0030.03914.83
5.3.80.0000.04114.83
5.3.70.0030.03614.83
5.3.60.0030.03514.83
5.3.50.0000.03814.83
5.3.40.0060.03414.83
5.3.30.0240.02414.83
5.3.20.0030.04114.83
5.3.10.0070.03714.83
5.3.00.0030.03414.83
5.2.170.0030.02814.83
5.2.160.0000.04414.83
5.2.150.0000.03014.83
5.2.140.0060.02514.83
5.2.130.0030.05814.83
5.2.120.0000.03714.83
5.2.110.0100.02714.83
5.2.100.0070.02514.83
5.2.90.0040.03214.83
5.2.80.0000.03314.83
5.2.70.0030.03414.83
5.2.60.0030.02714.83
5.2.50.0000.03514.83
5.2.40.0030.03014.83
5.2.30.0070.02514.83
5.2.20.0000.03014.83
5.2.10.0030.02614.83
5.2.00.0070.02514.83
5.1.60.0030.02514.83
5.1.50.0060.04214.83
5.1.40.0060.03214.83
5.1.30.0030.02514.83
5.1.20.0030.02514.83
5.1.10.0000.03014.83
5.1.00.0000.02714.83
5.0.50.0030.02014.83
5.0.40.0030.02714.83
5.0.30.0040.02914.83
5.0.20.0000.02214.83
5.0.10.0040.01814.83
5.0.00.0000.03214.83
4.4.90.0000.01714.83
4.4.80.0000.02214.83
4.4.70.0030.01514.83
4.4.60.0030.01314.83
4.4.50.0030.01314.83
4.4.40.0030.02214.83
4.4.30.0000.02814.83
4.4.20.0000.01614.83
4.4.10.0000.02814.83
4.4.00.0000.02714.83
4.3.110.0000.01814.83
4.3.100.0000.01714.83
4.3.90.0000.01714.83
4.3.80.0000.02614.83
4.3.70.0000.01614.83
4.3.60.0040.01214.83
4.3.50.0030.02514.83
4.3.40.0030.02714.83
4.3.30.0000.01614.83
4.3.20.0000.01914.83
4.3.10.0060.01614.83
4.3.00.0030.02014.83

preferences:
41.63 ms | 401 KiB | 5 Q