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(); $reader->getHMTL($line); $ad_info = new AdInfoExtractor($line); 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.0130.00618.52
8.3.50.0090.01222.24
8.3.40.0110.00718.93
8.3.30.0040.01119.17
8.3.20.0080.00020.34
8.3.10.0060.00322.08
8.3.00.0050.00322.44
8.2.180.0090.00616.75
8.2.170.0120.00322.96
8.2.160.0110.00319.36
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0070.00719.73
8.2.110.0060.00322.18
8.2.100.0080.00419.88
8.2.90.0040.00419.26
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0030.00618.05
8.2.50.0030.00518.07
8.2.40.0030.00518.17
8.2.30.0000.00718.05
8.2.20.0050.00318.01
8.2.10.0040.00417.96
8.2.00.0040.00418.09
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0060.00323.64
8.1.230.0090.00318.95
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0100.00017.47
8.1.190.0000.00917.53
8.1.180.0060.00318.73
8.1.170.0080.00018.84
8.1.160.0040.00422.16
8.1.150.0030.00618.74
8.1.140.0000.00817.68
8.1.130.0000.00717.85
8.1.120.0070.00017.55
8.1.110.0040.00417.62
8.1.100.0000.00717.59
8.1.90.0040.00417.61
8.1.80.0040.00417.66
8.1.70.0090.00017.59
8.1.60.0000.00817.71
8.1.50.0040.00417.70
8.1.40.0040.00417.73
8.1.30.0000.00817.66
8.1.20.0000.00917.84
8.1.10.0040.00417.68
8.1.00.0030.00617.73
8.0.300.0070.00018.77
8.0.290.0070.00017.30
8.0.280.0040.00418.46
8.0.270.0040.00417.23
8.0.260.0070.00017.05
8.0.250.0070.00017.21
8.0.240.0040.00417.17
8.0.230.0000.00717.07
8.0.220.0000.00717.09
8.0.210.0000.00717.08
8.0.200.0030.00317.16
8.0.190.0000.00817.20
8.0.180.0070.00017.14
8.0.170.0000.00817.11
8.0.160.0000.00817.13
8.0.150.0040.00417.16
8.0.140.0030.00516.99
8.0.130.0000.00613.52
8.0.120.0040.00417.04
8.0.110.0050.00317.16
8.0.100.0000.00817.20
8.0.90.0040.00417.18
8.0.80.0090.01217.15
8.0.70.0040.00417.20
8.0.60.0040.00417.20
8.0.50.0030.00517.11
8.0.30.0100.01017.17
8.0.20.0110.00917.40
8.0.10.0070.00017.23
8.0.00.0090.01016.87
7.4.330.0000.00515.08
7.4.320.0040.00416.66
7.4.300.0060.00016.66
7.4.290.0050.00316.82
7.4.280.0000.00716.74
7.4.270.0050.00316.66
7.4.260.0040.00416.73
7.4.250.0040.00416.81
7.4.240.0030.00516.80
7.4.230.0070.00016.95
7.4.220.0110.00716.79
7.4.210.0100.00516.80
7.4.200.0040.00416.78
7.4.190.0000.00716.98
7.4.160.0110.00516.77
7.4.150.0030.01417.40
7.4.140.0080.01117.86
7.4.130.0080.01016.67
7.4.120.0120.00616.81
7.4.110.0120.01016.76
7.4.100.0070.01116.80
7.4.90.0120.01216.73
7.4.80.0120.00619.39
7.4.70.0060.01316.82
7.4.60.0080.00916.61
7.4.50.0060.00316.75
7.4.40.0040.01522.77
7.4.30.0090.00916.75
7.4.10.0130.00714.94
7.4.00.0070.01015.23
7.3.330.0000.00513.59
7.3.320.0050.00013.58
7.3.310.0040.00416.61
7.3.300.0030.00316.60
7.3.290.0120.00916.54
7.3.280.0080.00816.51
7.3.270.0130.00817.40
7.3.260.0110.01216.68
7.3.250.0150.00516.55
7.3.240.0090.00916.66
7.3.230.0090.01516.59
7.3.210.0070.01716.87
7.3.200.0110.00719.39
7.3.190.0070.01016.55
7.3.180.0030.01316.79
7.3.170.0150.00616.79
7.3.160.0060.01116.79
7.3.130.0090.00914.98
7.3.120.0050.01215.16
7.3.110.0040.01215.05
7.3.100.0030.00915.15
7.3.90.0040.00815.16
7.3.80.0090.00615.10
7.3.70.0090.00614.96
7.3.60.0110.00415.05
7.3.50.0090.00615.08
7.3.40.0110.00714.91
7.3.30.0100.00715.05
7.3.20.0070.00716.98
7.3.10.0070.00716.80
7.3.00.0100.00316.98
7.2.330.0070.01016.98
7.2.320.0100.00716.92
7.2.310.0030.01516.68
7.2.300.0090.00816.80
7.2.290.0040.01316.89
7.2.260.0060.01315.33
7.2.250.0000.02015.50
7.2.240.0000.01715.44
7.2.230.0100.00315.37
7.2.220.0070.00715.16
7.2.210.0000.01315.11
7.2.200.0000.01615.31
7.2.190.0030.01215.10
7.2.180.0070.01015.33
7.2.170.0030.00815.35
7.2.160.0150.00415.17
7.2.150.0060.00917.23
7.2.140.0060.00917.13
7.2.130.0090.00917.05
7.2.120.0000.01417.11
7.2.110.0030.00817.10
7.2.100.0030.01017.21
7.2.90.0070.00717.18
7.2.80.0060.01117.24
7.2.70.0070.00717.23
7.2.60.0070.00717.07
7.2.50.0100.00717.25
7.2.40.0040.01417.07
7.2.30.0130.00317.13
7.2.20.0070.00716.85
7.2.10.0080.00817.16
7.2.00.0060.01017.03
7.1.330.0070.00716.28
7.1.320.0030.01016.09
7.1.310.0100.00015.91
7.1.300.0060.00916.00
7.1.290.0030.01415.89
7.1.280.0040.01115.68
7.1.270.0040.00816.02
7.1.260.0060.00616.10
7.1.250.0000.01815.80
7.1.240.0060.00316.10
7.1.230.0000.01315.83
7.1.220.0000.01216.03
7.1.210.0030.00715.89
7.1.200.0030.00915.94
7.1.190.0100.00016.09
7.1.180.0090.00315.88
7.1.170.0070.00716.13
7.1.160.0050.00516.12
7.1.150.0060.00915.95
7.1.140.0070.00715.93
7.1.130.0070.00716.09
7.1.120.0060.00615.90
7.1.110.0110.00715.87
7.1.100.0040.01215.66
7.1.90.0060.01216.04
7.1.80.0060.00615.86
7.1.70.0110.00416.83
7.1.60.0060.01017.90
7.1.50.0080.01116.57
7.1.40.0070.00715.70
7.1.30.0070.00716.05
7.1.20.0100.00716.09
7.1.10.0090.01216.12
7.1.00.0010.04419.15
7.0.330.0070.01015.40
7.0.320.0060.00615.63
7.0.310.0030.01015.61
7.0.300.0060.00915.54
7.0.290.0070.00715.57
7.0.280.0060.00715.58
7.0.270.0070.00715.65
7.0.260.0090.00615.64
7.0.250.0030.01115.58
7.0.240.0070.00715.41
7.0.230.0000.01415.52
7.0.220.0000.01115.63
7.0.210.0040.01115.39
7.0.200.0080.00416.09
7.0.190.0070.00715.59
7.0.180.0110.00315.62
7.0.170.0000.01315.54
7.0.160.0000.02115.66
7.0.150.0060.00615.46
7.0.140.0030.04318.82
7.0.130.0030.01015.60
7.0.120.0090.00315.41
7.0.110.0030.00615.73
7.0.100.0130.00015.57
7.0.90.0070.00715.67
7.0.80.0030.01315.53
7.0.70.0070.00715.64
7.0.60.0100.04217.78
7.0.50.0090.04016.84
7.0.40.0110.04516.89
7.0.30.0210.04417.00
7.0.20.0150.04517.01
7.0.10.0120.02316.91
7.0.00.0070.02316.83
5.6.400.0030.01014.59
5.6.390.0030.00914.43
5.6.380.0090.00614.31
5.6.370.0030.00714.49
5.6.360.0030.00914.00
5.6.350.0000.01614.41
5.6.340.0030.00614.43
5.6.330.0000.01314.47
5.6.320.0030.01014.34
5.6.310.0040.01414.14
5.6.300.0030.01014.54
5.6.290.0000.01414.57
5.6.280.0060.04017.66
5.6.270.0060.00914.44
5.6.260.0000.01014.64
5.6.250.0090.00614.39
5.6.240.0030.01014.45
5.6.230.0000.01514.50
5.6.220.0100.01014.59
5.6.210.0110.02217.43
5.6.200.0050.04816.33
5.6.190.0050.03817.50
5.6.180.0110.03017.49
5.6.170.0250.04017.43
5.6.160.0080.02017.49
5.6.150.0050.03716.45
5.6.140.0050.02516.39
5.6.130.0080.02016.21
5.6.120.0050.04917.89
5.6.110.0110.04117.75
5.6.100.0070.04017.78
5.6.90.0070.04717.67
5.6.80.0070.02517.38
5.6.70.1450.02017.47
5.6.60.0130.00314.35
5.6.50.0150.00014.32
5.6.40.0030.01414.27
5.6.30.0080.00814.23
5.6.20.0070.00714.38
5.6.10.0040.00414.44
5.6.00.0030.01014.44
5.5.380.0000.01014.42
5.5.370.0070.00714.40
5.5.360.0060.01214.61
5.5.350.0000.03417.32
5.5.340.0110.04016.21
5.5.330.0080.02517.38
5.5.320.0130.02317.37
5.5.310.0150.02417.26
5.5.300.0030.04216.16
5.5.290.0100.02716.11
5.5.280.0020.03017.80
5.5.270.0060.02817.67
5.5.260.0080.02317.65
5.5.250.0070.04217.59
5.5.240.0070.02117.30
5.5.230.0080.00514.09
5.5.220.0070.00714.43
5.5.210.0090.00914.26
5.5.200.0100.00514.60
5.5.190.0070.00714.56
5.5.180.0060.01014.39
5.5.170.0090.00614.40
5.5.160.0030.01014.50
5.5.150.0040.00814.31
5.5.140.0080.01314.38
5.5.130.0110.00614.43
5.5.120.0110.00414.35
5.5.110.0060.00614.15
5.5.100.0070.00814.35
5.5.90.0040.01214.41
5.5.80.0050.01014.34
5.5.70.0030.00714.05
5.5.60.0060.00614.32
5.5.50.0090.00614.40
5.5.40.0090.00614.05
5.5.30.0040.00814.41
5.5.20.0040.01214.41
5.5.10.0070.00414.21
5.5.00.0110.00314.37
5.4.450.0300.03215.33
5.4.440.0270.03015.40
5.4.430.0310.02815.35
5.4.420.0330.02515.31
5.4.410.0120.02615.51
5.4.400.0430.00315.08
5.4.390.0440.00014.96
5.4.380.0120.03414.83
5.4.370.0200.02814.94
5.4.360.0150.02815.13
5.4.350.0150.03415.04
5.4.340.0150.02914.81
5.4.330.0000.01011.02
5.4.320.0080.02011.93
5.4.310.0060.02311.98
5.4.300.0050.03011.75
5.4.290.0080.02311.77
5.4.280.0040.02611.91
5.4.270.0030.02411.90
5.4.260.0040.03115.07
5.4.250.0020.03515.06
5.4.240.0110.03614.98
5.4.230.0090.02715.11
5.4.220.0030.03615.07
5.4.210.0020.03515.10
5.4.200.0140.02615.02
5.4.190.0120.02514.80
5.4.180.0050.03315.15
5.4.170.0050.04214.99
5.4.160.0140.02314.90
5.4.150.0070.04014.87
5.4.140.0030.03213.92
5.4.130.0060.02613.94
5.4.120.0080.02713.68
5.4.110.0050.03813.89
5.4.100.0030.03213.99
5.4.90.0020.03213.88
5.4.80.0090.02613.82
5.4.70.0100.03514.04
5.4.60.0070.02713.73
5.4.50.0100.02613.70
5.4.40.0070.02714.04
5.4.30.0090.02513.99
5.4.20.0050.02713.71
5.4.10.0120.03513.75
5.4.00.0130.03013.44
5.3.290.0040.02711.83
5.3.280.0070.03712.65
5.3.270.0090.02712.74
5.3.260.0110.04012.55
5.3.250.0020.03312.63
5.3.240.0060.03012.72
5.3.230.0060.03012.69
5.3.220.0120.02212.67
5.3.210.0030.03012.59
5.3.200.0150.03212.67
5.3.190.0100.02612.71
5.3.180.0090.03112.79
5.3.170.0040.03712.58
5.3.160.0130.02012.55
5.3.150.0020.03512.81
5.3.140.0050.03712.79
5.3.130.0080.02712.66
5.3.120.0080.03112.69
5.3.110.0070.02712.64
5.3.100.0050.03112.47
5.3.90.0030.03612.48
5.3.80.0080.02812.40
5.3.70.0030.03212.36
5.3.60.0100.02612.26
5.3.50.0050.02912.27
5.3.40.0040.02812.27
5.3.30.0060.02412.38
5.3.20.0050.03612.13
5.3.10.0050.03012.11
5.3.00.0030.02911.98
5.2.170.0030.04311.00
5.2.160.0030.04311.16
5.2.150.0100.03711.24
5.2.140.0070.04010.99
5.2.130.0000.06311.08
5.2.120.0070.04311.30
5.2.110.0030.04711.11
5.2.100.0070.04011.29
5.2.90.0100.04011.09
5.2.80.0070.06311.18
5.2.70.0130.03311.28
5.2.60.0030.05011.16
5.2.50.0000.05711.02
5.2.40.0000.05711.11
5.2.30.0030.04311.16
5.2.20.0130.04311.17
5.2.10.0100.05010.87
5.2.00.0100.05310.96
5.1.60.0030.03710.07
5.1.50.0030.0509.94
5.1.40.0070.03310.00
5.1.30.0070.04310.44
5.1.20.0100.04010.46
5.1.10.0030.04010.01
5.1.00.0030.05310.13
5.0.50.0100.0378.54
5.0.40.0000.0438.63
5.0.30.0000.0638.36
5.0.20.0000.0438.14
5.0.10.0000.0478.35
5.0.00.0000.0478.42
4.4.90.0070.0206.14
4.4.80.0070.0206.14
4.4.70.0100.0236.14
4.4.60.0030.0236.14
4.4.50.0030.0306.14
4.4.40.0070.0376.14
4.4.30.0100.0236.14
4.4.20.0070.0276.14
4.4.10.0030.0306.14
4.4.00.0030.0336.14
4.3.110.0000.0236.14
4.3.100.0030.0206.14
4.3.90.0030.0306.14
4.3.80.0070.0336.14
4.3.70.0030.0306.14
4.3.60.0030.0206.14
4.3.50.0000.0276.14
4.3.40.0030.0436.14
4.3.30.0070.0176.14
4.3.20.0100.0206.14
4.3.10.0030.0306.14
4.3.00.0100.0136.63

preferences:
48.33 ms | 401 KiB | 5 Q