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() { $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); $dal = new DAL(); foreach ($dal->getURLRecherches() as $line_num => $line) { echo $line; echo "\n"; $reader = new HTMLReader(); $liste = new AdsListExtractor($reader->getHMTL($line)); foreach ($liste->getURLs() as $line_num => $line) { $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.0060.01318.52
8.3.50.0120.00822.17
8.3.40.0120.00319.07
8.3.30.0120.00319.17
8.3.20.0050.00320.43
8.3.10.0040.00421.96
8.3.00.0000.00822.32
8.2.180.0090.00616.75
8.2.170.0150.00022.96
8.2.160.0120.00319.04
8.2.150.0080.00024.18
8.2.140.0110.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.74
8.2.110.0060.00321.16
8.2.100.0040.00818.22
8.2.90.0050.00318.22
8.2.80.0000.00818.21
8.2.70.0030.00517.88
8.2.60.0040.00417.88
8.2.50.0080.00017.88
8.2.40.0050.00321.15
8.2.30.0040.00418.09
8.2.20.0030.00517.98
8.2.10.0040.00418.13
8.2.00.0040.00417.99
8.1.280.0110.00425.92
8.1.270.0090.00023.99
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0060.00323.82
8.1.230.0060.00621.16
8.1.220.0000.00817.88
8.1.210.0090.00019.07
8.1.200.0030.00617.60
8.1.190.0080.00017.47
8.1.180.0030.00518.10
8.1.170.0040.00419.14
8.1.160.0000.00722.28
8.1.150.0000.00818.72
8.1.140.0080.00017.71
8.1.130.0000.00717.84
8.1.120.0040.00317.70
8.1.110.0040.00417.71
8.1.100.0030.00417.68
8.1.90.0070.00017.72
8.1.80.0050.00217.68
8.1.70.0000.00717.65
8.1.60.0090.00017.74
8.1.50.0080.00017.76
8.1.40.0000.00917.70
8.1.30.0040.00417.84
8.1.20.0030.00517.77
8.1.10.0050.00317.79
8.1.00.0050.00317.74
8.0.300.0040.00419.98
8.0.290.0040.00417.13
8.0.280.0050.00318.48
8.0.270.0040.00417.34
8.0.260.0000.00617.00
8.0.250.0050.00217.12
8.0.240.0000.00817.14
8.0.230.0000.00717.11
8.0.220.0040.00417.13
8.0.210.0030.00317.03
8.0.200.0070.00017.25
8.0.190.0000.00817.20
8.0.180.0040.00417.05
8.0.170.0040.00417.15
8.0.160.0040.00416.98
8.0.150.0000.00817.00
8.0.140.0070.00017.13
8.0.130.0000.00613.61
8.0.120.0000.00717.15
8.0.110.0030.00617.19
8.0.100.0000.00717.18
8.0.90.0030.00517.13
8.0.80.0120.00617.11
8.0.70.0000.00816.99
8.0.60.0040.00417.23
8.0.50.0000.00817.17
8.0.30.0090.01117.39
8.0.20.0100.01017.43
8.0.10.0040.00417.25
8.0.00.0060.01217.06
7.4.330.0050.00015.04
7.4.320.0000.00616.93
7.4.300.0000.00616.78
7.4.290.0030.00316.76
7.4.280.0070.00016.79
7.4.270.0000.00816.68
7.4.260.0030.00716.78
7.4.250.0030.00516.85
7.4.240.0000.00716.84
7.4.230.0000.00716.52
7.4.220.0040.01316.74
7.4.210.0100.00616.85
7.4.200.0080.00016.89
7.4.190.0070.00016.93
7.4.160.0170.00016.92
7.4.150.0130.00417.40
7.4.140.0110.00917.86
7.4.130.0080.01316.85
7.4.120.0110.00616.85
7.4.110.0100.00716.80
7.4.100.0070.01116.89
7.4.90.0110.00716.84
7.4.80.0090.00919.39
7.4.70.0080.01516.80
7.4.60.0110.00816.87
7.4.50.0030.00616.52
7.4.40.0060.00922.77
7.4.30.0060.01216.90
7.4.00.0070.01015.39
7.3.330.0030.00313.52
7.3.320.0050.00013.61
7.3.310.0050.00216.56
7.3.300.0000.00716.61
7.3.290.0060.00916.59
7.3.280.0090.00916.52
7.3.270.0140.00317.40
7.3.260.0030.01516.59
7.3.250.0130.01016.57
7.3.240.0030.01516.72
7.3.230.0130.01016.71
7.3.210.0130.01316.76
7.3.200.0120.00819.39
7.3.190.0110.01116.57
7.3.180.0070.01116.46
7.3.170.0040.01416.70
7.3.160.0060.01216.77
7.3.120.0000.01414.99
7.3.00.0070.01016.48
7.2.330.0070.01116.67
7.2.320.0030.01516.91
7.2.310.0080.01216.95
7.2.300.0120.00616.97
7.2.290.0060.01316.88
7.2.130.0030.00716.96
7.2.120.0120.00316.90
7.2.110.0070.01016.93
7.2.100.0130.00317.14
7.2.90.0070.01017.11
7.2.80.0110.00416.71
7.2.70.0060.01317.09
7.2.60.0050.01317.04
7.2.50.0050.00717.11
7.2.40.0070.01117.11
7.2.30.0040.01117.11
7.2.20.0060.00617.14
7.2.10.0100.00716.76
7.2.00.0150.00417.09
7.1.250.0040.01216.01
7.1.240.0070.00715.87
7.1.230.0090.00615.99
7.1.220.0070.00715.95
7.1.210.0070.00715.82
7.1.200.0030.00915.99
7.1.190.0090.00315.70
7.1.180.0070.00715.88
7.1.170.0120.00315.89
7.1.160.0030.01315.86
7.1.150.0070.01015.93
7.1.140.0100.00315.89
7.1.130.0060.00916.02
7.1.120.0040.01115.98
7.1.110.0060.00915.80
7.1.100.0050.00515.98
7.1.90.0030.01015.85
7.1.80.0100.00316.02
7.1.70.0060.00516.74
7.1.60.0040.00816.74
7.1.50.0100.00616.49
7.1.40.0060.00615.77
7.1.30.0030.01015.84
7.1.20.0030.01016.13
7.1.10.0070.00715.68
7.1.00.0050.04319.08
7.0.330.0100.00315.33
7.0.320.0110.00715.64
7.0.310.0080.00815.63
7.0.300.0100.00315.29
7.0.290.0070.00715.35
7.0.280.0060.01015.63
7.0.270.0030.01015.69
7.0.260.0140.00015.39
7.0.250.0060.00615.24
7.0.240.0040.00815.52
7.0.230.0030.00715.34
7.0.220.0060.00615.53
7.0.210.0130.00015.38
7.0.200.0040.00816.06
7.0.190.0030.01015.53
7.0.180.0100.00315.68
7.0.170.0060.00915.61
7.0.160.0120.00015.60
7.0.150.0060.00915.47
7.0.140.0140.03218.81
7.0.130.0110.00315.39
7.0.120.0110.00415.19
7.0.110.0050.04617.75
7.0.100.0080.04117.71
7.0.90.0080.04017.68
7.0.80.0120.03017.79
7.0.70.0110.03717.83
7.0.60.0070.04017.81
7.0.50.0120.03817.72
7.0.40.0080.03516.61
7.0.30.0070.02116.59
7.0.20.0070.04416.49
7.0.10.0030.04516.61
7.0.00.0120.03616.52
5.6.380.0040.01114.46
5.6.370.0030.00614.50
5.6.360.0030.01314.54
5.6.350.0060.00314.46
5.6.340.0040.00714.49
5.6.330.0070.00414.26
5.6.320.0080.00414.57
5.6.310.0070.01114.34
5.6.300.0030.00914.23
5.6.290.0030.01214.30
5.6.280.0070.03517.62
5.6.270.0080.00814.40
5.6.260.0100.04317.79
5.6.250.0160.03817.52
5.6.240.0130.03817.47
5.6.230.0030.04717.70
5.6.220.0130.02317.43
5.6.210.0000.04817.45
5.6.200.0080.02017.54
5.6.190.0010.02617.36
5.6.180.0030.04817.43
5.6.170.0060.02717.38
5.6.160.0100.03917.51
5.6.150.0040.03317.59
5.6.140.0050.03817.49
5.6.130.0070.02417.56
5.6.120.0100.01717.52
5.6.110.0110.03317.52
5.6.100.0070.04717.48
5.6.90.0050.02617.60
5.6.80.0050.03717.09
5.6.70.0070.02017.14
5.6.60.0020.03517.31
5.6.50.0100.03817.02
5.6.40.0050.04716.95
5.6.30.0050.04717.20
5.6.20.0080.03517.07
5.6.10.0020.02717.15
5.6.00.0090.03717.21
5.5.380.0050.04514.50
5.5.370.0050.03214.58
5.5.360.0060.02614.26
5.5.350.0100.01814.47
5.5.340.0020.03914.58
5.5.330.0090.04114.66
5.5.320.0020.04714.60
5.5.310.0120.03514.54
5.5.300.0040.04614.57
5.5.290.0090.03814.56
5.5.280.0070.02414.73
5.5.270.0020.04414.51
5.5.260.0030.03914.41
5.5.250.0020.03614.35
5.5.240.0150.03214.26
5.5.230.0070.04014.25
5.5.220.0090.03714.19
5.5.210.0100.03414.25
5.5.200.0100.03814.31
5.5.190.0070.04014.34
5.5.180.0120.04214.22
5.5.170.0070.01011.05
5.5.160.0070.02314.29
5.5.150.0120.02114.40
5.5.140.0130.02814.40
5.5.130.0070.04014.47
5.5.120.0040.04514.34
5.5.110.0020.04814.27
5.5.100.0050.04314.39
5.5.90.0100.03814.28
5.5.80.0100.03014.18
5.5.70.0120.03414.41
5.5.60.0110.03714.45
5.5.50.0050.04314.42
5.5.40.0070.03714.21
5.5.30.0030.04414.34
5.5.20.0140.03314.25
5.5.10.0060.02614.22
5.5.00.0060.02914.14
5.4.450.0120.03515.58
5.4.440.0050.03415.26
5.4.430.0100.03515.39
5.4.420.0090.04115.32
5.4.410.0040.02015.33
5.4.400.0020.04414.98
5.4.390.0030.02115.19
5.4.380.0070.04314.98
5.4.370.0030.02215.22
5.4.360.0050.02015.03
5.4.350.0060.04015.12
5.4.340.0100.03015.11
5.4.330.0000.01111.23
5.4.320.0030.03515.07
5.4.310.0030.04415.06
5.4.300.0040.04215.06
5.4.290.0090.03715.15
5.4.280.0120.03215.29
5.4.270.0050.04015.07
5.4.260.0030.04114.94
5.4.250.0130.03315.14
5.4.240.0050.04215.12
5.4.230.0120.03415.10
5.4.220.0070.04015.14
5.4.210.0090.03415.10
5.4.200.0050.03815.04
5.4.190.0050.04115.14
5.4.180.0000.04914.96
5.4.170.0070.02114.92
5.4.160.0110.03515.05
5.4.150.0050.03615.01
5.4.140.0050.04113.79
5.4.130.0060.03914.02
5.4.120.0060.02313.88
5.4.110.0060.03913.86
5.4.100.0090.03913.96
5.4.90.0080.03213.94
5.4.80.0080.01813.86
5.4.70.0040.03313.75
5.4.60.0080.03113.66
5.4.50.0040.03913.74
5.4.40.0030.03113.96
5.4.30.0060.02913.79
5.4.20.0100.03513.88
5.4.10.0080.03413.80
5.4.00.0050.04013.53
5.3.290.0060.04012.72
5.3.280.0070.02512.80
5.3.270.0030.04112.88
5.3.260.0130.03412.83
5.3.250.0040.02812.88
5.3.240.0130.01812.88
5.3.230.0100.03612.77
5.3.220.0070.03912.74
5.3.210.0060.04012.75
5.3.200.0080.04012.75
5.3.190.0140.03712.74
5.3.180.0060.04112.75
5.3.170.0040.03812.75
5.3.160.0070.02312.81
5.3.150.0080.03012.73
5.3.140.0050.01912.76
5.3.130.0040.02212.66
5.3.120.0070.03912.73
5.3.110.0050.02112.72
5.3.100.0060.03912.49
5.3.90.0020.03712.47
5.3.80.0100.03312.51
5.3.70.0090.01812.47
5.3.60.0060.03612.53
5.3.50.0070.01812.45
5.3.40.0020.04312.47
5.3.30.0020.04412.42
5.3.20.0050.02212.30
5.3.10.0050.03812.28
5.3.00.0050.03312.21
5.2.170.0000.03511.42
5.2.160.0070.01511.42
5.2.150.0070.02911.42
5.2.140.0060.02111.42
5.2.130.0040.02011.42
5.2.120.0020.03511.42
5.2.110.0070.03111.42
5.2.100.0030.02311.42
5.2.90.0100.02111.42
5.2.80.0040.03611.42
5.2.70.0080.01711.42
5.2.60.0030.01911.42
5.2.50.0040.02811.42
5.2.40.0030.02911.42
5.2.30.0010.02111.42
5.2.20.0020.03011.42
5.2.10.0050.02211.42
5.2.00.0050.03011.42
5.1.60.0050.02511.42
5.1.50.0030.02111.42
5.1.40.0030.01511.42
5.1.30.0050.02011.42
5.1.20.0040.01511.42
5.1.10.0020.01911.42
5.1.00.0040.01711.42
5.0.50.0010.02811.42
5.0.40.0050.02111.42
5.0.30.0030.03511.42
5.0.20.0040.02711.42
5.0.10.0080.01711.42
5.0.00.0050.03111.42
4.4.90.0020.01911.42
4.4.80.0020.01811.42
4.4.70.0050.01511.42
4.4.60.0010.01811.42
4.4.50.0020.01911.42
4.4.40.0050.02011.42
4.4.30.0030.01511.42
4.4.20.0010.02011.42
4.4.10.0040.00811.42
4.4.00.0020.01511.42
4.3.110.0010.01011.42
4.3.100.0030.01811.42
4.3.90.0020.02211.42
4.3.80.0010.01911.42
4.3.70.0020.01011.42
4.3.60.0010.01911.42
4.3.50.0070.01211.42
4.3.40.0000.03211.42
4.3.30.0030.01011.42
4.3.20.0030.01711.42
4.3.10.0020.01611.42
4.3.00.0000.01611.42

preferences:
45 ms | 401 KiB | 5 Q