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">yessssssss\</table> dfdssd <div id="UserContent">fggee</div>/'; } } //'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.0150.00418.43
8.3.50.0120.00622.01
8.3.40.0120.00318.96
8.3.30.0070.00719.04
8.3.20.0040.00420.16
8.3.10.0040.00421.97
8.3.00.0040.00422.33
8.2.180.0000.01517.00
8.2.170.0140.00322.96
8.2.160.0070.00719.29
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00421.05
8.2.110.0000.00922.44
8.2.100.0080.00419.88
8.2.90.0000.00819.17
8.2.80.0030.00618.16
8.2.70.0060.00317.75
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0000.01018.16
8.2.30.0050.00218.24
8.2.20.0040.00417.92
8.2.10.0000.00817.99
8.2.00.0070.00017.78
8.1.280.0170.00325.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.69
8.1.230.0070.00419.15
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.01117.60
8.1.190.0050.00317.64
8.1.180.0080.00018.73
8.1.170.0050.00318.63
8.1.160.0000.00722.11
8.1.150.0050.00318.82
8.1.140.0050.00317.70
8.1.130.0030.00317.82
8.1.120.0050.00217.53
8.1.110.0000.00917.68
8.1.100.0030.00517.66
8.1.90.0040.00417.67
8.1.80.0050.00317.71
8.1.70.0070.00017.55
8.1.60.0000.00817.79
8.1.50.0050.00317.61
8.1.40.0000.00817.73
8.1.30.0050.00317.79
8.1.20.0050.00317.73
8.1.10.0080.00017.74
8.1.00.0030.00617.55
8.0.300.0070.00018.77
8.0.290.0050.00317.05
8.0.280.0070.00018.37
8.0.270.0040.00417.22
8.0.260.0030.00317.00
8.0.250.0000.00717.10
8.0.240.0000.00717.14
8.0.230.0040.00417.13
8.0.220.0080.00016.97
8.0.210.0030.00317.05
8.0.200.0030.00517.17
8.0.190.0040.00417.02
8.0.180.0040.00416.98
8.0.170.0020.00517.12
8.0.160.0030.00517.04
8.0.150.0000.00717.00
8.0.140.0000.00716.90
8.0.130.0000.00613.51
8.0.120.0040.00417.07
8.0.110.0080.00017.01
8.0.100.0050.00317.00
8.0.90.0060.00316.96
8.0.80.0180.00317.10
8.0.70.0000.00817.02
8.0.60.0040.00416.95
8.0.50.0030.00516.88
8.0.30.0120.01117.47
8.0.20.0120.00817.40
8.0.10.0070.00017.03
8.0.00.0140.00916.87
7.4.330.0030.00315.15
7.4.320.0070.00016.75
7.4.300.0000.00616.80
7.4.290.0030.00316.73
7.4.280.0030.00516.73
7.4.270.0030.00316.76
7.4.260.0040.00416.75
7.4.250.0000.00816.79
7.4.240.0040.00416.79
7.4.230.0000.00716.73
7.4.220.0070.01116.93
7.4.210.0140.00416.80
7.4.200.0030.00516.82
7.4.190.0030.00317.02
7.4.160.0050.01116.61
7.4.150.0060.01317.40
7.4.140.0100.00817.86
7.4.130.0090.01016.80
7.4.120.0080.00916.61
7.4.110.0100.00716.63
7.4.100.0090.00916.92
7.4.90.0170.00416.65
7.4.80.0040.02019.39
7.4.70.0090.01216.73
7.4.60.0070.01116.76
7.4.50.0110.00016.79
7.4.40.0090.00622.77
7.4.30.0110.01116.72
7.4.00.0070.00715.03
7.3.330.0030.00313.49
7.3.320.0030.00313.50
7.3.310.0030.00316.52
7.3.300.0040.00416.52
7.3.290.0030.01016.46
7.3.280.0060.01116.44
7.3.270.0120.00617.40
7.3.260.0150.00316.70
7.3.250.0070.01116.67
7.3.240.0070.01016.56
7.3.230.0140.00616.60
7.3.210.0140.00416.56
7.3.200.0090.00919.39
7.3.190.0140.00716.45
7.3.180.0130.00316.69
7.3.170.0100.00616.52
7.3.160.0100.01016.54
7.3.120.0070.00715.05
7.3.110.0000.01714.94
7.3.100.0070.00715.01
7.3.90.0000.01415.21
7.3.80.0130.00315.28
7.3.70.0030.01014.81
7.3.60.0100.00714.81
7.3.50.0080.00515.16
7.3.40.0040.01114.97
7.3.30.0090.00614.87
7.3.20.0090.00616.91
7.3.10.0070.00716.57
7.3.00.0040.00816.50
7.2.330.0030.01316.96
7.2.320.0030.01316.75
7.2.310.0110.01116.91
7.2.300.0090.00916.87
7.2.290.0030.01416.98
7.2.240.0070.00715.36
7.2.230.0000.01615.32
7.2.220.0060.01015.05
7.2.210.0100.00715.28
7.2.200.0030.01315.18
7.2.190.0030.01015.25
7.2.180.0030.01315.34
7.2.170.0110.00415.09
7.2.160.0170.00015.30
7.2.150.0070.01016.89
7.2.140.0040.01117.25
7.2.130.0030.01216.96
7.2.120.0060.00617.35
7.2.110.0070.01016.80
7.2.100.0060.00916.79
7.2.90.0090.00716.99
7.2.80.0050.00916.98
7.2.70.0050.01017.17
7.2.60.0090.00617.13
7.2.50.0070.00517.18
7.2.40.0030.01217.00
7.2.30.0070.01017.02
7.2.20.0110.00616.86
7.2.10.0060.00816.96
7.2.00.0090.00916.95
7.1.330.0000.01516.16
7.1.320.0040.01216.02
7.1.310.0040.00715.83
7.1.300.0000.01215.79
7.1.290.0000.01416.16
7.1.280.0100.00715.93
7.1.270.0030.01016.00
7.1.260.0070.01015.86
7.1.250.0100.00316.07
7.1.230.0030.01015.78
7.1.220.0030.00915.91
7.1.210.0030.00815.85
7.1.200.0100.00615.98
7.1.190.0070.01015.93
7.1.180.0100.00315.80
7.1.170.0110.00416.02
7.1.160.0090.00615.98
7.1.150.0200.00016.00
7.1.140.0060.00916.16
7.1.130.0100.00615.62
7.1.120.0070.01015.72
7.1.110.0080.00816.02
7.1.100.0080.00715.86
7.1.90.0090.00616.13
7.1.80.0090.00615.92
7.1.70.0050.00616.67
7.1.60.0050.01217.88
7.1.50.0100.01216.54
7.1.40.0130.00516.21
7.1.30.1220.01015.68
7.1.20.0080.00815.99
7.1.10.0080.00415.80
7.1.00.0050.04218.98
7.0.310.0060.01015.58
7.0.300.0070.00715.38
7.0.290.0110.00015.46
7.0.280.0030.00915.47
7.0.270.0090.00315.27
7.0.260.0100.00315.37
7.0.250.0070.01015.37
7.0.240.0130.00315.54
7.0.230.0130.00315.62
7.0.220.0140.00015.47
7.0.210.0090.00615.43
7.0.200.0060.00715.96
7.0.190.0120.00615.27
7.0.180.0110.00714.99
7.0.170.0140.00715.47
7.0.160.0130.00015.27
7.0.150.0070.00715.34
7.0.140.0050.04218.64
7.0.130.0140.00315.14
7.0.120.0040.01315.04
7.0.110.0130.00614.82
7.0.100.0060.00914.96
7.0.90.0150.00715.33
7.0.80.0160.00515.25
7.0.70.0140.00815.46
7.0.60.0070.02917.59
7.0.50.0140.02416.64
7.0.40.0080.02316.75
7.0.30.0140.02916.96
7.0.20.0190.02716.85
7.0.10.0080.04716.79
7.0.00.0120.03816.88
5.6.380.0040.00414.52
5.6.370.0060.00614.70
5.6.360.0110.00414.41
5.6.350.0030.01014.71
5.6.340.0080.00414.38
5.6.330.0030.01014.61
5.6.320.0030.01014.39
5.6.310.0110.00714.24
5.6.300.0080.00014.39
5.6.290.0090.00314.24
5.6.280.0050.04017.61
5.6.270.0070.00714.16
5.6.260.0040.00814.17
5.6.250.0070.00714.13
5.6.240.0100.01014.05
5.6.230.0060.01214.07
5.6.220.0110.00614.52
5.6.210.0130.03817.40
5.6.200.0050.03016.21
5.6.190.0110.02217.40
5.6.180.0300.04017.61
5.6.170.0290.04117.56
5.6.160.0110.04117.36
5.6.150.0040.02516.28
5.6.140.0150.02516.30
5.6.130.0050.03816.41
5.6.120.0140.04217.75
5.6.110.0160.04517.64
5.6.100.0060.05117.55
5.6.90.0150.04017.82
5.6.80.0070.02717.39
5.6.70.0220.00014.24
5.6.60.0090.01214.26
5.6.50.0110.01614.46
5.6.40.0160.00814.59
5.6.30.0160.00614.08
5.6.20.0130.00914.64
5.6.10.0200.00314.32
5.6.00.0170.01014.43
5.5.380.0050.00511.15
5.5.370.0040.00411.19
5.5.360.0080.00811.34
5.5.350.0170.03015.71
5.5.340.0070.03214.54
5.5.330.0060.04215.82
5.5.320.0190.04415.79
5.5.310.0130.04815.76
5.5.300.0100.04014.55
5.5.290.0100.02714.65
5.5.280.0100.04015.94
5.5.270.0120.04216.01
5.5.260.0080.04315.92
5.5.250.0050.04615.82
5.5.240.0080.04215.57
5.5.230.0140.00310.88
5.5.220.0040.01111.24
5.5.210.0100.00511.23
5.5.200.0040.00811.13
5.5.190.0120.00311.25
5.5.180.0060.01111.23
5.5.170.0200.00614.27
5.5.160.0090.00911.45
5.5.150.0070.01111.34
5.5.140.0140.00011.00
5.5.130.0120.00311.09
5.5.120.0090.00611.30
5.5.110.0090.00911.37
5.5.100.0100.00511.25
5.5.90.0100.00811.03
5.5.80.0100.00611.15
5.5.70.0110.00711.34
5.5.60.0100.00711.21
5.5.50.0120.00411.29
5.5.40.0120.00311.43
5.5.30.0000.01410.97
5.5.20.0080.00811.31
5.5.10.0110.00611.04
5.5.00.0120.00311.01
5.4.450.0430.03015.06
5.4.440.0420.03215.34
5.4.430.0170.02215.50
5.4.420.0110.03115.26
5.4.410.0130.02614.93
5.4.400.0080.03014.97
5.4.390.0080.03114.88
5.4.380.0080.03414.98
5.4.370.0220.02814.83
5.4.360.0150.03014.96
5.4.350.0190.02815.02
5.4.340.0210.02714.88
5.4.330.0110.00511.23
5.4.320.0100.01911.79
5.4.310.0100.02212.00
5.4.300.0120.02211.90
5.4.290.0070.02111.85
5.4.280.0110.01911.77
5.4.270.0040.02311.67
5.4.260.0090.03914.91
5.4.250.0040.03415.03
5.4.240.0110.04115.09
5.4.230.0110.03614.96
5.4.220.0120.03014.99
5.4.210.0110.03915.05
5.4.200.0100.02515.06
5.4.190.0070.02915.04
5.4.180.0090.03014.98
5.4.170.0100.03015.18
5.4.160.0100.02814.99
5.4.150.0130.03915.01
5.4.140.0100.02813.96
5.4.130.0080.04113.82
5.4.120.0130.02313.83
5.4.110.0070.03113.97
5.4.100.0110.02513.94
5.4.90.0090.03813.91
5.4.80.0140.02313.83
5.4.70.0070.04113.89
5.4.60.0120.02313.73
5.4.50.0130.02213.84
5.4.40.0070.03713.89
5.4.30.0080.02713.82
5.4.20.0130.03013.75
5.4.10.0180.01813.77
5.4.00.0060.03913.47
5.3.290.0050.02511.78
5.3.280.0080.02812.76
5.3.270.0090.03312.74
5.3.260.0080.04112.65
5.3.250.0160.03212.61
5.3.240.0070.03012.54
5.3.230.0120.02612.64
5.3.220.0090.03212.61
5.3.210.0100.03012.62
5.3.200.0090.02512.53
5.3.190.0060.02912.69
5.3.180.0050.03512.66
5.3.170.0080.02912.60
5.3.160.0090.02712.72
5.3.150.0100.03112.68
5.3.140.0070.02712.70
5.3.130.0120.03512.68
5.3.120.0100.03112.47
5.3.110.0080.03012.53
5.3.100.0060.03612.32
5.3.90.0040.03012.46
5.3.80.0110.02512.17
5.3.70.0090.03412.23
5.3.60.0110.03412.36
5.3.50.0090.02812.29
5.3.40.0100.02512.39
5.3.30.0060.03412.25
5.3.20.0050.03012.18
5.3.10.0020.03511.98
5.3.00.0050.02912.15
5.2.170.0100.02010.47
5.2.160.0130.02010.50
5.2.150.0030.02710.30
5.2.140.0090.02110.34
5.2.130.0110.01910.29
5.2.120.0090.02010.33
5.2.110.0070.02210.30
5.2.100.0090.01810.33
5.2.90.0080.03010.41
5.2.80.0050.02510.23
5.2.70.0070.02310.21
5.2.60.0110.01910.26
5.2.50.0060.02610.26
5.2.40.0060.02310.35
5.2.30.0090.03010.28
5.2.20.0060.03110.24
5.2.10.0050.02410.12
5.2.00.0040.02410.00
5.1.60.0080.0159.50
5.1.50.0050.0199.41
5.1.40.0050.0209.41
5.1.30.0030.0239.71
5.1.20.0030.0239.47
5.1.10.0080.0199.45
5.1.00.0130.0139.43
5.0.50.0080.0168.77
5.0.40.0060.0138.50
5.0.30.0050.0208.50
5.0.20.0000.0218.51
5.0.10.0070.0138.46
5.0.00.0020.0278.53
4.4.90.0020.0147.30
4.4.80.0030.0157.28
4.4.70.0040.0157.31
4.4.60.0060.0167.24
4.4.50.0070.0117.33
4.4.40.0050.0187.29
4.4.30.0060.0107.24
4.4.20.0050.0117.33
4.4.10.0020.0197.31
4.4.00.0030.0177.31
4.3.110.0020.0137.25
4.3.100.0030.0157.26
4.3.90.0070.0087.24
4.3.80.0020.0217.24
4.3.70.0020.0137.24
4.3.60.0020.0137.24
4.3.50.0000.0177.24
4.3.40.0030.0177.24
4.3.30.0020.0137.24
4.3.20.0020.0137.24
4.3.10.0000.0187.24
4.3.00.0050.0157.73

preferences:
45.54 ms | 401 KiB | 5 Q