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); $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.70.0110.00718.53
8.3.60.0150.00418.56
8.3.50.0110.01122.16
8.3.40.0070.00719.08
8.3.30.0100.01019.07
8.3.20.0030.00520.46
8.3.10.0040.00421.95
8.3.00.0040.00422.45
8.2.180.0120.00617.00
8.2.170.0070.00722.96
8.2.160.0070.00719.33
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.86
8.2.110.0030.00622.27
8.2.100.0090.00319.74
8.2.90.0080.00019.36
8.2.80.0030.00517.97
8.2.70.0030.00617.74
8.2.60.0080.00018.04
8.2.50.0040.00418.07
8.2.40.0030.00518.28
8.2.30.0040.00418.13
8.2.20.0080.00017.88
8.2.10.0050.00317.93
8.2.00.0080.00017.92
8.1.280.0150.00325.92
8.1.270.0030.00523.99
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0060.00324.01
8.1.230.0040.00719.28
8.1.220.0090.00017.91
8.1.210.0000.00818.77
8.1.200.0030.00717.73
8.1.190.0040.00417.55
8.1.180.0030.00618.84
8.1.170.0030.00618.70
8.1.160.0000.00722.13
8.1.150.0040.00418.80
8.1.140.0000.00817.57
8.1.130.0030.00317.78
8.1.120.0000.00717.63
8.1.110.0000.00917.56
8.1.100.0040.00417.66
8.1.90.0040.00417.72
8.1.80.0000.00717.66
8.1.70.0040.00417.65
8.1.60.0060.00317.78
8.1.50.0040.00417.73
8.1.40.0000.00817.77
8.1.30.0040.00417.80
8.1.20.0000.00917.88
8.1.10.0040.00417.72
8.1.00.0030.00617.71
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0000.00718.54
8.0.270.0040.00417.41
8.0.260.0000.00817.08
8.0.250.0040.00417.19
8.0.240.0040.00417.09
8.0.230.0030.00517.22
8.0.220.0030.00317.05
8.0.210.0000.00717.16
8.0.200.0030.00317.32
8.0.190.0030.00517.18
8.0.180.0000.00817.22
8.0.170.0030.00517.05
8.0.160.0000.00817.26
8.0.150.0080.00017.06
8.0.140.0000.00717.13
8.0.130.0000.00713.66
8.0.120.0000.00817.21
8.0.110.0040.00416.99
8.0.100.0000.00817.16
8.0.90.0040.00417.06
8.0.80.0030.01317.19
8.0.70.0030.00617.05
8.0.60.0020.00517.04
8.0.50.0040.00416.96
8.0.30.0080.01217.51
8.0.20.0090.01417.51
8.0.10.0000.00717.13
8.0.00.0140.00517.14
7.4.330.0050.00015.12
7.4.320.0060.00016.88
7.4.300.0030.00316.77
7.4.290.0070.00016.78
7.4.280.0000.00716.81
7.4.270.0070.00016.80
7.4.260.0000.01016.77
7.4.250.0020.00516.74
7.4.240.0020.00616.84
7.4.230.0030.00316.90
7.4.220.0090.00916.83
7.4.210.0070.01016.89
7.4.200.0000.00716.83
7.4.190.0040.00416.66
7.4.160.0100.00616.70
7.4.150.0070.01017.40
7.4.140.0100.00817.86
7.4.130.0080.01016.73
7.4.120.0090.00916.77
7.4.110.0040.01416.89
7.4.100.0090.00916.70
7.4.90.0120.00616.85
7.4.80.0170.00719.39
7.4.70.0130.01016.60
7.4.60.0110.00616.77
7.4.50.0030.00616.71
7.4.40.0130.00022.77
7.4.30.0030.02016.87
7.4.00.0030.01415.30
7.3.330.0050.00013.57
7.3.320.0030.00313.59
7.3.310.0030.00316.61
7.3.300.0030.00316.60
7.3.290.0100.00616.55
7.3.280.0100.00916.51
7.3.270.0090.00917.40
7.3.260.0110.01416.62
7.3.250.0090.00916.57
7.3.240.0080.00816.77
7.3.230.0030.01716.57
7.3.210.0140.00916.72
7.3.200.0070.01319.39
7.3.190.0090.00916.63
7.3.180.0060.01016.72
7.3.170.0080.00816.68
7.3.160.0100.00716.91
7.3.120.0040.01315.12
7.3.110.0100.00715.07
7.3.100.0090.00614.96
7.3.90.0110.00715.41
7.3.80.0040.01215.30
7.3.70.0080.00815.09
7.3.60.0080.00414.83
7.3.50.0000.01415.13
7.3.40.0130.00314.89
7.3.30.0060.01015.03
7.3.20.0060.00616.94
7.3.10.0000.00916.84
7.3.00.0030.01216.90
7.2.330.0090.00916.90
7.2.320.0090.00917.04
7.2.310.0040.01316.95
7.2.300.0130.00317.05
7.2.290.0090.00817.01
7.2.250.0030.01715.37
7.2.240.0000.02115.39
7.2.230.0030.00915.06
7.2.220.0040.01415.09
7.2.210.0000.01915.08
7.2.200.0060.01315.21
7.2.190.0060.00314.93
7.2.180.0040.01115.25
7.2.170.0070.00715.27
7.1.330.0000.01515.93
7.1.320.0060.00615.99
7.1.310.0030.01015.80
7.1.300.0030.01016.08
7.1.290.0070.00716.00
7.1.280.0070.00316.14
7.1.270.0040.00416.02
7.1.260.0070.00715.85
7.1.70.0040.00817.45
7.1.60.0110.01119.82
7.1.50.0220.00417.06
7.1.00.0000.07322.29
7.0.200.0200.00316.68
7.0.140.0070.07022.13
7.0.60.0000.04719.92
7.0.50.0070.03717.91
7.0.40.0130.08020.26
7.0.30.0170.04020.29
7.0.20.0230.05320.39
7.0.10.0100.04020.10
7.0.00.0070.05020.08
5.6.280.0030.07321.14
5.6.210.0070.04020.74
5.6.200.0070.08018.21
5.6.190.0130.04020.61
5.6.180.4430.05020.39
5.6.170.0230.08020.40
5.6.160.0000.08720.55
5.6.150.0070.03718.14
5.6.140.0070.03718.31
5.6.130.0070.08018.27
5.6.120.0030.04020.92
5.6.110.0070.04021.07
5.6.100.0130.08321.09
5.6.90.0100.03721.05
5.6.80.0100.03720.52
5.6.70.3770.03720.36
5.5.350.0100.07020.40
5.5.340.0130.07018.09
5.5.330.0100.05020.27
5.5.320.3600.04020.20
5.5.310.0300.04320.21
5.5.300.0170.06017.98
5.5.290.0030.04017.96
5.5.280.0070.07320.86
5.5.270.0130.07720.75
5.5.260.0030.05020.67
5.5.250.0170.07020.73
5.5.240.0130.04020.26
5.4.450.0400.05319.32
5.4.440.0530.04719.55
5.4.430.0430.07019.33
5.4.420.0670.06019.32
5.4.410.0530.04719.32
5.4.400.1170.00018.75
5.4.390.1100.00018.84
5.4.380.0230.06018.83
5.4.370.0230.05318.63
5.4.360.0330.05018.63
5.4.350.0230.06018.84
5.4.340.0370.04318.55
5.4.320.0080.03312.52
5.4.310.0090.03712.52
5.4.300.0100.03812.52
5.4.290.0050.03812.51
5.4.280.0050.03812.41
5.4.270.0150.04012.41
5.4.260.0200.07018.80
5.4.250.0070.05718.99
5.4.240.0170.05718.97
5.4.230.0130.04718.76
5.4.220.0170.04318.99
5.4.210.0100.05318.98
5.4.200.0070.05318.98
5.4.190.0170.05018.83
5.4.180.0130.05318.83
5.4.170.0130.04718.83
5.4.160.0130.06718.95
5.4.150.0100.08319.07
5.4.140.0270.05016.48
5.4.130.0100.05016.58
5.4.120.0070.07016.62
5.4.110.0070.05016.70
5.4.100.0030.07016.47
5.4.90.0070.04716.60
5.4.80.0130.04316.54
5.4.70.0100.06016.55
5.4.60.0130.04316.41
5.4.50.0200.06016.34
5.4.40.0130.04316.54
5.4.30.0100.05716.47
5.4.20.0070.05016.44
5.4.10.0030.06016.50
5.4.00.0100.06716.01
5.3.290.0140.04912.80
5.3.280.0130.04714.78
5.3.270.0000.07314.85
5.3.260.0170.04714.64
5.3.250.0070.06714.61
5.3.240.0130.04714.80
5.3.230.0270.04014.75
5.3.220.0030.06014.49
5.3.210.0100.07014.81
5.3.200.0130.04314.67
5.3.190.0230.03314.61
5.3.180.0170.04314.60
5.3.170.0100.04714.72
5.3.160.0030.05314.71
5.3.150.0000.08314.58
5.3.140.0130.04714.66
5.3.130.0000.06014.58
5.3.120.0130.04714.66
5.3.110.0100.05014.47
5.3.100.0030.05714.28
5.3.90.0030.05014.13
5.3.80.0100.06314.01
5.3.70.0030.05714.20
5.3.60.0200.06013.84
5.3.50.0230.06014.20
5.3.40.0070.05013.80
5.3.30.0030.05313.91
5.3.20.0130.04013.75
5.3.10.0030.05013.74
5.3.00.0130.04313.82
5.2.170.0130.03311.25
5.2.160.0070.04011.35
5.2.150.0100.04011.16
5.2.140.0070.04011.15
5.2.130.0100.03711.20
5.2.120.0100.03711.03
5.2.110.0070.03711.11
5.2.100.0030.04011.09
5.2.90.0170.02711.13
5.2.80.0170.03011.02
5.2.70.0100.03711.20
5.2.60.0030.04310.98
5.2.50.0030.04011.14
5.2.40.0070.04011.11
5.2.30.0070.04010.96
5.2.20.0070.04010.96
5.2.10.0030.04311.06
5.2.00.0000.04310.81
5.1.60.0030.04010.01
5.1.50.0030.03710.17
5.1.40.0030.03710.09
5.1.30.0070.03310.34
5.1.20.0130.04010.59
5.1.10.0000.0439.94
5.1.00.0030.03710.07
5.0.50.0070.0278.58
5.0.40.0000.0308.53
5.0.30.0070.0408.24
5.0.20.0000.0308.19
5.0.10.0000.0308.20
5.0.00.0000.0438.23
4.4.90.0100.0136.27
4.4.80.0030.0206.27
4.4.70.0000.0236.27
4.4.60.0000.0336.27
4.4.50.0000.0236.27
4.4.40.0000.0506.27
4.4.30.0030.0236.27
4.4.20.0070.0176.27
4.4.10.0000.0236.27
4.4.00.0070.0306.27
4.3.110.0070.0206.27
4.3.100.0030.0206.27
4.3.90.0000.0306.27
4.3.80.0070.0306.27
4.3.70.0070.0276.27
4.3.60.0000.0236.27
4.3.50.0070.0176.27
4.3.40.0000.0336.27
4.3.30.0070.0176.27
4.3.20.0000.0236.27
4.3.10.0070.0176.27
4.3.00.0100.0276.63

preferences:
50.4 ms | 401 KiB | 5 Q