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 = 0; 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[0] . $b[0]; } } 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.60.0100.01018.22
8.3.50.0140.00722.05
8.3.40.0110.00719.07
8.3.30.0120.00319.04
8.3.20.0040.00420.16
8.3.10.0050.00222.09
8.3.00.0000.00822.46
8.2.180.0100.00616.75
8.2.170.0030.01422.96
8.2.160.0000.01419.26
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.01126.16
8.2.120.0000.00819.61
8.2.110.0000.00822.20
8.2.100.0060.00618.03
8.2.90.0040.00418.00
8.2.80.0050.00317.97
8.2.70.0000.00818.05
8.2.60.0040.00418.04
8.2.50.0030.00518.16
8.2.40.0040.00420.32
8.2.30.0040.00418.09
8.2.20.0060.00317.91
8.2.10.0030.00617.81
8.2.00.0060.00317.86
8.1.280.0170.00325.92
8.1.270.0000.00723.99
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00723.91
8.1.230.0080.00419.04
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0060.00317.47
8.1.190.0040.00417.47
8.1.180.0000.00918.10
8.1.170.0000.00918.69
8.1.160.0050.00222.21
8.1.150.0000.00718.89
8.1.140.0050.00317.63
8.1.130.0030.00317.78
8.1.120.0000.00717.64
8.1.110.0000.00817.64
8.1.100.0060.00317.55
8.1.90.0000.00717.67
8.1.80.0000.00817.53
8.1.70.0000.00717.62
8.1.60.0030.00517.64
8.1.50.0050.00317.75
8.1.40.0080.00017.69
8.1.30.0030.00517.82
8.1.20.0030.00517.88
8.1.10.0040.00417.73
8.1.00.0040.00417.59
8.0.300.0040.00419.91
8.0.290.0080.00016.88
8.0.280.0030.00318.42
8.0.270.0050.00317.37
8.0.260.0030.00316.86
8.0.250.0040.00417.11
8.0.240.0070.00017.08
8.0.230.0070.00017.02
8.0.220.0040.00417.05
8.0.210.0000.00716.94
8.0.200.0040.00417.13
8.0.190.0060.00317.18
8.0.180.0070.00017.02
8.0.170.0020.00517.00
8.0.160.0080.00017.09
8.0.150.0040.00417.00
8.0.140.0000.00817.04
8.0.130.0060.00013.54
8.0.120.0030.00516.92
8.0.110.0000.00817.14
8.0.100.0000.00817.18
8.0.90.0000.00817.10
8.0.80.0070.01017.07
8.0.70.0040.00416.96
8.0.60.0000.00717.02
8.0.50.0040.00417.09
8.0.30.0080.01117.30
8.0.20.0110.01117.53
8.0.10.0000.00717.08
8.0.00.0040.01517.04
7.4.330.0050.00015.05
7.4.320.0030.00316.82
7.4.300.0060.00016.75
7.4.290.0000.00716.79
7.4.280.0070.00016.86
7.4.270.0000.00816.85
7.4.260.0000.00816.75
7.4.250.0080.00016.85
7.4.240.0040.00416.85
7.4.230.0000.00716.66
7.4.220.0110.00716.89
7.4.210.0040.01016.89
7.4.200.0040.00416.92
7.4.190.0030.00516.71
7.4.160.0060.00916.82
7.4.150.0120.00617.40
7.4.140.0090.00917.86
7.4.130.0100.01016.71
7.4.120.0120.00516.69
7.4.110.0060.01016.57
7.4.100.0070.01016.75
7.4.90.0040.01816.89
7.4.80.0090.00919.39
7.4.70.0160.00616.61
7.4.60.0070.01016.82
7.4.50.0070.00316.74
7.4.40.0070.01022.77
7.4.30.0110.00716.55
7.4.00.0030.01315.28
7.3.330.0050.00013.46
7.3.320.0000.00513.48
7.3.310.0000.00716.57
7.3.300.0030.00316.41
7.3.290.0070.00716.46
7.3.280.0070.01316.50
7.3.270.0120.00617.40
7.3.260.0120.00916.50
7.3.250.0130.00516.64
7.3.240.0090.00916.68
7.3.230.0090.01316.64
7.3.210.0080.00816.62
7.3.200.0040.01319.39
7.3.190.0090.00916.75
7.3.180.0090.00616.66
7.3.170.0070.01016.59
7.3.160.0120.00816.44
7.3.120.0080.00515.12
7.2.330.0160.00016.97
7.2.320.0070.01016.92
7.2.310.0000.02416.95
7.2.300.0080.01117.01
7.2.290.0110.00717.02
7.1.70.0030.01017.49
7.1.60.0140.01119.82
7.1.50.0070.01717.14
7.1.00.0000.08022.37
7.0.200.0060.00616.86
7.0.140.0030.07722.09
7.0.60.0100.07319.83
7.0.50.0000.04717.87
7.0.40.0170.08020.07
7.0.30.0230.06320.13
7.0.20.0230.08020.32
7.0.10.0070.05020.12
7.0.00.0030.04020.25
5.6.280.0070.06721.14
5.6.210.0200.06720.53
5.6.200.0070.08018.16
5.6.190.0030.08720.61
5.6.180.0100.08020.34
5.6.170.0400.06320.52
5.6.160.0000.04320.61
5.6.150.0070.08318.25
5.6.140.0030.03718.26
5.6.130.0130.03018.17
5.6.120.0070.05321.03
5.6.110.0100.07021.13
5.6.100.0130.07021.05
5.6.90.0070.05020.97
5.6.80.0000.04020.39
5.6.70.2070.02720.48
5.5.350.0030.03320.46
5.5.340.0130.06317.98
5.5.330.0070.04020.29
5.5.320.0200.08020.30
5.5.310.0170.04020.27
5.5.300.0000.04718.04
5.5.290.0070.07318.09
5.5.280.0070.06720.98
5.5.270.0100.07720.81
5.5.260.0000.04320.89
5.5.250.0000.08320.57
5.5.240.0030.04020.06
5.4.450.0570.05019.56
5.4.440.0030.06019.70
5.4.430.0500.05319.47
5.4.420.0500.06019.70
5.4.410.0730.05319.35
5.4.400.1030.00018.82
5.4.390.0800.00018.61
5.4.380.0400.04018.80
5.4.370.0330.04318.58
5.4.360.0200.05318.64
5.4.350.0200.06018.77
5.4.340.0330.05018.73
5.4.320.0060.03912.52
5.4.310.0040.03912.52
5.4.300.0090.04012.52
5.4.290.0070.04212.52
5.4.280.0080.03512.41
5.4.270.0050.04112.41
5.4.260.0100.05319.09
5.4.250.0100.07019.02
5.4.240.0130.05719.02
5.4.230.0100.05018.76
5.4.220.0030.06319.01
5.4.210.0130.05718.73
5.4.200.0070.05318.79
5.4.190.0030.06319.01
5.4.180.0030.05718.92
5.4.170.0070.07318.78
5.4.160.0200.05018.97
5.4.150.0100.06318.91
5.4.140.0100.04716.59
5.4.130.0070.06016.41
5.4.120.0130.06716.38
5.4.110.0130.06016.70
5.4.100.0130.04016.53
5.4.90.0170.03716.41
5.4.80.0170.05316.50
5.4.70.0170.04016.42
5.4.60.0170.04716.47
5.4.50.0130.05016.50
5.4.40.0130.04716.67
5.4.30.0030.05316.34
5.4.20.0130.06716.45
5.4.10.0130.08016.58
5.4.00.0170.04016.04
5.3.290.0080.03912.80
5.3.280.0100.05014.45
5.3.270.0100.05014.81
5.3.260.0130.07314.59
5.3.250.0030.05314.76
5.3.240.0100.05314.61
5.3.230.0270.04014.70
5.3.220.0100.05014.49
5.3.210.0170.07014.61
5.3.200.0130.04714.75
5.3.190.0100.06714.42
5.3.180.0130.07314.76
5.3.170.0030.05314.67
5.3.160.0100.07314.80
5.3.150.0030.08014.59
5.3.140.0230.05314.64
5.3.130.0170.06014.56
5.3.120.0030.05714.47
5.3.110.0100.04714.65
5.3.100.0000.07714.14
5.3.90.0030.07714.26
5.3.80.0100.05013.94
5.3.70.0000.05714.12
5.3.60.0130.06713.98
5.3.50.0030.05013.97
5.3.40.0070.05314.19
5.3.30.0130.04314.00
5.3.20.0100.04713.88
5.3.10.0100.05013.68
5.3.00.0100.04713.64
5.2.170.0100.03311.07
5.2.160.0070.04011.12
5.2.150.0030.04311.14
5.2.140.0070.04011.24
5.2.130.0030.06310.97
5.2.120.0070.05711.19
5.2.110.0070.05011.19
5.2.100.0100.03711.12
5.2.90.0100.03311.30
5.2.80.0200.04011.21
5.2.70.0070.06311.29
5.2.60.0070.06011.05
5.2.50.0100.03711.11
5.2.40.0030.04311.09
5.2.30.0130.04711.17
5.2.20.0030.04311.15
5.2.10.0030.04010.90
5.2.00.0100.03710.73
5.1.60.0030.0339.86
5.1.50.0100.0339.97
5.1.40.0070.0479.95
5.1.30.0000.04310.43
5.1.20.0030.05310.46
5.1.10.0100.03010.04
5.1.00.0130.02710.10
5.0.50.0000.0308.62
5.0.40.0030.0378.45
5.0.30.0030.0478.17
5.0.20.0070.0308.17
5.0.10.0030.0338.26
5.0.00.0000.0478.16
4.4.90.0030.0206.27
4.4.80.0030.0306.27
4.4.70.0000.0236.27
4.4.60.0030.0236.27
4.4.50.0030.0206.27
4.4.40.0000.0376.27
4.4.30.0070.0176.27
4.4.20.0000.0306.27
4.4.10.0100.0136.27
4.4.00.0030.0336.27
4.3.110.0000.0336.27
4.3.100.0000.0336.27
4.3.90.0070.0236.27
4.3.80.0070.0336.27
4.3.70.0030.0206.27
4.3.60.0030.0276.27
4.3.50.0070.0306.27
4.3.40.0030.0476.27
4.3.30.0000.0236.27
4.3.20.0100.0276.27
4.3.10.0000.0236.27
4.3.00.0070.0236.84

preferences:
48.5 ms | 401 KiB | 5 Q