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 'AdsListExtractor.getURLs return' . $url_fiche; echo "\n"; return array( $url_fiche,$url_fiche ); } } class AdInfoExtractor { //private $html = 0; //function __construct($a1) //{ //$this->html = $a1; //} function getHMTL($html) { echo '------'.$html; $regexatt = '/\<table class="ad-attributes">(.*)\<\/table\>/'; preg_match($regexatt, $html, $matches); $a = $matches[1]; $regexcontent = '/\<div id="UserContent">(.*)\<\/div\>/'; preg_match($regexcontent, $html, $matches); $b = $matches[1]; return $a . $b; } } class HTMLReader { function getHTML($url) { echo "\n"; echo 'url::'.$url; if ($url=="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") { echo "\n"; echo 'true'; echo "\n"; 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 { echo "\n"; echo 'false'; echo "\n"; return "fiche <table class=\"ad-attributes\">yesser</table> dfdssd <div id=\"UserContent\">good</div> dfdfdf df df"; } echo "\n"; } } $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)); echo "\n"; foreach ($liste->getURLs() as $line_number => $linee) { echo "\n"; $htmlfiche = $reader->getHTML($linee); echo "\n"; $ad_info = new AdInfoExtractor(); $mail_html = $mail_html . $ad_info->getHMTL($htmlfiche); 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.0070.00718.55
8.3.50.0110.00822.10
8.3.40.0100.00619.19
8.3.30.0040.01119.27
8.3.20.0000.00820.36
8.3.10.0050.00322.08
8.3.00.0040.00420.82
8.2.180.0070.01017.00
8.2.170.0110.00422.96
8.2.160.0090.00619.20
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0100.00626.16
8.2.120.0120.00319.59
8.2.110.0070.00319.30
8.2.100.0120.00020.01
8.2.90.0000.00819.17
8.2.80.0050.00317.97
8.2.70.0100.00017.75
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0030.00618.28
8.2.30.0040.00418.25
8.2.20.0040.00417.82
8.2.10.0050.00317.87
8.2.00.0030.00617.93
8.1.280.0150.00025.92
8.1.270.0040.00422.26
8.1.260.0070.00326.35
8.1.250.0080.00028.09
8.1.240.0150.00319.44
8.1.230.0040.00719.29
8.1.220.0030.00517.79
8.1.210.0060.00318.77
8.1.200.0070.00317.60
8.1.190.0000.00817.65
8.1.180.0000.00818.93
8.1.170.0060.00318.64
8.1.160.0050.00222.26
8.1.150.0040.00418.86
8.1.140.0070.00017.64
8.1.130.0030.00317.89
8.1.120.0070.00017.64
8.1.110.0000.00817.68
8.1.100.0000.00817.63
8.1.90.0080.00017.66
8.1.80.0040.00417.68
8.1.70.0030.00517.55
8.1.60.0030.00617.65
8.1.50.0090.00017.59
8.1.40.0030.00517.72
8.1.30.0040.00417.82
8.1.20.0030.00517.76
8.1.10.0000.00817.67
8.1.00.0050.00317.59
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0040.00418.46
8.0.270.0050.00217.36
8.0.260.0030.00318.41
8.0.250.0030.00317.02
8.0.240.0040.00417.13
8.0.230.0070.00017.02
8.0.220.0020.00516.95
8.0.210.0040.00416.95
8.0.200.0030.00317.07
8.0.190.0080.00017.16
8.0.180.0040.00416.99
8.0.170.0090.00017.07
8.0.160.0040.00417.13
8.0.150.0050.00316.96
8.0.140.0040.00417.04
8.0.130.0000.00813.40
8.0.120.0000.00817.03
8.0.110.0000.00816.97
8.0.100.0000.00816.97
8.0.90.0040.00416.98
8.0.80.0190.00017.11
8.0.70.0040.00416.90
8.0.60.0070.00017.15
8.0.50.0040.00416.90
8.0.30.0120.00817.34
8.0.20.0130.00717.40
8.0.10.0000.00717.16
8.0.00.0100.01317.04
7.4.330.0000.00515.00
7.4.320.0060.00016.86
7.4.300.0060.00016.80
7.4.290.0040.00416.75
7.4.280.0080.00016.74
7.4.270.0000.00816.87
7.4.260.0000.01116.81
7.4.250.0050.00216.72
7.4.240.0060.00216.78
7.4.230.0070.00016.75
7.4.220.0000.01816.79
7.4.210.0040.01216.88
7.4.200.0000.00816.86
7.4.190.0050.00316.71
7.4.160.0040.01216.92
7.4.150.0060.01217.40
7.4.140.0120.00717.86
7.4.130.0110.00916.80
7.4.120.0070.01216.81
7.4.110.0150.00316.88
7.4.100.0070.01116.78
7.4.90.0090.00916.67
7.4.80.0070.01119.39
7.4.70.0080.01116.70
7.4.60.0070.01016.73
7.4.50.0030.00616.62
7.4.40.0000.01922.77
7.4.30.0100.00716.80
7.4.00.0100.01014.96
7.3.330.0050.00013.57
7.3.320.0050.00013.57
7.3.310.0070.00016.56
7.3.300.0030.00316.57
7.3.290.0120.00316.49
7.3.280.0040.01216.46
7.3.270.0060.01317.40
7.3.260.0120.00616.70
7.3.250.0100.00816.55
7.3.240.0100.00716.64
7.3.230.0090.00916.64
7.3.210.0140.00516.62
7.3.200.0030.01919.39
7.3.190.0070.01016.51
7.3.180.0060.01116.70
7.3.170.0100.01016.94
7.3.160.0090.01316.82
7.3.120.0060.01015.21
7.3.110.0090.00915.01
7.3.100.0070.00714.94
7.3.90.0060.00815.06
7.3.80.0030.01015.02
7.3.70.0080.00715.08
7.3.60.0040.00914.86
7.3.50.0070.00715.02
7.3.40.0050.00414.80
7.3.30.0020.01015.08
7.3.20.0070.00416.85
7.3.10.0020.00816.83
7.3.00.0020.01116.74
7.2.330.0090.00916.96
7.2.320.0130.00716.93
7.2.310.0090.00916.96
7.2.300.0130.00316.91
7.2.290.0080.01216.86
7.2.250.0060.00915.46
7.2.240.0160.00215.28
7.2.230.0070.00715.34
7.2.220.0030.00815.36
7.2.210.0060.01015.23
7.2.200.0060.00815.30
7.2.190.0040.00815.25
7.2.180.0060.00815.36
7.2.170.0100.00315.42
7.2.160.0030.00815.13
7.2.150.0060.00917.20
7.2.140.0040.01217.21
7.2.130.0060.00617.24
7.2.120.0070.00916.93
7.2.110.0080.00716.99
7.2.100.0060.00717.04
7.2.90.0080.00817.04
7.2.80.0050.01116.92
7.2.70.0100.00316.97
7.2.60.0080.00817.07
7.2.50.0070.01017.24
7.2.40.0020.00817.29
7.2.30.0030.01017.17
7.2.20.0040.00917.21
7.2.10.0100.00517.10
7.2.00.0000.01417.21
7.1.330.0070.00916.00
7.1.320.0090.00415.86
7.1.310.0020.01216.09
7.1.300.0060.00715.82
7.1.290.0050.00716.06
7.1.280.0090.00515.99
7.1.270.0070.00715.82
7.1.260.0070.00515.93
7.1.250.0030.00915.84
7.1.240.0040.01115.95
7.1.230.0030.01015.75
7.1.220.0090.00616.02
7.1.210.0030.00916.23
7.1.200.0040.00716.06
7.1.190.0030.01315.71
7.1.180.0040.01116.07
7.1.170.0100.00316.04
7.1.160.0050.00516.13
7.1.150.0040.00716.13
7.1.140.0040.00715.76
7.1.130.0030.00715.77
7.1.120.0030.01015.92
7.1.110.0090.00016.23
7.1.100.0030.00715.88
7.1.90.0000.01416.20
7.1.80.0030.01016.00
7.1.70.0030.00916.64
7.1.60.0030.01618.01
7.1.50.0040.00816.71
7.1.40.0070.00316.28
7.1.30.0060.00315.82
7.1.20.0100.00015.88
7.1.10.0070.00316.12
7.1.00.0030.05219.15
7.0.320.0040.01215.63
7.0.310.0090.00615.68
7.0.300.0090.00615.68
7.0.290.0060.00315.43
7.0.280.0060.00315.68
7.0.270.0080.00415.39
7.0.260.0120.00015.67
7.0.250.0000.01315.32
7.0.240.0070.00715.66
7.0.230.0060.00915.66
7.0.220.0040.00915.71
7.0.210.0000.01215.59
7.0.200.0050.00516.30
7.0.190.0030.01015.75
7.0.180.0090.00315.59
7.0.170.0090.00315.65
7.0.160.0000.01515.76
7.0.150.0060.00315.68
7.0.140.0070.03818.97
7.0.130.0050.00515.49
7.0.120.0120.00815.73
7.0.110.0060.00615.67
7.0.100.0080.02317.80
7.0.90.0090.03717.86
7.0.80.0180.02517.77
7.0.70.0120.03817.58
7.0.60.0180.02117.84
7.0.50.0060.03518.12
7.0.40.0100.03816.93
7.0.30.0070.04316.87
7.0.20.0100.03316.84
7.0.10.0110.04316.89
7.0.00.0080.04516.90
5.6.380.0060.00614.73
5.6.370.0030.00914.42
5.6.360.0000.00814.66
5.6.350.0070.00714.41
5.6.340.0070.00714.50
5.6.330.0060.00314.54
5.6.320.0090.00614.76
5.6.310.0080.00414.63
5.6.300.0060.00914.46
5.6.290.0040.00714.75
5.6.280.0060.04017.82
5.6.270.0070.00714.60
5.6.260.0080.00414.51
5.6.250.0090.02217.52
5.6.240.0080.04417.64
5.6.230.0030.05017.63
5.6.220.0050.02817.55
5.6.210.0130.02017.71
5.6.200.0030.04017.75
5.6.190.0100.04417.73
5.6.180.0080.02717.90
5.6.170.0100.02817.80
5.6.160.0110.03617.68
5.6.150.0140.02217.62
5.6.140.0120.03017.75
5.6.130.0130.03517.69
5.6.120.0070.04817.93
5.6.110.0100.03317.73
5.6.100.0080.02817.66
5.6.90.0100.04717.68
5.6.80.0070.03917.46
5.6.70.0050.03117.22
5.6.60.0100.04217.51
5.6.50.0130.04017.41
5.6.40.0150.02517.41
5.6.30.0100.04217.34
5.6.20.0050.04217.51
5.6.10.0080.03517.36
5.6.00.0070.02817.44
5.5.380.0080.04215.74
5.5.370.0140.03716.02
5.5.360.0060.04415.82
5.5.350.0100.01815.88
5.5.340.0080.04316.18
5.5.330.0050.04316.01
5.5.320.0070.03215.93
5.5.310.0080.04116.06
5.5.300.0100.04215.97
5.5.290.0070.04215.92
5.5.280.0120.04316.01
5.5.270.0060.03216.04
5.5.260.0080.04116.14
5.5.250.0110.04115.93
5.5.240.0070.02915.72
5.5.230.0080.04315.86
5.5.220.0060.04015.63
5.5.210.0070.02315.73
5.5.200.0080.02315.82
5.5.190.0080.02815.71
5.5.180.0100.02715.76
5.5.170.0080.00814.46
5.5.160.0100.02315.59
5.5.150.0070.02815.67
5.5.140.0060.04415.83
5.5.130.0090.03615.65
5.5.120.0050.04415.84
5.5.110.0030.02815.72
5.5.100.0060.04115.51
5.5.90.0050.04315.71
5.5.80.0050.03215.70
5.5.70.0100.04215.69
5.5.60.0100.02615.53
5.5.50.0090.04015.63
5.5.40.0040.04215.59
5.5.30.0070.04315.52
5.5.20.0030.03015.71
5.5.10.0080.03815.57
5.5.00.0120.03515.58
5.4.450.0090.02615.50
5.4.440.0050.04015.54
5.4.430.0020.04515.31
5.4.420.0080.04015.38
5.4.410.0060.03615.23
5.4.400.0080.03815.21
5.4.390.0090.03815.01
5.4.380.0110.03315.15
5.4.370.0060.02215.14
5.4.360.0110.03315.12
5.4.350.0090.02715.25
5.4.340.0090.03315.27
5.4.330.0080.00311.11
5.4.320.0070.04315.20
5.4.310.0020.04015.12
5.4.300.0050.03915.08
5.4.290.0070.03215.11
5.4.280.0170.04315.16
5.4.270.0040.04215.13
5.4.260.0100.03715.18
5.4.250.0100.01815.21
5.4.240.0040.04415.25
5.4.230.0070.04115.15
5.4.220.0090.03215.09
5.4.210.0110.03415.23
5.4.200.0070.03915.05
5.4.190.0070.02015.06
5.4.180.0090.04115.08
5.4.170.0090.03515.09
5.4.160.0120.03014.92
5.4.150.0060.04015.23
5.4.140.0120.04113.87
5.4.130.0060.02813.91
5.4.120.0090.02113.77
5.4.110.0100.03613.96
5.4.100.0020.04213.93
5.4.90.0100.02013.82
5.4.80.0060.03613.78
5.4.70.0040.03813.72
5.4.60.0070.02213.89
5.4.50.0070.03713.76
5.4.40.0080.01713.72
5.4.30.0050.03313.82
5.4.20.0020.02313.70
5.4.10.0130.03313.69
5.4.00.0050.03313.46
5.3.290.0070.02312.79
5.3.280.0060.04412.65
5.3.270.0020.03412.65
5.3.260.0080.02712.64
5.3.250.0060.04212.71
5.3.240.0060.03812.51
5.3.230.0090.03812.66
5.3.220.0110.03512.52
5.3.210.0090.03712.62
5.3.200.0040.04412.51
5.3.190.0070.02012.55
5.3.180.0050.04012.66
5.3.170.0060.03912.68
5.3.160.0020.02112.67
5.3.150.0090.01812.71
5.3.140.0090.03212.70
5.3.130.0070.02312.59
5.3.120.0030.03812.67
5.3.110.0050.03712.60
5.3.100.0070.04312.33
5.3.90.0060.03912.29
5.3.80.0080.03712.42
5.3.70.0080.03812.35
5.3.60.0070.03012.22
5.3.50.0040.02912.21
5.3.40.0070.03712.24
5.3.30.0070.03212.27
5.3.20.0070.03012.10
5.3.10.0100.02212.06
5.3.00.0030.03212.05
5.2.170.0080.01410.76
5.2.160.0050.03310.78
5.2.150.0030.03010.74
5.2.140.0080.01510.74
5.2.130.0030.01810.71
5.2.120.0090.03210.71
5.2.110.0050.03210.77
5.2.100.0020.02810.72
5.2.90.0030.02910.73
5.2.80.0100.03010.77
5.2.70.0050.02510.72
5.2.60.0050.03310.71
5.2.50.0060.03310.74
5.2.40.0070.03210.71
5.2.30.0040.03410.71
5.2.20.0040.02710.71
5.2.10.0060.02710.71
5.2.00.0050.02710.71
5.1.60.0050.02810.71
5.1.50.0020.02510.71
5.1.40.0050.02410.71
5.1.30.0020.01510.71
5.1.20.0070.01910.71
5.1.10.0040.02310.71
5.1.00.0040.01910.71
5.0.50.0020.02510.71
5.0.40.0020.01210.71
5.0.30.0120.02710.71
5.0.20.0070.01910.71
5.0.10.0090.01710.71
5.0.00.0050.03310.71
4.4.90.0050.01810.71
4.4.80.0030.02010.71
4.4.70.0010.02010.71
4.4.60.0010.02010.71
4.4.50.0030.01410.71
4.4.40.0020.01510.71
4.4.30.0050.01710.71
4.4.20.0040.01310.71
4.4.10.0050.01310.71
4.4.00.0000.03110.71
4.3.110.0060.01710.71
4.3.100.0070.01610.71
4.3.90.0030.01810.71
4.3.80.0030.02010.71
4.3.70.0000.01310.71
4.3.60.0040.00810.71
4.3.50.0010.02010.71
4.3.40.0040.02010.71
4.3.30.0000.02010.71
4.3.20.0000.01110.71
4.3.10.0000.01210.71
4.3.00.0030.01810.71

preferences:
50.47 ms | 401 KiB | 5 Q