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; 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() { $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.60.0060.01018.68
8.3.50.0150.00222.17
8.3.40.0040.01419.17
8.3.30.0070.00719.27
8.3.20.0040.00420.21
8.3.10.0040.00422.09
8.3.00.0040.00422.51
8.2.180.0090.00617.00
8.2.170.0090.00922.96
8.2.160.0000.01419.32
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0080.00019.61
8.2.110.0030.00622.28
8.2.100.0060.00618.09
8.2.90.0040.00417.73
8.2.80.0080.00018.00
8.2.70.0000.00817.93
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0070.00020.72
8.2.30.0040.00418.26
8.2.20.0050.00317.84
8.2.10.0000.00817.89
8.2.00.0000.00817.89
8.1.280.0140.00725.92
8.1.270.0030.00522.39
8.1.260.0030.00726.35
8.1.250.0000.00828.09
8.1.240.0090.00023.76
8.1.230.0060.00618.91
8.1.220.0060.00317.77
8.1.210.0050.00318.77
8.1.200.0030.00717.59
8.1.190.0040.00417.25
8.1.180.0030.00518.10
8.1.170.0030.00518.90
8.1.160.0050.00222.19
8.1.150.0030.00618.78
8.1.140.0000.00817.65
8.1.130.0030.00317.78
8.1.120.0040.00417.64
8.1.110.0060.00317.65
8.1.100.0050.00317.62
8.1.90.0040.00417.71
8.1.80.0000.00717.68
8.1.70.0030.00317.68
8.1.60.0000.00817.69
8.1.50.0000.00717.77
8.1.40.0030.00517.72
8.1.30.0000.00917.86
8.1.20.0030.00517.80
8.1.10.0080.00017.70
8.1.00.0080.00017.73
8.0.300.0020.00519.91
8.0.290.0080.00016.71
8.0.280.0060.00318.65
8.0.270.0040.00417.34
8.0.260.0030.00317.09
8.0.250.0000.00817.20
8.0.240.0000.00717.31
8.0.230.0030.00317.09
8.0.220.0030.00517.21
8.0.210.0030.00317.17
8.0.200.0030.00317.18
8.0.190.0000.00717.27
8.0.180.0070.00017.07
8.0.170.0070.00017.16
8.0.160.0000.00817.12
8.0.150.0050.00216.98
8.0.140.0040.00417.05
8.0.130.0000.00613.54
8.0.120.0030.00517.13
8.0.110.0040.00416.99
8.0.100.0070.00017.22
8.0.90.0000.00717.21
8.0.80.0090.00617.19
8.0.70.0040.00417.13
8.0.60.0040.00417.07
8.0.50.0000.00717.16
8.0.30.0170.00817.36
8.0.20.0130.00617.47
8.0.10.0070.00017.20
8.0.00.0100.01217.02
7.4.330.0000.00615.03
7.4.320.0000.00716.88
7.4.300.0030.00316.88
7.4.290.0000.00716.66
7.4.280.0000.00816.77
7.4.270.0000.00716.82
7.4.260.0070.00316.73
7.4.250.0000.00716.73
7.4.240.0010.00616.84
7.4.230.0070.00016.86
7.4.220.0030.01416.75
7.4.210.0050.01216.82
7.4.200.0040.00416.62
7.4.190.0000.00716.80
7.4.160.0070.01016.61
7.4.150.0080.01217.40
7.4.140.0120.00617.86
7.4.130.0110.01016.87
7.4.120.0140.00316.86
7.4.110.0090.00916.88
7.4.100.0030.01616.79
7.4.90.0090.00916.70
7.4.80.0030.02019.39
7.4.70.0130.01016.87
7.4.60.0170.00617.01
7.4.50.0030.00616.57
7.4.40.0070.01122.77
7.4.30.0030.01616.69
7.4.00.0070.00715.14
7.3.330.0050.00013.52
7.3.320.0030.00313.65
7.3.310.0050.00516.46
7.3.300.0000.00616.48
7.3.290.0080.00816.61
7.3.280.0080.00816.54
7.3.270.0090.00917.40
7.3.260.0130.00716.84
7.3.250.0120.00516.66
7.3.240.0100.00616.78
7.3.230.0120.01216.56
7.3.210.0040.01316.91
7.3.200.0080.01219.39
7.3.190.0120.00716.77
7.3.180.0070.01116.75
7.3.170.0100.00616.60
7.3.160.0130.00616.82
7.3.120.0090.00615.00
7.2.330.0070.01016.80
7.2.320.0060.01217.02
7.2.310.0070.01116.88
7.2.300.0100.00716.93
7.2.290.0030.01316.96
7.2.60.0030.01017.24
7.1.200.0070.00715.66
7.1.70.0060.00617.21
7.1.60.0130.00719.82
7.1.50.0150.00617.35
7.1.00.0070.07022.29
7.0.200.0050.00816.76
7.0.140.0130.06322.10
7.0.60.0100.05319.90
7.0.50.0200.03317.91
7.0.40.0130.08320.11
7.0.30.0270.06720.18
7.0.20.0300.08020.28
7.0.10.0100.04720.23
7.0.00.0070.04320.22
5.6.280.0030.06721.14
5.6.210.0070.08020.77
5.6.200.0070.08318.22
5.6.190.0100.08320.64
5.6.180.4130.03720.33
5.6.170.0300.04020.44
5.6.160.0030.04020.54
5.6.150.0230.06718.22
5.6.140.0030.04018.21
5.6.130.0030.05018.21
5.6.120.0070.07321.04
5.6.110.0030.08021.11
5.6.100.0170.06321.10
5.6.90.0070.08021.00
5.6.80.0030.04020.37
5.6.70.3100.03720.55
5.5.350.0030.03320.34
5.5.340.0030.05317.96
5.5.330.0030.04320.30
5.5.320.0170.07720.36
5.5.310.0130.04720.28
5.5.300.0170.07718.04
5.5.290.0130.08317.96
5.5.280.0100.04020.84
5.5.270.0130.07320.89
5.5.260.0070.04020.70
5.5.250.0100.06320.60
5.5.240.0100.03720.29
5.4.450.0600.05319.58
5.4.440.0600.06319.48
5.4.430.0100.05319.49
5.4.420.0500.05719.70
5.4.410.0400.06019.45
5.4.400.0830.00018.77
5.4.390.0730.00018.60
5.4.380.0230.05318.59
5.4.370.0330.05018.63
5.4.360.0270.06018.60
5.4.350.0270.05718.61
5.4.340.0400.04718.76
5.4.320.0110.04212.52
5.4.310.0050.03912.52
5.4.300.0040.04012.52
5.4.290.0070.04212.51
5.4.280.0070.03212.41
5.4.270.0060.03612.41
5.4.260.0200.06018.73
5.4.250.0100.07318.79
5.4.240.0030.07018.99
5.4.230.0100.05718.79
5.4.220.0200.07018.76
5.4.210.0170.05318.74
5.4.200.0070.06318.74
5.4.190.0170.05718.75
5.4.180.0100.06018.93
5.4.170.0170.05018.92
5.4.160.0100.06018.79
5.4.150.0070.05718.98
5.4.140.0070.05016.38
5.4.130.0170.04016.54
5.4.120.0070.05316.57
5.4.110.0100.05716.54
5.4.100.0100.05016.50
5.4.90.0100.04716.61
5.4.80.0000.07016.53
5.4.70.0100.07316.65
5.4.60.0070.05316.48
5.4.50.0070.05016.50
5.4.40.0130.06016.48
5.4.30.0070.06316.45
5.4.20.0130.05316.43
5.4.10.0070.07716.59
5.4.00.0070.07715.94
5.3.290.0090.03912.80
5.3.280.0030.07014.70
5.3.270.0030.06014.62
5.3.260.0070.07014.61
5.3.250.0030.07714.61
5.3.240.0030.07314.67
5.3.230.0030.05714.84
5.3.220.0100.04714.68
5.3.210.0130.06014.61
5.3.200.0030.05714.56
5.3.190.0100.05314.57
5.3.180.0170.05314.67
5.3.170.0130.04714.67
5.3.160.0130.04714.66
5.3.150.0070.05714.68
5.3.140.0070.05714.58
5.3.130.0100.08314.64
5.3.120.0170.07014.65
5.3.110.0230.06714.66
5.3.100.0100.06014.07
5.3.90.0070.07714.12
5.3.80.0200.05314.12
5.3.70.0170.06314.12
5.3.60.0070.05314.10
5.3.50.0130.05014.15
5.3.40.0170.04714.04
5.3.30.0100.05314.02
5.3.20.0030.05313.80
5.3.10.0030.05313.75
5.3.00.0100.05713.56
5.2.170.0130.05711.19
5.2.160.0070.06011.25
5.2.150.0170.05011.27
5.2.140.0070.06011.25
5.2.130.0070.04011.34
5.2.120.0070.04011.11
5.2.110.0130.04711.20
5.2.100.0100.05011.11
5.2.90.0130.03311.13
5.2.80.0070.06011.02
5.2.70.0070.05311.23
5.2.60.0030.04311.16
5.2.50.0070.05711.22
5.2.40.0100.03711.02
5.2.30.0100.05711.07
5.2.20.0070.03710.82
5.2.10.0100.05010.89
5.2.00.0130.05010.75
5.1.60.0170.02010.22
5.1.50.0030.04310.09
5.1.40.0070.03010.04
5.1.30.0030.03710.36
5.1.20.0130.02710.46
5.1.10.0000.03710.25
5.1.00.0100.03310.16
5.0.50.0000.0338.82
5.0.40.0070.0278.40
5.0.30.0070.0578.36
5.0.20.0030.0378.32
5.0.10.0070.0278.30
5.0.00.0030.0478.34
4.4.90.0070.0176.27
4.4.80.0070.0276.27
4.4.70.0030.0206.27
4.4.60.0030.0236.27
4.4.50.0000.0236.27
4.4.40.0000.0476.25
4.4.30.0030.0206.25
4.4.20.0030.0206.25
4.4.10.0000.0236.25
4.4.00.0000.0376.25
4.3.110.0030.0236.25
4.3.100.0070.0236.25
4.3.90.0100.0136.25
4.3.80.0030.0436.25
4.3.70.0030.0236.25
4.3.60.0000.0236.25
4.3.50.0030.0236.25
4.3.40.0030.0376.25
4.3.30.0000.0236.25
4.3.20.0030.0206.25
4.3.10.0000.0306.25
4.3.00.0070.0236.83

preferences:
47 ms | 400 KiB | 5 Q