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.70.0060.00918.55
8.3.60.0110.00718.48
8.3.50.0070.01522.17
8.3.40.0110.00719.14
8.3.30.0090.00919.18
8.3.20.0080.00019.98
8.3.10.0030.00521.92
8.3.00.0030.00522.43
8.2.180.0060.00917.00
8.2.170.0080.00822.96
8.2.160.0100.00319.34
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0040.01126.16
8.2.120.0080.00019.86
8.2.110.0040.00722.25
8.2.100.0080.00417.91
8.2.90.0080.00018.03
8.2.80.0000.00817.97
8.2.70.0080.00018.00
8.2.60.0050.00317.93
8.2.50.0030.00618.07
8.2.40.0080.00020.01
8.2.30.0000.00818.19
8.2.20.0000.00817.91
8.2.10.0020.00517.93
8.2.00.0030.00617.80
8.1.280.0080.00825.92
8.1.270.0030.00522.18
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00922.46
8.1.230.0060.00620.97
8.1.220.0000.00817.74
8.1.210.0050.00318.82
8.1.200.0060.00317.48
8.1.190.0040.00417.66
8.1.180.0030.00518.60
8.1.170.0090.00018.69
8.1.160.0000.00722.21
8.1.150.0050.00218.70
8.1.140.0030.00617.76
8.1.130.0000.00717.73
8.1.120.0050.00217.70
8.1.110.0040.00417.66
8.1.100.0080.00017.64
8.1.90.0030.00517.49
8.1.80.0070.00017.58
8.1.70.0090.00017.51
8.1.60.0050.00317.64
8.1.50.0000.00817.71
8.1.40.0040.00417.71
8.1.30.0000.00917.83
8.1.20.0030.00517.77
8.1.10.0030.00617.79
8.1.00.0030.00617.64
8.0.300.0000.00720.03
8.0.290.0040.00417.30
8.0.280.0000.00718.51
8.0.270.0040.00417.23
8.0.260.0030.00517.00
8.0.250.0030.00317.03
8.0.240.0000.00717.05
8.0.230.0040.00417.09
8.0.220.0050.00317.14
8.0.210.0000.00816.98
8.0.200.0040.00417.18
8.0.190.0040.00417.05
8.0.180.0040.00417.06
8.0.170.0040.00417.09
8.0.160.0040.00417.00
8.0.150.0000.00716.95
8.0.140.0030.00516.91
8.0.130.0030.00313.51
8.0.120.0040.00417.09
8.0.110.0030.00516.98
8.0.100.0050.00216.94
8.0.90.0000.00817.07
8.0.80.0110.01017.13
8.0.70.0000.00717.14
8.0.60.0040.00416.93
8.0.50.0050.00317.11
8.0.30.0120.00817.17
8.0.20.0140.00817.40
8.0.10.0040.00417.20
8.0.00.0110.01117.04
7.4.330.0000.00515.00
7.4.320.0000.00616.76
7.4.300.0000.00716.87
7.4.290.0070.00016.65
7.4.280.0000.00716.76
7.4.270.0060.00316.77
7.4.260.0030.00316.87
7.4.250.0040.00416.71
7.4.240.0000.00716.74
7.4.230.0030.00316.55
7.4.220.0140.00316.72
7.4.210.0070.00816.68
7.4.200.0040.00416.68
7.4.190.0070.00016.89
7.4.160.0080.00816.58
7.4.150.0070.01117.40
7.4.140.0100.00717.86
7.4.130.0090.00816.73
7.4.120.0110.00816.63
7.4.110.0100.00716.78
7.4.100.0030.01416.88
7.4.90.0090.01116.69
7.4.80.0060.01219.39
7.4.70.0020.00116.64
7.4.60.0100.00616.68
7.4.50.0000.00716.73
7.4.40.0070.00722.77
7.4.30.0090.00816.63
7.4.10.0060.00915.13
7.4.00.0080.00614.88
7.3.330.0050.00013.36
7.3.320.0000.00613.48
7.3.310.0000.00816.57
7.3.300.0040.00416.51
7.3.290.0150.00816.38
7.3.280.0100.00616.45
7.3.270.0100.00717.40
7.3.260.0200.00416.52
7.3.250.0080.00916.67
7.3.240.0070.01116.66
7.3.230.0090.01416.95
7.3.210.0030.01516.54
7.3.200.0100.00619.39
7.3.190.0090.01316.74
7.3.180.0120.00416.80
7.3.170.0000.01716.73
7.3.160.0100.00716.86
7.3.130.0000.01715.13
7.3.120.0080.00914.98
7.3.110.0090.01215.06
7.3.100.0030.01414.91
7.3.90.0070.01114.82
7.3.80.0000.01315.27
7.3.70.0060.00915.00
7.3.60.0040.01115.18
7.3.50.0070.00715.19
7.3.40.0030.00615.01
7.3.30.0090.00615.21
7.3.20.0070.01016.51
7.3.10.0030.00616.66
7.3.00.0060.00616.96
7.2.330.0060.01216.76
7.2.320.0100.00716.86
7.2.310.0090.00916.93
7.2.300.0160.00016.91
7.2.290.0110.00516.87
7.2.260.0070.01415.36
7.2.250.0140.00715.17
7.2.240.0060.00915.48
7.2.230.0070.01115.29
7.2.220.0090.00915.34
7.2.210.0000.01015.27
7.2.200.0110.00315.31
7.2.190.0030.00915.08
7.2.180.0040.00815.48
7.2.170.0040.01415.24
7.2.160.0040.00715.16
7.2.150.0000.01117.19
7.2.140.0030.01016.89
7.2.130.0120.00317.00
7.2.120.0090.00616.98
7.2.110.0030.00916.95
7.2.100.0060.00617.04
7.2.90.0090.00317.29
7.2.80.0080.00417.19
7.2.70.0000.01017.17
7.2.60.0030.01317.02
7.2.50.0030.00817.09
7.2.40.0070.00717.05
7.2.30.0060.00916.91
7.2.20.0040.01116.89
7.2.10.0080.00817.33
7.2.00.0040.00817.00
7.1.330.0100.00316.25
7.1.320.0040.01415.74
7.1.310.0110.00316.07
7.1.300.0040.00416.03
7.1.290.0090.00316.17
7.1.280.0000.01215.91
7.1.270.0050.00315.82
7.1.260.0030.01015.98
7.1.250.0040.00816.25
7.1.240.0040.00716.25
7.1.230.0060.00616.00
7.1.220.0070.00716.04
7.1.210.0100.00316.02
7.1.200.0050.00816.07
7.1.190.0100.00315.93
7.1.180.0070.00715.87
7.1.170.0000.01016.00
7.1.160.0090.00316.01
7.1.150.0110.00316.08
7.1.140.0030.01215.99
7.1.130.0030.01016.11
7.1.120.0090.00316.02
7.1.110.0060.00616.09
7.1.100.0030.01315.98
7.1.90.0000.01315.93
7.1.80.0030.01016.02
7.1.70.0070.01016.70
7.1.60.0040.01016.75
7.1.50.0090.00516.61
7.1.40.0030.00915.94
7.1.30.0060.00616.07
7.1.20.0000.01015.84
7.1.10.0070.01015.80
7.1.00.0050.04019.12
7.0.330.0030.00615.82
7.0.320.0070.00715.84
7.0.310.0030.00915.39
7.0.300.0040.01115.39
7.0.290.0070.00715.66
7.0.280.0000.01315.77
7.0.270.0030.01315.63
7.0.260.0030.01015.71
7.0.250.0080.00415.71
7.0.240.0090.00315.57
7.0.230.0040.00815.80
7.0.220.0030.00915.79
7.0.210.0030.01715.35
7.0.200.0050.00916.33
7.0.190.0090.00615.68
7.0.180.0040.00415.69
7.0.170.0060.00915.61
7.0.160.0030.00615.74
7.0.150.0030.01015.57
7.0.140.0080.04018.73
7.0.130.0070.00415.51
7.0.120.0030.00515.77
7.0.110.0000.01315.66
7.0.100.0070.00715.63
7.0.90.0000.00815.24
7.0.80.0040.00815.69
7.0.70.0080.00415.55
7.0.60.0050.02417.85
7.0.50.0070.04316.81
7.0.40.0030.04916.99
7.0.30.0180.04316.94
7.0.20.0150.02316.90
7.0.10.0150.02816.92
7.0.00.0020.02816.96
5.6.400.0000.00914.39
5.6.390.0030.01014.71
5.6.380.0070.00314.60
5.6.370.0070.00714.39
5.6.360.0070.00714.46
5.6.350.0110.00414.60
5.6.340.0100.00314.66
5.6.330.0060.00614.56
5.6.320.0060.00914.61
5.6.310.0070.01414.78
5.6.300.0030.01014.52
5.6.290.0030.00614.37
5.6.280.0050.04017.64
5.6.270.0030.01014.77
5.6.260.0030.01014.61
5.6.250.0040.01114.42
5.6.240.0040.01114.79
5.6.230.0040.00414.41
5.6.220.0090.00614.41
5.6.210.0050.03817.54
5.6.200.0050.04716.32
5.6.190.0030.02817.26
5.6.180.1530.03417.65
5.6.170.0180.02317.43
5.6.160.0030.02717.47
5.6.150.0050.02616.40
5.6.140.0060.02116.27
5.6.130.0130.04016.33
5.6.120.0100.04417.68
5.6.110.0030.04817.75
5.6.100.0050.03717.80
5.6.90.0080.04317.71
5.6.80.0020.02517.58
5.6.70.1550.02617.51
5.6.60.0030.01014.39
5.6.50.0030.01314.41
5.6.40.0060.00914.72
5.6.30.0030.01314.30
5.6.20.0150.00314.30
5.6.10.0100.00614.54
5.6.00.0030.01014.19
5.5.380.0060.00914.37
5.5.370.0030.00714.13
5.5.360.0100.00714.61
5.5.350.0040.02017.55
5.5.340.0030.04716.06
5.5.330.0030.03317.32
5.5.320.0190.03717.38
5.5.310.0130.02817.43
5.5.300.0110.04016.29
5.5.290.0070.04416.29
5.5.280.0050.04117.69
5.5.270.0120.04317.57
5.5.260.0060.02217.71
5.5.250.0030.05317.60
5.5.240.0060.02017.25
5.5.230.0030.01014.29
5.5.220.0000.01214.43
5.5.210.0000.01314.48
5.5.200.0050.00814.15
5.5.190.0070.00714.35
5.5.180.0030.01214.52
5.5.170.0060.00614.27
5.5.160.0060.01014.51
5.5.150.0100.00314.29
5.5.140.0000.01714.43
5.5.130.0060.00614.23
5.5.120.0070.00314.29
5.5.110.0040.01214.56
5.5.100.0060.00614.10
5.5.90.0110.00314.34
5.5.80.0040.00914.41
5.5.70.0000.01514.50
5.5.60.0030.01014.39
5.5.50.0000.01014.43
5.5.40.0000.01214.40
5.5.30.0030.00914.14
5.5.20.0040.00714.37
5.5.10.0090.00614.71
5.5.00.0030.01314.19
5.4.450.0380.03015.90
5.4.440.0350.02715.83
5.4.430.0270.03715.75
5.4.420.0200.03115.97
5.4.410.0250.02715.76
5.4.400.0550.00515.54
5.4.390.0480.00215.47
5.4.380.0130.03215.53
5.4.370.0180.02615.56
5.4.360.0100.03715.45
5.4.350.0170.03015.46
5.4.340.0220.02315.53
5.4.330.0070.00012.31
5.4.320.0040.02512.42
5.4.310.0040.02312.41
5.4.300.0040.02012.42
5.4.290.0070.01912.41
5.4.280.0050.02012.36
5.4.270.0070.02112.36
5.4.260.0050.04015.57
5.4.250.0070.04215.65
5.4.240.0060.03215.53
5.4.230.0110.03815.62
5.4.220.0050.04415.62
5.4.210.0110.03715.57
5.4.200.0080.02815.48
5.4.190.0060.03215.66
5.4.180.0100.03415.62
5.4.170.0080.03315.53
5.4.160.0100.03115.63
5.4.150.0070.04215.55
5.4.140.0050.02814.35
5.4.130.0030.03514.33
5.4.120.0090.03814.37
5.4.110.0070.02814.38
5.4.100.0030.02914.33
5.4.90.0080.02714.43
5.4.80.0080.03114.40
5.4.70.0050.03414.42
5.4.60.0050.03014.30
5.4.50.0040.03114.38
5.4.40.0100.03014.43
5.4.30.0050.02714.42
5.4.20.0030.02914.34
5.4.10.0090.03114.31
5.4.00.0070.03714.07
5.3.290.0060.02312.56
5.3.280.0100.03213.51
5.3.270.0030.03513.55
5.3.260.0050.03313.52
5.3.250.0080.03113.51
5.3.240.0080.02813.55
5.3.230.0120.03213.38
5.3.220.0100.02413.46
5.3.210.0060.02913.49
5.3.200.0020.03113.56
5.3.190.0010.03513.45
5.3.180.0050.03513.52
5.3.170.0070.03313.49
5.3.160.0070.03213.37
5.3.150.0040.03013.53
5.3.140.0090.02513.43
5.3.130.0060.02813.55
5.3.120.0090.03013.49
5.3.110.0000.03513.39
5.3.100.0080.03313.30
5.3.90.0080.02513.29
5.3.80.0100.02313.16
5.3.70.0050.02713.16
5.3.60.0070.02813.12
5.3.50.0050.02813.18
5.3.40.0030.03113.07
5.3.30.0030.04013.12
5.3.20.0090.02413.06
5.3.10.0050.02513.07
5.3.00.0090.02712.97
5.2.170.0000.04711.24
5.2.160.0000.05711.39
5.2.150.0130.03711.07
5.2.140.0230.02711.27
5.2.130.0070.04011.34
5.2.120.0070.04311.11
5.2.110.0030.04311.09
5.2.100.0100.03311.17
5.2.90.0000.04311.21
5.2.80.0000.04711.09
5.2.70.0100.03711.21
5.2.60.0070.05010.98
5.2.50.0030.04010.88
5.2.40.0070.03711.12
5.2.30.0100.05311.00
5.2.20.0000.04311.07
5.2.10.0100.03310.95
5.2.00.0000.04710.92
5.1.60.0000.0409.99
5.1.50.0030.0439.98
5.1.40.0130.03010.05
5.1.30.0000.04310.36
5.1.20.0070.03310.37
5.1.10.0130.02710.19
5.1.00.0000.05710.07
5.0.50.0130.0178.53
5.0.40.0030.0278.53
5.0.30.0000.0438.32
5.0.20.0030.0278.33
5.0.10.0030.0278.29
5.0.00.0030.0508.38
4.4.90.0030.0206.02
4.4.80.0070.0176.02
4.4.70.0030.0306.02
4.4.60.0030.0206.02
4.4.50.0030.0206.02
4.4.40.0070.0306.02
4.4.30.0070.0176.02
4.4.20.0070.0276.02
4.4.10.0030.0206.02
4.4.00.0030.0336.02
4.3.110.0030.0306.02
4.3.100.0000.0236.02
4.3.90.0000.0236.02
4.3.80.0030.0306.02
4.3.70.0030.0176.02
4.3.60.0000.0206.02
4.3.50.0000.0236.02
4.3.40.0070.0276.02
4.3.30.0030.0206.02
4.3.20.0030.0206.02
4.3.10.0000.0236.02
4.3.00.0070.0276.63

preferences:
45.43 ms | 401 KiB | 5 Q