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.00018.55
8.3.50.0070.01122.24
8.3.40.0110.00718.92
8.3.30.0120.00319.21
8.3.20.0000.00820.29
8.3.10.0050.00322.04
8.3.00.0070.00022.43
8.2.180.0090.00617.00
8.2.170.0070.00722.96
8.2.160.0070.00719.24
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0140.00426.16
8.2.120.0080.00019.73
8.2.110.0100.00022.38
8.2.100.0080.00319.88
8.2.90.0000.00919.26
8.2.80.0040.00418.03
8.2.70.0050.00317.88
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0000.00818.22
8.2.30.0040.00418.17
8.2.20.0040.00417.82
8.2.10.0040.00418.04
8.2.00.0030.00517.92
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0090.00026.35
8.1.250.0000.00928.09
8.1.240.0060.00323.84
8.1.230.0070.00419.06
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00717.60
8.1.190.0080.00017.43
8.1.180.0000.00818.91
8.1.170.0000.00818.65
8.1.160.0000.00722.15
8.1.150.0040.00418.81
8.1.140.0030.00517.63
8.1.130.0000.00717.76
8.1.120.0040.00417.54
8.1.110.0040.00417.67
8.1.100.0000.00817.67
8.1.90.0040.00417.52
8.1.80.0070.00017.71
8.1.70.0000.00817.60
8.1.60.0040.00417.78
8.1.50.0040.00417.66
8.1.40.0070.00417.70
8.1.30.0030.00517.77
8.1.20.0040.00417.82
8.1.10.0000.00817.77
8.1.00.0080.00017.58
8.0.300.0060.00318.77
8.0.290.0000.00817.05
8.0.280.0030.00318.57
8.0.270.0000.00717.32
8.0.260.0000.00716.87
8.0.250.0030.00517.11
8.0.240.0070.00017.06
8.0.230.0000.00717.11
8.0.220.0000.00717.06
8.0.210.0030.00516.96
8.0.200.0030.00317.15
8.0.190.0040.00417.10
8.0.180.0000.00717.10
8.0.170.0040.00416.98
8.0.160.0080.00017.01
8.0.150.0060.00316.94
8.0.140.0040.00416.91
8.0.130.0000.00613.49
8.0.120.0030.00617.00
8.0.110.0030.00616.91
8.0.100.0070.00017.14
8.0.90.0080.00016.87
8.0.80.0070.01317.09
8.0.70.0050.00217.13
8.0.60.0070.00016.95
8.0.50.0020.00516.96
8.0.30.0110.00817.26
8.0.20.0110.00817.40
8.0.10.0040.00417.26
8.0.00.0060.01116.83
7.4.330.0030.00315.06
7.4.320.0080.00016.80
7.4.300.0000.00716.82
7.4.290.0040.00416.89
7.4.280.0080.00016.73
7.4.270.0070.00016.76
7.4.260.0040.00416.88
7.4.250.0080.00016.72
7.4.240.0020.00516.77
7.4.230.0000.00816.49
7.4.220.0090.00916.71
7.4.210.0060.00916.77
7.4.200.0000.00816.74
7.4.190.0070.00016.91
7.4.160.0040.01216.89
7.4.150.0140.00317.40
7.4.140.0080.01217.86
7.4.130.0110.00916.66
7.4.120.0080.00916.77
7.4.110.0070.01416.63
7.4.100.0090.00916.49
7.4.90.0090.01416.59
7.4.80.0060.01619.39
7.4.70.0080.01616.82
7.4.60.0140.00316.70
7.4.50.0030.00316.76
7.4.40.0110.00822.77
7.4.30.0070.01016.84
7.4.00.0070.01015.22
7.3.330.0000.00613.32
7.3.320.0050.00013.51
7.3.310.0040.00416.58
7.3.300.0000.00716.59
7.3.290.0070.00716.41
7.3.280.0090.01016.48
7.3.270.0090.00917.40
7.3.260.0110.00716.47
7.3.250.0090.00816.56
7.3.240.0060.01216.85
7.3.230.0120.00616.59
7.3.210.0060.01216.64
7.3.200.0100.00619.39
7.3.190.0170.00716.77
7.3.180.0090.00616.51
7.3.170.0170.00016.77
7.3.160.0060.00916.45
7.3.120.0160.00015.23
7.2.330.0100.01016.85
7.2.320.0040.01316.78
7.2.310.0070.01516.94
7.2.300.0100.00716.81
7.2.290.0100.00716.67
7.1.70.0070.00517.22
7.1.60.0000.01119.82
7.1.50.0060.01917.26
7.1.00.0000.08322.29
7.0.200.0030.00516.55
7.0.140.0030.07722.11
7.0.60.0030.09019.94
7.0.50.0170.07317.90
7.0.40.0000.07020.05
7.0.30.0300.06020.25
7.0.20.0330.06720.09
7.0.10.0130.05020.13
7.0.00.0030.04020.11
5.6.280.0000.07721.09
5.6.210.0100.04720.56
5.6.200.0100.06018.19
5.6.190.0030.04720.51
5.6.180.3470.05020.57
5.6.170.0230.04020.62
5.6.160.0070.03720.55
5.6.150.0030.05018.24
5.6.140.0030.04018.20
5.6.130.0070.03718.16
5.6.120.0130.08321.00
5.6.110.0170.07321.01
5.6.100.0100.07721.13
5.6.90.0000.04320.91
5.6.80.0000.04320.45
5.6.70.3370.03020.39
5.5.350.0030.06720.43
5.5.340.0030.04318.05
5.5.330.0100.05320.35
5.5.320.0300.07320.42
5.5.310.0170.03720.24
5.5.300.0170.07318.04
5.5.290.0030.05018.09
5.5.280.0030.04720.79
5.5.270.0100.07020.98
5.5.260.0100.05720.88
5.5.250.0170.07020.80
5.5.240.0070.07720.38
5.4.450.0700.05019.39
5.4.440.0470.06719.20
5.4.430.0000.06319.61
5.4.420.0630.05319.38
5.4.410.0630.05019.48
5.4.400.0870.00018.85
5.4.390.1200.00018.64
5.4.380.0130.07718.77
5.4.370.0370.05018.79
5.4.360.0230.05018.78
5.4.350.0470.04318.60
5.4.340.0330.05318.71
5.4.320.0080.04212.52
5.4.310.0080.04412.52
5.4.300.0070.03612.52
5.4.290.0100.03412.51
5.4.280.0070.03512.41
5.4.270.0050.03512.41
5.4.260.0130.04719.09
5.4.250.0100.05019.02
5.4.240.0000.06718.99
5.4.230.0170.04718.94
5.4.220.0070.05318.96
5.4.210.0130.05318.83
5.4.200.0100.05018.87
5.4.190.0130.04718.96
5.4.180.0030.08018.82
5.4.170.0070.05318.82
5.4.160.0030.08318.95
5.4.150.0100.05718.94
5.4.140.0070.05316.30
5.4.130.0070.06016.56
5.4.120.0000.05716.36
5.4.110.0070.07316.51
5.4.100.0170.06316.46
5.4.90.0100.04316.62
5.4.80.0030.07016.51
5.4.70.0030.05316.34
5.4.60.0070.05716.45
5.4.50.0100.05316.46
5.4.40.0100.04716.43
5.4.30.0100.04716.36
5.4.20.0100.07316.58
5.4.10.0070.05316.59
5.4.00.0070.05715.79
5.3.290.0060.04212.80
5.3.280.0070.05714.79
5.3.270.0170.05314.61
5.3.260.0230.04014.71
5.3.250.0130.04714.85
5.3.240.0170.06314.53
5.3.230.0170.06314.70
5.3.220.0230.06314.68
5.3.210.0070.07014.60
5.3.200.0200.05714.77
5.3.190.0100.04714.67
5.3.180.0070.05314.60
5.3.170.0070.07314.65
5.3.160.0070.05014.81
5.3.150.0130.05314.49
5.3.140.0070.05014.48
5.3.130.0000.06014.79
5.3.120.0070.07714.75
5.3.110.0100.05314.54
5.3.100.0100.05314.14
5.3.90.0100.04714.00
5.3.80.0100.05014.21
5.3.70.0070.05313.94
5.3.60.0000.06714.09
5.3.50.0030.05314.04
5.3.40.0100.07013.95
5.3.30.0070.05013.95
5.3.20.0130.04313.64
5.3.10.0030.05013.65
5.3.00.0200.04013.56
5.2.170.0170.03711.40
5.2.160.0100.03711.00
5.2.150.0100.04311.07
5.2.140.0030.04311.24
5.2.130.0000.05011.11
5.2.120.0100.03711.20
5.2.110.0000.04711.21
5.2.100.0070.06011.11
5.2.90.0100.04010.95
5.2.80.0100.05711.12
5.2.70.0170.03311.19
5.2.60.0130.04011.20
5.2.50.0070.05711.11
5.2.40.0100.04711.02
5.2.30.0070.03711.10
5.2.20.0070.04311.17
5.2.10.0130.04710.71
5.2.00.0070.05710.93
5.1.60.0000.05710.00
5.1.50.0100.03710.08
5.1.40.0000.05310.06
5.1.30.0070.03710.45
5.1.20.0000.04010.34
5.1.10.0100.03310.05
5.1.00.0030.03710.05
5.0.50.0030.0408.53
5.0.40.0000.0308.52
5.0.30.0030.0438.34
5.0.20.0000.0338.41
5.0.10.0030.0278.21
5.0.00.0130.0408.16
4.4.90.0070.0206.25
4.4.80.0070.0276.25
4.4.70.0070.0276.25
4.4.60.0030.0206.25
4.4.50.0030.0206.25
4.4.40.0000.0506.25
4.4.30.0030.0276.25
4.4.20.0100.0236.25
4.4.10.0000.0236.25
4.4.00.0070.0436.25
4.3.110.0000.0336.25
4.3.100.0000.0276.25
4.3.90.0100.0236.25
4.3.80.0070.0336.25
4.3.70.0070.0176.25
4.3.60.0070.0176.25
4.3.50.0100.0236.25
4.3.40.0070.0306.25
4.3.30.0030.0206.25
4.3.20.0030.0206.25
4.3.10.0030.0206.25
4.3.00.0100.0206.63

preferences:
51.26 ms | 401 KiB | 5 Q