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(); }

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.0160.00318.68
8.3.50.0100.00822.17
8.3.40.0120.00618.99
8.3.30.0000.01519.29
8.3.20.0000.00720.16
8.3.10.0040.00421.92
8.3.00.0080.00022.51
8.2.180.0080.00818.79
8.2.170.0140.00022.96
8.2.160.0110.00319.20
8.2.150.0000.00924.18
8.2.140.0110.00424.66
8.2.130.0050.00326.16
8.2.120.0030.00619.61
8.2.110.0030.00722.05
8.2.100.0080.00320.01
8.2.90.0040.00419.17
8.2.80.0000.00818.03
8.2.70.0030.00617.88
8.2.60.0080.00017.93
8.2.50.0000.00818.07
8.2.40.0050.00318.16
8.2.30.0000.00818.11
8.2.20.0000.00817.89
8.2.10.0070.00018.02
8.2.00.0040.00417.99
8.1.280.0090.00625.92
8.1.270.0030.00523.99
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0060.00323.75
8.1.230.0060.00619.09
8.1.220.0040.00417.75
8.1.210.0000.00818.77
8.1.200.0050.00517.48
8.1.190.0000.00817.65
8.1.180.0060.00318.53
8.1.170.0040.00418.69
8.1.160.0030.00522.26
8.1.150.0000.00718.69
8.1.140.0040.00417.50
8.1.130.0030.00317.93
8.1.120.0040.00417.67
8.1.110.0000.00817.62
8.1.100.0030.00517.62
8.1.90.0040.00417.63
8.1.80.0040.00417.63
8.1.70.0000.00717.58
8.1.60.0000.00817.67
8.1.50.0000.00817.73
8.1.40.0040.00417.71
8.1.30.0040.00417.81
8.1.20.0000.00917.76
8.1.10.0040.00417.69
8.1.00.0050.00517.71
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0050.00318.42
8.0.270.0000.00817.28
8.0.260.0070.00017.00
8.0.250.0030.00317.10
8.0.240.0000.00717.01
8.0.230.0000.00817.16
8.0.220.0070.00016.95
8.0.210.0030.00317.05
8.0.200.0000.00717.20
8.0.190.0000.00817.14
8.0.180.0030.00316.98
8.0.170.0000.00717.05
8.0.160.0060.00317.15
8.0.150.0050.00217.08
8.0.140.0040.00416.88
8.0.130.0060.00013.54
8.0.120.0080.00017.02
8.0.110.0030.00516.97
8.0.100.0050.00316.86
8.0.90.0040.00417.14
8.0.80.0060.01317.03
8.0.70.0040.00417.04
8.0.60.0020.00517.14
8.0.50.0040.00417.04
8.0.30.0120.00717.31
8.0.20.0110.00917.54
8.0.10.0080.00017.26
8.0.00.0150.00516.96
7.4.330.0050.00015.20
7.4.320.0000.00716.84
7.4.300.0030.00316.90
7.4.290.0030.00316.78
7.4.280.0000.00716.86
7.4.270.0000.00716.74
7.4.260.0040.00416.75
7.4.250.0040.00416.71
7.4.240.0020.00616.80
7.4.230.0030.00316.94
7.4.220.0110.00716.91
7.4.210.0080.01016.78
7.4.200.0030.00316.77
7.4.190.0070.00016.89
7.4.160.0060.00916.64
7.4.150.0070.01117.40
7.4.140.0130.00617.86
7.4.130.0090.00916.72
7.4.120.0130.00316.86
7.4.110.0160.00816.82
7.4.100.0120.00616.71
7.4.90.0030.01516.45
7.4.80.0120.00519.39
7.4.70.0090.01516.67
7.4.60.0190.00316.79
7.4.50.0040.00016.76
7.4.40.0070.01022.77
7.4.30.0120.00916.66
7.4.00.0070.01115.12
7.3.330.0000.00613.39
7.3.320.0000.00513.34
7.3.310.0000.00716.51
7.3.300.0000.00716.41
7.3.290.0040.01116.37
7.3.280.0090.01016.44
7.3.270.0000.01717.40
7.3.260.0150.00316.86
7.3.250.0110.00716.55
7.3.240.0070.01016.47
7.3.230.0090.01116.56
7.3.210.0120.00616.72
7.3.200.0180.00319.39
7.3.190.0060.01316.65
7.3.180.0030.01316.89
7.3.170.0160.00016.71
7.3.160.0070.01316.82
7.3.120.0070.01115.05
7.2.330.0100.00616.91
7.2.320.0100.00716.77
7.2.310.0130.00916.78
7.2.300.0070.01016.92
7.2.290.0100.00617.06
7.2.60.0030.01017.01
7.1.200.0140.00015.84
7.1.70.0040.00717.29
7.1.60.0060.01319.82
7.1.50.0100.01317.24
7.1.00.0030.07322.46
7.0.200.0100.01016.80
7.0.140.0070.07022.17
7.0.60.0070.04319.95
7.0.50.0070.08317.83
7.0.40.0130.08320.17
7.0.30.0270.05320.27
7.0.20.0330.06720.25
7.0.10.0270.08320.08
7.0.00.0100.08020.11
5.6.280.0030.07321.03
5.6.210.0070.08020.55
5.6.200.0070.08018.24
5.6.190.0100.04020.55
5.6.180.3270.03720.47
5.6.170.0070.05020.40
5.6.160.0100.04720.54
5.6.150.0030.07318.15
5.6.140.0030.04018.12
5.6.130.0000.05318.16
5.6.120.0230.07721.04
5.6.110.0100.08021.00
5.6.100.0100.06321.03
5.6.90.0130.06721.01
5.6.80.0130.06020.39
5.6.70.2800.02320.55
5.5.350.0030.03320.44
5.5.340.0100.06718.08
5.5.330.0130.07720.19
5.5.320.0270.03720.51
5.5.310.0130.04320.30
5.5.300.0070.07718.07
5.5.290.0000.09318.04
5.5.280.0100.05320.98
5.5.270.0070.03720.88
5.5.260.0100.08020.80
5.5.250.0070.08020.60
5.5.240.0070.03320.30
5.4.450.0470.05719.58
5.4.440.0070.06019.31
5.4.430.0570.05319.47
5.4.420.0470.05319.45
5.4.410.0100.05719.41
5.4.400.1570.00018.68
5.4.390.1270.00018.77
5.4.380.0300.07718.79
5.4.370.0300.06018.80
5.4.360.0230.05718.73
5.4.350.0270.05318.77
5.4.340.0270.06018.71
5.4.320.0080.03412.52
5.4.310.0050.03912.52
5.4.300.0090.03512.52
5.4.290.0140.05812.51
5.4.280.0060.03712.41
5.4.270.0090.03612.41
5.4.260.0070.05719.09
5.4.250.0070.05319.02
5.4.240.0130.05318.97
5.4.230.0170.04718.83
5.4.220.0030.07718.97
5.4.210.0200.04318.93
5.4.200.0130.06718.65
5.4.190.0030.05718.76
5.4.180.0230.03719.08
5.4.170.0170.04718.93
5.4.160.0070.05319.08
5.4.150.0170.05718.94
5.4.140.0130.04316.55
5.4.130.0070.04716.29
5.4.120.0100.04316.59
5.4.110.0070.05016.35
5.4.100.0030.05716.57
5.4.90.0000.05316.57
5.4.80.0070.05016.54
5.4.70.0030.06316.42
5.4.60.0070.06716.35
5.4.50.0200.05716.48
5.4.40.0130.04716.44
5.4.30.0030.05316.38
5.4.20.0100.05316.36
5.4.10.0200.05716.35
5.4.00.0130.05315.90
5.3.290.0070.03912.80
5.3.280.0200.06014.59
5.3.270.0130.07014.63
5.3.260.0070.06014.60
5.3.250.0070.05014.70
5.3.240.0000.05714.60
5.3.230.0030.05314.45
5.3.220.0170.06714.45
5.3.210.0070.05314.57
5.3.200.0100.04714.68
5.3.190.0100.04714.69
5.3.180.0100.04714.55
5.3.170.0100.05014.67
5.3.160.0130.05314.67
5.3.150.0170.06014.49
5.3.140.0030.05314.71
5.3.130.0100.05314.66
5.3.120.0100.05714.54
5.3.110.0130.08314.64
5.3.100.0130.06714.20
5.3.90.0070.05714.13
5.3.80.0130.06714.10
5.3.70.0070.06013.86
5.3.60.0100.06714.10
5.3.50.0130.06714.19
5.3.40.0070.06313.94
5.3.30.0070.05714.11
5.3.20.0100.06313.74
5.3.10.0130.05713.50
5.3.00.0030.05313.83
5.2.170.0130.06011.23
5.2.160.0100.04311.12
5.2.150.0070.04311.36
5.2.140.0030.04311.07
5.2.130.0130.05311.11
5.2.120.0000.04311.20
5.2.110.0000.04311.11
5.2.100.0030.04311.20
5.2.90.0070.04011.29
5.2.80.0170.03311.10
5.2.70.0070.04011.28
5.2.60.0030.04311.16
5.2.50.0100.03311.02
5.2.40.0030.04311.19
5.2.30.0070.04310.99
5.2.20.0130.03010.85
5.2.10.0030.04710.95
5.2.00.0100.03710.73
5.1.60.0030.03310.12
5.1.50.0070.0309.98
5.1.40.0100.02710.02
5.1.30.0070.03310.26
5.1.20.0100.03010.54
5.1.10.0070.04010.09
5.1.00.0070.03310.07
5.0.50.0030.0308.61
5.0.40.0000.0308.59
5.0.30.0130.0508.25
5.0.20.0030.0278.29
5.0.10.0130.0208.29
5.0.00.0000.0478.10
4.4.90.0070.0176.08
4.4.80.0070.0276.08
4.4.70.0070.0176.08
4.4.60.0000.0236.08
4.4.50.0070.0236.08
4.4.40.0000.0376.08
4.4.30.0000.0236.08
4.4.20.0030.0206.08
4.4.10.0000.0236.08
4.4.00.0030.0336.08
4.3.110.0030.0306.08
4.3.100.0000.0236.08
4.3.90.0070.0236.08
4.3.80.0000.0336.08
4.3.70.0000.0276.08
4.3.60.0000.0306.08
4.3.50.0030.0236.08
4.3.40.0100.0376.08
4.3.30.0030.0206.08
4.3.20.0070.0276.08
4.3.10.0100.0136.08
4.3.00.0130.0206.62

preferences:
41.13 ms | 401 KiB | 5 Q