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 . $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); $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.70.0120.00618.41
8.3.60.0120.00318.43
8.3.50.0150.00722.11
8.3.40.0110.00719.14
8.3.30.0070.00719.23
8.3.20.0000.00720.30
8.3.10.0000.00821.95
8.3.00.0080.00022.34
8.2.190.0100.00517.00
8.2.180.0130.00616.75
8.2.170.0120.00322.96
8.2.160.0090.00619.33
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00819.61
8.2.110.0030.00622.23
8.2.100.0030.00919.88
8.2.90.0060.00319.14
8.2.80.0050.00317.97
8.2.70.0040.00417.75
8.2.60.0070.00417.93
8.2.50.0060.00318.07
8.2.40.0040.00420.00
8.2.30.0000.00818.29
8.2.20.0040.00417.88
8.2.10.0030.00518.00
8.2.00.0030.00617.87
8.1.280.0070.00725.92
8.1.270.0090.00022.19
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.76
8.1.230.0050.00519.34
8.1.220.0080.00017.78
8.1.210.0040.00418.77
8.1.200.0100.00317.60
8.1.190.0040.00417.55
8.1.180.0080.00018.77
8.1.170.0050.00318.89
8.1.160.0000.00722.07
8.1.150.0000.00818.87
8.1.140.0000.00717.55
8.1.130.0000.00717.89
8.1.120.0000.00717.70
8.1.110.0030.00517.69
8.1.100.0080.00017.68
8.1.90.0030.00617.66
8.1.80.0070.00017.65
8.1.70.0000.00817.62
8.1.60.0030.00617.66
8.1.50.0040.00417.65
8.1.40.0030.00517.71
8.1.30.0080.00017.82
8.1.20.0090.00017.67
8.1.10.0040.00417.83
8.1.00.0080.00017.70
8.0.300.0000.00718.77
8.0.290.0040.00417.16
8.0.280.0070.00018.54
8.0.270.0070.00017.35
8.0.260.0030.00317.00
8.0.250.0030.00317.15
8.0.240.0050.00217.05
8.0.230.0070.00017.06
8.0.220.0070.00017.13
8.0.210.0070.00017.14
8.0.200.0000.00717.00
8.0.190.0040.00417.18
8.0.180.0050.00217.09
8.0.170.0000.00717.01
8.0.160.0050.00216.94
8.0.150.0040.00416.91
8.0.140.0000.00716.92
8.0.130.0060.00013.57
8.0.120.0000.00817.01
8.0.110.0030.00616.90
8.0.100.0030.00516.86
8.0.90.0050.00217.02
8.0.80.0030.01317.13
8.0.70.0080.00017.20
8.0.60.0070.00016.90
8.0.50.0040.00417.12
8.0.30.0100.01017.41
8.0.20.0140.00717.40
8.0.10.0030.00517.00
8.0.00.0110.00916.75
7.4.330.0000.00515.12
7.4.320.0030.00316.87
7.4.300.0000.00616.71
7.4.290.0070.00016.75
7.4.280.0030.00316.86
7.4.270.0000.00816.66
7.4.260.0040.00416.88
7.4.250.0090.00016.86
7.4.240.0020.00516.67
7.4.230.0030.00316.75
7.4.220.0160.00616.88
7.4.210.0080.00716.84
7.4.200.0050.00216.66
7.4.190.0040.00316.71
7.4.160.0000.01716.71
7.4.150.0100.00717.40
7.4.140.0120.00617.86
7.4.130.0120.00816.74
7.4.120.0090.00816.77
7.4.110.0070.01116.75
7.4.100.0110.00716.77
7.4.90.0120.01216.73
7.4.80.0100.00619.39
7.4.70.0130.00616.84
7.4.60.0090.01516.68
7.4.50.0030.00316.54
7.4.40.0100.00722.77
7.4.30.0130.01016.84
7.4.00.0060.01115.28
7.3.330.0000.00613.38
7.3.320.0000.00613.57
7.3.310.0000.00816.63
7.3.300.0000.00816.62
7.3.290.0070.00716.41
7.3.280.0080.01016.44
7.3.270.0170.00017.40
7.3.260.0100.00716.56
7.3.250.0100.00716.51
7.3.240.0060.01316.48
7.3.230.0030.02216.71
7.3.210.0030.01516.75
7.3.200.0060.01019.39
7.3.190.0120.00816.64
7.3.180.0120.00316.48
7.3.170.0120.00616.63
7.3.160.0090.00616.64
7.3.120.0050.01214.94
7.3.110.0070.01115.07
7.3.100.0030.00615.32
7.3.90.0060.00615.11
7.3.80.0060.00315.22
7.3.70.0060.00615.10
7.3.60.0130.00314.93
7.3.50.0080.00414.80
7.3.40.0110.00415.07
7.3.30.0060.01014.98
7.3.20.0060.00616.71
7.3.10.0000.01317.04
7.3.00.0070.00716.98
7.2.330.0060.01216.82
7.2.320.0070.01716.90
7.2.310.0040.01316.82
7.2.300.0130.00316.96
7.2.290.0080.00816.91
7.2.250.0030.01715.43
7.2.240.0070.01315.34
7.2.230.0100.00615.27
7.2.220.0070.00715.32
7.2.210.0060.00615.39
7.2.200.0030.01015.28
7.2.190.0080.00315.28
7.2.180.0000.01315.15
7.2.170.0050.00515.24
7.1.330.0080.00815.96
7.1.320.0000.01416.28
7.1.310.0030.01015.78
7.1.300.0070.00715.81
7.1.290.0040.01116.19
7.1.280.0090.00615.95
7.1.270.0050.00516.04
7.1.260.0040.01116.14
7.1.70.0060.00917.21
7.1.60.0090.01619.82
7.1.50.0100.01017.17
7.1.00.0070.06722.38
7.0.200.0040.00416.85
7.0.140.0070.06322.04
7.0.60.0070.03719.89
7.0.50.0100.07317.93
7.0.40.0030.05020.26
7.0.30.0330.04320.23
7.0.20.0230.07720.08
7.0.10.0130.04320.08
7.0.00.0030.04320.17
5.6.280.0000.07720.91
5.6.210.0130.06320.66
5.6.200.0130.08318.21
5.6.190.0070.05720.33
5.6.180.0030.05720.48
5.6.170.0270.06720.47
5.6.160.0030.04320.76
5.6.150.0070.04318.15
5.6.140.0030.04318.28
5.6.130.0070.06718.13
5.6.120.0070.09021.06
5.6.110.0070.05321.03
5.6.100.0100.06721.14
5.6.90.0000.06021.02
5.6.80.0070.06720.39
5.6.70.4470.03320.42
5.5.350.0070.03720.39
5.5.340.0130.04317.94
5.5.330.0070.04020.19
5.5.320.0300.06320.19
5.5.310.0170.04320.28
5.5.300.0130.07317.94
5.5.290.0100.04717.98
5.5.280.0170.06020.99
5.5.270.0070.03720.81
5.5.260.0070.04020.70
5.5.250.0070.05320.49
5.5.240.0100.03720.21
5.4.450.0830.05319.59
5.4.440.0600.05019.61
5.4.430.0430.06019.38
5.4.420.0230.06019.57
5.4.410.0500.05319.32
5.4.400.0770.00018.62
5.4.390.0630.00018.52
5.4.380.0400.07018.79
5.4.370.0270.04718.63
5.4.360.0100.06318.80
5.4.350.0330.05318.79
5.4.340.0300.05018.52
5.4.320.0050.03712.52
5.4.310.0060.03812.52
5.4.300.0050.03812.52
5.4.290.0070.03812.51
5.4.280.0090.03112.41
5.4.270.0100.03212.41
5.4.260.0130.04319.02
5.4.250.0170.04018.79
5.4.240.0070.05018.89
5.4.230.0100.04718.92
5.4.220.0030.05318.98
5.4.210.0070.05318.96
5.4.200.0130.04718.79
5.4.190.0070.05718.64
5.4.180.0070.05018.99
5.4.170.0030.05719.09
5.4.160.0100.04718.78
5.4.150.0030.07018.88
5.4.140.0070.05016.38
5.4.130.0000.05716.45
5.4.120.0030.05016.32
5.4.110.0030.05316.52
5.4.100.0100.04716.46
5.4.90.0200.05016.52
5.4.80.0000.05016.43
5.4.70.0030.05016.52
5.4.60.0030.05016.49
5.4.50.0070.04716.39
5.4.40.0070.04716.40
5.4.30.0130.04016.48
5.4.20.0070.05016.52
5.4.10.0000.05716.33
5.4.00.0130.05715.88
5.3.290.0110.03412.80
5.3.280.0070.05014.61
5.3.270.0070.05714.60
5.3.260.0100.05014.71
5.3.250.0070.05014.61
5.3.240.0070.05314.53
5.3.230.0100.07014.52
5.3.220.0070.05014.57
5.3.210.0100.04714.67
5.3.200.0070.06014.49
5.3.190.0070.05014.49
5.3.180.0070.04714.76
5.3.170.0000.05314.66
5.3.160.0030.05014.75
5.3.150.0030.05014.75
5.3.140.0130.04314.56
5.3.130.0030.05314.66
5.3.120.0030.05714.63
5.3.110.0030.07314.73
5.3.100.0070.04714.19
5.3.90.0000.05314.12
5.3.80.0070.04714.05
5.3.70.0270.04314.12
5.3.60.0100.05014.10
5.3.50.0100.06713.95
5.3.40.0070.04714.20
5.3.30.0130.04313.93
5.3.20.0070.06313.79
5.3.10.0130.04013.65
5.3.00.0070.05013.88
5.2.170.0030.05011.07
5.2.160.0100.03311.23
5.2.150.0030.04311.25
5.2.140.0030.04311.15
5.2.130.0030.04311.22
5.2.120.0130.03311.30
5.2.110.0030.04311.19
5.2.100.0030.04311.03
5.2.90.0070.04311.21
5.2.80.0070.04011.07
5.2.70.0100.06011.28
5.2.60.0130.04711.29
5.2.50.0100.03711.03
5.2.40.0170.02711.09
5.2.30.0030.04011.09
5.2.20.0030.04310.82
5.2.10.0030.04010.84
5.2.00.0030.05710.71
5.1.60.0100.02710.26
5.1.50.0100.02710.17
5.1.40.0070.03010.07
5.1.30.0130.04710.31
5.1.20.0070.04710.45
5.1.10.0130.04310.19
5.1.00.0170.03010.29
5.0.50.0100.0308.58
5.0.40.0030.0408.50
5.0.30.0030.0438.35
5.0.20.0030.0278.14
5.0.10.0030.0378.04
5.0.00.0000.0438.22
4.4.90.0030.0306.18
4.4.80.0070.0236.18
4.4.70.0100.0136.18
4.4.60.0070.0206.18
4.4.50.0030.0206.18
4.4.40.0070.0436.18
4.4.30.0070.0236.18
4.4.20.0070.0306.18
4.4.10.0030.0206.18
4.4.00.0030.0336.18
4.3.110.0030.0206.18
4.3.100.0000.0236.18
4.3.90.0000.0306.18
4.3.80.0030.0306.18
4.3.70.0030.0306.18
4.3.60.0070.0176.18
4.3.50.0030.0276.18
4.3.40.0000.0376.18
4.3.30.0030.0206.18
4.3.20.0030.0206.18
4.3.10.0000.0236.18
4.3.00.0070.0276.63

preferences:
52.57 ms | 401 KiB | 5 Q