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 "<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 'dhoaudg od oaeywgdoad <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_num => $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.0100.01316.86
8.3.50.0110.00822.22
8.3.40.0120.00419.27
8.3.30.0140.00019.36
8.3.20.0030.00620.51
8.3.10.0080.00023.59
8.3.00.0080.00020.95
8.2.180.0100.01017.00
8.2.170.0070.00722.96
8.2.160.0110.00620.39
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0140.00426.16
8.2.120.0050.00321.11
8.2.110.0070.00320.50
8.2.100.0090.00318.16
8.2.90.0000.00818.47
8.2.80.0000.00917.97
8.2.70.0060.00318.00
8.2.60.0000.00918.03
8.2.50.0080.00018.07
8.2.40.0000.00818.34
8.2.30.0050.00518.45
8.2.20.0040.00418.05
8.2.10.0000.00818.23
8.2.00.0040.00418.06
8.1.280.0120.00325.92
8.1.270.0080.00022.31
8.1.260.0030.00526.35
8.1.250.0090.00028.09
8.1.240.0060.00322.18
8.1.230.0000.01220.81
8.1.220.0080.00017.78
8.1.210.0040.00419.00
8.1.200.0030.00717.60
8.1.190.0000.00817.60
8.1.180.0050.00518.10
8.1.170.0030.00518.77
8.1.160.0040.00422.14
8.1.150.0040.00418.84
8.1.140.0040.00417.65
8.1.130.0030.00317.84
8.1.120.0050.00317.69
8.1.110.0040.00417.68
8.1.100.0030.00617.63
8.1.90.0000.00717.64
8.1.80.0040.00417.66
8.1.70.0000.00817.58
8.1.60.0000.00817.78
8.1.50.0030.00617.69
8.1.40.0050.00317.66
8.1.30.0000.00817.82
8.1.20.0030.00617.81
8.1.10.0050.00317.79
8.1.00.0000.00817.75
8.0.300.0000.00820.16
8.0.290.0030.00517.13
8.0.280.0000.00718.52
8.0.270.0050.00217.39
8.0.260.0000.00717.32
8.0.250.0020.00517.21
8.0.240.0000.00817.09
8.0.230.0020.00517.22
8.0.220.0000.00717.11
8.0.210.0050.00217.14
8.0.200.0030.00317.20
8.0.190.0090.00017.23
8.0.180.0030.00517.09
8.0.170.0050.00317.18
8.0.160.0040.00417.16
8.0.150.0050.00517.07
8.0.140.0040.00417.11
8.0.130.0030.00313.52
8.0.120.0080.00017.01
8.0.110.0040.00417.09
8.0.100.0040.00417.11
8.0.90.0040.00417.05
8.0.80.0080.00817.15
8.0.70.0070.00017.20
8.0.60.0080.00017.21
8.0.50.0000.00817.10
8.0.30.0110.01017.42
8.0.20.0170.00517.40
8.0.10.0000.00717.12
8.0.00.0090.01117.05
7.4.330.0000.00515.13
7.4.320.0000.00616.79
7.4.300.0050.00316.79
7.4.290.0000.00816.78
7.4.280.0000.01116.78
7.4.270.0050.00316.88
7.4.260.0000.00716.83
7.4.250.0040.00416.83
7.4.240.0060.00216.80
7.4.230.0000.00716.89
7.4.220.0120.00616.89
7.4.210.0100.00616.78
7.4.200.0040.00416.85
7.4.160.0100.00716.93
7.4.150.0150.00417.40
7.4.140.0100.01017.86
7.4.130.0060.01616.82
7.4.120.0110.00816.82
7.4.110.0150.01816.72
7.4.100.0140.00516.80
7.4.90.0110.00716.88
7.4.80.0090.01119.39
7.4.70.0070.01416.63
7.4.60.0000.01716.85
7.4.50.0030.00616.64
7.4.40.0100.01016.68
7.4.30.0110.00516.81
7.4.00.0030.01015.34
7.3.330.0040.00413.46
7.3.320.0030.00313.36
7.3.310.0030.00316.60
7.3.300.0030.00316.60
7.3.290.0090.00616.56
7.3.280.0110.00716.53
7.3.270.0040.01417.40
7.3.260.0140.00316.61
7.3.250.0080.01016.72
7.3.240.0110.00716.54
7.3.230.0170.00016.56
7.3.210.0090.00916.73
7.3.200.0110.01119.39
7.3.190.0130.00616.82
7.3.180.0100.00616.65
7.3.170.0100.00916.81
7.3.160.0100.00716.54
7.3.120.0090.00615.00
7.3.10.0120.00416.85
7.3.00.0070.00716.86
7.2.330.0110.00716.89
7.2.320.0080.01216.83
7.2.310.0110.00716.93
7.2.300.0120.00617.00
7.2.290.0100.01616.93
7.2.130.0030.01017.03
7.2.120.0040.00817.11
7.2.110.0080.00516.82
7.2.100.0040.01117.17
7.2.90.0080.00416.89
7.2.80.0090.00017.25
7.2.70.0070.01416.88
7.2.60.0020.01416.95
7.2.50.0030.00616.91
7.2.40.0000.01516.88
7.2.30.0060.00317.16
7.2.20.0000.01217.10
7.2.10.0060.00617.02
7.2.00.0070.00417.24
7.1.250.0070.00716.18
7.1.240.0080.00316.07
7.1.230.0070.00315.89
7.1.220.0030.00715.88
7.1.210.0030.00815.97
7.1.200.0050.00615.84
7.1.190.0040.00815.93
7.1.180.0060.00315.84
7.1.170.0090.00615.81
7.1.160.0090.00615.71
7.1.150.0100.00316.10
7.1.140.0040.00716.13
7.1.130.0000.01015.98
7.1.120.0070.00716.13
7.1.110.0030.00715.68
7.1.100.0060.00616.98
7.1.90.0030.00715.95
7.1.80.0110.00015.68
7.1.70.0040.00716.58
7.1.60.0080.01117.89
7.1.50.0080.00716.52
7.1.40.0030.00916.18
7.1.30.0040.00715.95
7.1.20.0060.00315.75
7.1.10.0000.00816.11
7.1.00.0050.04319.04
7.0.330.0050.00515.64
7.0.320.0080.00415.25
7.0.310.0030.01015.63
7.0.300.0210.00315.48
7.0.290.0030.01115.25
7.0.280.0000.01115.70
7.0.270.0050.00515.60
7.0.260.0000.00715.45
7.0.250.0070.00415.53
7.0.240.0030.01015.67
7.0.230.0000.01015.88
7.0.220.0050.00315.61
7.0.210.0030.00715.47
7.0.200.0030.00616.12
7.0.190.0060.00615.53
7.0.180.0110.00015.55
7.0.170.0000.01115.49
7.0.160.0030.00615.55
7.0.150.0070.00715.40
7.0.140.0050.04018.70
7.0.130.0090.00015.37
7.0.120.0000.00815.47
7.0.110.0130.00715.39
7.0.100.0000.00715.65
7.0.90.0030.00715.59
7.0.80.0060.00315.56
7.0.70.0130.00315.75
7.0.60.0180.03817.84
7.0.50.0040.02916.65
7.0.40.0000.04616.67
7.0.30.0050.03816.87
7.0.20.0020.03216.76
7.0.10.0050.02616.78
7.0.00.0000.02816.77
5.6.380.0070.00714.51
5.6.370.0170.01014.44
5.6.360.0040.00814.65
5.6.350.0090.00314.67
5.6.340.0000.01014.80
5.6.330.0000.00914.21
5.6.320.0070.00414.20
5.6.310.0070.00414.53
5.6.300.0070.00714.59
5.6.290.0060.00614.41
5.6.280.0050.03717.78
5.6.270.0030.00514.48
5.6.260.0060.00614.66
5.6.250.0100.00314.44
5.6.240.0000.00814.73
5.6.230.0170.00014.68
5.6.220.0040.00814.21
5.6.210.0080.03817.62
5.6.200.0030.03016.36
5.6.190.0070.03217.55
5.6.180.0090.02617.35
5.6.170.0040.03717.29
5.6.160.0100.02017.29
5.6.150.0070.02217.51
5.6.140.0060.02817.44
5.6.130.0060.03317.46
5.6.120.0070.03617.16
5.6.110.0070.02917.33
5.6.100.0040.03417.25
5.6.90.0080.04017.52
5.6.80.0030.04817.10
5.6.70.0050.02317.05
5.6.60.0100.03817.05
5.6.50.0060.02717.01
5.6.40.0070.03016.94
5.6.30.0090.04216.94
5.6.20.0030.03217.00
5.6.10.0080.02617.03
5.6.00.0050.04517.07
5.5.380.0050.00511.18
5.5.370.0110.00411.40
5.5.360.0040.00711.15
5.5.350.0050.01815.80
5.5.340.0030.04814.41
5.5.330.0070.04015.91
5.5.320.0080.02315.80
5.5.310.0010.02815.76
5.5.300.0140.03615.71
5.5.290.0030.04415.70
5.5.280.0070.02815.84
5.5.270.0080.02115.78
5.5.260.0050.02715.74
5.5.250.0070.02215.54
5.5.240.0100.04015.35
5.5.230.0020.02815.10
5.5.220.0030.03715.41
5.5.210.0100.03015.34
5.5.200.0000.02515.24
5.5.190.0130.03715.34
5.5.180.0080.03315.39
5.5.170.0000.00811.17
5.5.160.0020.03315.19
5.5.150.0070.02315.26
5.5.140.0050.04115.27
5.5.130.0070.03715.39
5.5.120.0060.03915.21
5.5.110.0070.04215.28
5.5.100.0050.04715.23
5.5.90.0030.03615.30
5.5.80.0090.03515.26
5.5.70.0030.03415.11
5.5.60.0070.02015.36
5.5.50.0020.04615.41
5.5.40.0110.03815.39
5.5.30.0020.02915.17
5.5.20.0080.04315.45
5.5.10.0030.03615.22
5.5.00.0000.03315.43
5.4.450.0070.03515.21
5.4.440.0070.03815.29
5.4.430.0020.03815.02
5.4.420.0070.03115.26
5.4.410.0110.03815.09
5.4.400.0060.03915.11
5.4.390.0100.01815.11
5.4.380.0110.04215.07
5.4.370.0160.03615.18
5.4.360.0080.01814.98
5.4.350.0040.03815.24
5.4.340.0120.03314.90
5.4.330.0090.00511.04
5.4.320.0050.02714.83
5.4.310.0080.03715.07
5.4.300.0090.03915.04
5.4.290.0020.03115.20
5.4.280.0120.04015.11
5.4.270.0080.03814.91
5.4.260.0090.02215.03
5.4.250.0040.02715.13
5.4.240.0030.02715.03
5.4.230.0050.02214.91
5.4.220.0060.03614.97
5.4.210.0020.02614.99
5.4.200.0020.03914.86
5.4.190.0050.02114.75
5.4.180.0050.03015.14
5.4.170.0050.03515.14
5.4.160.0050.03914.94
5.4.150.0070.04514.89
5.4.140.0050.04513.78
5.4.130.0080.02813.71
5.4.120.0060.04213.52
5.4.110.0050.03713.88
5.4.100.0030.03013.72
5.4.90.0020.03713.55
5.4.80.0060.02913.75
5.4.70.0050.02213.77
5.4.60.0030.03113.67
5.4.50.0030.04113.70
5.4.40.0040.02413.57
5.4.30.0080.01813.48
5.4.20.0040.03213.55
5.4.10.0070.01813.79
5.4.00.0030.03213.50
5.3.290.0070.02112.81
5.3.280.0050.02112.66
5.3.270.0080.03812.62
5.3.260.0060.04012.61
5.3.250.0030.03812.69
5.3.240.0020.03712.66
5.3.230.0050.02412.68
5.3.220.0070.03512.69
5.3.210.0030.02512.59
5.3.200.0080.04212.50
5.3.190.0050.04212.60
5.3.180.0030.03812.69
5.3.170.0050.02712.77
5.3.160.0070.02412.80
5.3.150.0050.04312.56
5.3.140.0040.03112.79
5.3.130.0050.04312.60
5.3.120.0020.02912.64
5.3.110.0070.02512.62
5.3.100.0050.04112.42
5.3.90.0080.04212.48
5.3.80.0100.03712.27
5.3.70.0100.02312.16
5.3.60.0100.03912.32
5.3.50.0150.01812.40
5.3.40.0200.04012.16
5.3.30.0190.03512.22
5.3.20.0060.01812.10
5.3.10.0050.03912.10
5.3.00.0070.03812.05
5.2.170.0060.02310.56
5.2.160.0200.03010.57
5.2.150.0090.03510.56
5.2.140.0020.02210.53
5.2.130.0060.03010.48
5.2.120.0040.02010.54
5.2.110.0110.02910.60
5.2.100.0050.02410.52
5.2.90.0030.02610.47
5.2.80.0050.02010.48
5.2.70.0110.01810.53
5.2.60.0020.02110.56
5.2.50.0100.03010.47
5.2.40.0090.02210.50
5.2.30.0050.03210.47
5.2.20.0030.02410.52
5.2.10.0020.01810.39
5.2.00.0080.02810.32
5.1.60.0020.01710.00
5.1.50.0140.0159.96
5.1.40.0150.0129.94
5.1.30.0070.02910.14
5.1.20.0020.02610.14
5.1.10.0050.02710.02
5.1.00.0050.01610.03
5.0.50.0060.0259.27
5.0.40.0070.0179.21
5.0.30.0040.0189.04
5.0.20.0030.0139.06
5.0.10.0070.0139.05
5.0.00.0050.0179.08
4.4.90.0120.0088.76
4.4.80.0060.0178.76
4.4.70.0030.0108.76
4.4.60.0030.0208.76
4.4.50.0040.0178.76
4.4.40.0090.0088.76
4.4.30.0020.0128.76
4.4.20.0040.0128.71
4.4.10.0030.0128.72
4.4.00.0000.0238.73
4.3.110.0030.0108.74
4.3.100.0040.0088.75
4.3.90.0030.0098.75
4.3.80.0020.0178.76
4.3.70.0070.0078.76
4.3.60.0010.0108.76
4.3.50.0030.0098.76
4.3.40.0050.0108.76
4.3.30.0020.0088.76
4.3.20.0020.0098.76
4.3.10.0020.0098.76
4.3.00.0010.0088.76

preferences:
41.16 ms | 401 KiB | 5 Q