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 $url = 0; private $html = ''; function __construct($a1) { $this->url = $a1; } function getHMTL() { $regexatt = '/\<table class="ad-attributes">(.*)\<\/table\>/'; preg_match($regexatt, $this->url, $matches); $a = $matches[1]; $regexcontent = '/\<div id="UserContent">(.*)\<\/div\>/'; preg_match($regexcontent, $this->url, $matches); $b = $matches[1]; return $a[0] . $b[0]; } } //'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); $ad_info = new AdInfoExtractor($liste->getURLs()[1]); 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.0090.00618.55
8.3.50.0070.01322.05
8.3.40.0070.01119.10
8.3.30.0120.00319.06
8.3.20.0080.00020.30
8.3.10.0000.00821.98
8.3.00.0050.00222.39
8.2.180.0140.00316.75
8.2.170.0040.01122.96
8.2.160.0070.00719.21
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0120.00626.16
8.2.120.0080.00019.61
8.2.110.0050.00522.37
8.2.100.0000.01218.16
8.2.90.0030.00619.20
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0040.00717.93
8.2.50.0040.00418.10
8.2.40.0060.00318.16
8.2.30.0000.00718.07
8.2.20.0000.00817.96
8.2.10.0070.00018.06
8.2.00.0040.00417.88
8.1.280.0150.00625.92
8.1.270.0040.00422.33
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00823.97
8.1.230.0070.01019.16
8.1.220.0050.00317.91
8.1.210.0080.00018.77
8.1.200.0040.00417.60
8.1.190.0030.00517.61
8.1.180.0080.00018.10
8.1.170.0050.00318.89
8.1.160.0040.00422.11
8.1.150.0050.00318.73
8.1.140.0040.00417.54
8.1.130.0000.00717.62
8.1.120.0070.00017.58
8.1.110.0050.00317.59
8.1.100.0040.00417.71
8.1.90.0080.00017.54
8.1.80.0030.00417.69
8.1.70.0000.00817.52
8.1.60.0060.00317.68
8.1.50.0040.00417.67
8.1.40.0030.00617.72
8.1.30.0030.00517.77
8.1.20.0040.00417.77
8.1.10.0050.00317.78
8.1.00.0040.00417.59
8.0.300.0030.00518.84
8.0.290.0000.00816.86
8.0.280.0040.00418.42
8.0.270.0040.00417.26
8.0.260.0030.00316.98
8.0.250.0030.00317.21
8.0.240.0070.00017.21
8.0.230.0040.00417.22
8.0.220.0000.00717.02
8.0.210.0000.00817.05
8.0.200.0060.00017.17
8.0.190.0000.00717.23
8.0.180.0040.00317.20
8.0.170.0040.00417.15
8.0.160.0050.00317.07
8.0.150.0070.00017.06
8.0.140.0050.00217.16
8.0.130.0000.00613.53
8.0.120.0060.00317.14
8.0.110.0000.00817.15
8.0.100.0000.00817.13
8.0.90.0060.00317.14
8.0.80.0030.01317.17
8.0.70.0040.00417.19
8.0.60.0000.00717.00
8.0.50.0030.00517.13
8.0.30.0130.00717.39
8.0.20.0120.00817.40
8.0.10.0040.00417.05
8.0.00.0110.01017.04
7.4.330.0000.00515.09
7.4.320.0060.00016.78
7.4.300.0000.00716.83
7.4.290.0000.00816.79
7.4.280.0070.00016.75
7.4.270.0030.00616.67
7.4.260.0030.00316.83
7.4.250.0040.00416.82
7.4.240.0000.00716.83
7.4.230.0000.00716.92
7.4.220.0110.00716.96
7.4.210.0110.00616.80
7.4.200.0000.00716.56
7.4.190.0070.00016.99
7.4.160.0100.00716.91
7.4.150.0070.01117.40
7.4.140.0090.00917.86
7.4.130.0140.00916.78
7.4.120.0060.01116.82
7.4.110.0100.00716.62
7.4.100.0030.01616.92
7.4.90.0100.00916.97
7.4.80.0130.01319.39
7.4.70.0130.01216.74
7.4.60.0100.00717.01
7.4.50.0030.00316.72
7.4.40.0000.01622.77
7.4.30.0030.01416.70
7.4.00.0060.01015.15
7.3.330.0000.00513.55
7.3.320.0000.00513.36
7.3.310.0030.00316.46
7.3.300.0030.00316.63
7.3.290.0070.00716.59
7.3.280.0110.00716.63
7.3.270.0080.00817.40
7.3.260.0130.00616.60
7.3.250.0120.00616.78
7.3.240.0100.01316.90
7.3.230.0050.01816.54
7.3.210.0100.00716.61
7.3.200.0190.00319.39
7.3.190.0120.01316.71
7.3.180.0080.00916.86
7.3.170.0130.00316.61
7.3.160.0090.00916.58
7.3.120.0100.00715.00
7.3.10.0090.00816.82
7.3.00.0040.00916.76
7.2.330.0130.01016.85
7.2.320.0130.00316.95
7.2.310.0030.01516.85
7.2.300.0100.00716.87
7.2.290.0060.01016.88
7.2.130.0070.00716.94
7.2.120.0090.00816.87
7.2.110.0050.01216.89
7.2.100.0090.00917.03
7.2.90.0100.00516.87
7.2.80.0040.01116.91
7.2.70.0050.01016.74
7.2.60.0090.00817.11
7.2.50.0080.00516.90
7.2.40.0100.00716.96
7.2.30.0030.01416.95
7.2.20.0090.00817.18
7.2.10.0110.00817.09
7.2.00.0050.01217.25
7.1.250.0090.00615.76
7.1.240.0080.00416.00
7.1.230.0050.00516.07
7.1.220.0120.00615.76
7.1.210.0120.00915.93
7.1.200.0140.00416.13
7.1.190.0070.00815.84
7.1.180.0040.01115.98
7.1.170.0180.00015.67
7.1.160.0050.00915.86
7.1.150.0060.00716.11
7.1.140.0170.00715.84
7.1.130.0180.00616.00
7.1.120.0200.00715.93
7.1.110.0150.00615.71
7.1.100.0160.00615.93
7.1.90.0070.01415.86
7.1.80.0180.00915.98
7.1.70.0070.00916.75
7.1.60.0040.01317.89
7.1.50.0070.01516.62
7.1.40.0080.01116.22
7.1.30.0200.00915.92
7.1.20.0080.01115.82
7.1.10.0170.00315.93
7.1.00.0030.04519.28
7.0.330.0080.01115.55
7.0.320.0130.00515.63
7.0.310.0100.00015.62
7.0.300.0000.01315.41
7.0.290.0120.00015.50
7.0.280.0120.00615.27
7.0.270.0060.01215.33
7.0.260.0040.01115.66
7.0.250.0160.00015.61
7.0.240.0090.00615.40
7.0.230.0060.00915.50
7.0.220.0120.00915.32
7.0.210.0120.00415.60
7.0.200.0070.00516.05
7.0.190.0070.01415.37
7.0.180.0100.01015.64
7.0.170.0030.01315.53
7.0.160.0140.00615.59
7.0.150.0070.01115.36
7.0.140.0070.04018.81
7.0.130.0100.00715.50
7.0.120.0060.01115.47
7.0.110.0070.01115.58
7.0.100.0100.00615.65
7.0.90.0030.01015.53
7.0.80.0050.00915.49
7.0.70.0090.00615.38
7.0.60.0020.03717.83
7.0.50.0050.04516.74
7.0.40.0120.03516.92
7.0.30.0210.04016.97
7.0.20.0210.02116.85
7.0.10.0080.02916.74
7.0.00.0060.03216.87
5.6.380.0090.01214.44
5.6.370.0100.00414.36
5.6.360.0000.01514.14
5.6.350.0090.00614.38
5.6.340.0050.00814.15
5.6.330.0000.01514.57
5.6.320.0090.00614.39
5.6.310.0030.00914.08
5.6.300.0030.01214.50
5.6.290.0100.00514.45
5.6.280.0030.04017.83
5.6.270.0070.00314.40
5.6.260.0030.01214.28
5.6.250.0060.01214.40
5.6.240.0090.00614.25
5.6.230.0070.01014.57
5.6.220.0060.00914.32
5.6.210.0140.03817.46
5.6.200.0090.02016.39
5.6.190.0050.04417.28
5.6.180.1950.02317.56
5.6.170.0170.04217.30
5.6.160.0030.02817.36
5.6.150.0090.02716.39
5.6.140.0080.04516.15
5.6.130.0030.02516.25
5.6.120.0080.03717.59
5.6.110.0080.04117.88
5.6.100.0060.04317.80
5.6.90.0110.02217.73
5.6.80.0090.02017.33
5.6.70.1850.02317.53
5.6.60.0100.00314.20
5.6.50.0080.00814.27
5.6.40.0040.01214.68
5.6.30.0000.01414.43
5.6.20.0060.00914.68
5.6.10.0030.01014.33
5.6.00.0160.00014.24
5.5.380.0100.00311.31
5.5.370.0030.01011.34
5.5.360.0070.00711.25
5.5.350.0030.02715.66
5.5.340.0050.02814.75
5.5.330.0030.02515.77
5.5.320.0240.03215.74
5.5.310.0120.02415.69
5.5.300.0050.03014.69
5.5.290.0070.04214.68
5.5.280.0100.04015.92
5.5.270.0100.02515.92
5.5.260.0080.02016.06
5.5.250.0060.03815.96
5.5.240.0080.04215.77
5.5.230.0070.00411.38
5.5.220.0080.00411.34
5.5.210.0030.00511.06
5.5.200.0040.00811.40
5.5.190.0100.00011.14
5.5.180.0040.00811.21
5.5.170.0070.00411.00
5.5.160.0040.00711.30
5.5.150.0050.01011.16
5.5.140.0050.00311.05
5.5.130.0050.00511.50
5.5.120.0060.00611.43
5.5.110.0030.00711.38
5.5.100.0030.01011.21
5.5.90.0060.00610.95
5.5.80.0000.01211.06
5.5.70.0060.00611.39
5.5.60.0030.00610.83
5.5.50.0060.00311.19
5.5.40.0030.00711.18
5.5.30.0050.00811.29
5.5.20.0090.00311.20
5.5.10.0070.00711.00
5.5.00.0060.00611.16
5.4.450.0280.03315.47
5.4.440.0300.03815.37
5.4.430.0330.03015.11
5.4.420.0400.03215.15
5.4.410.0230.03215.19
5.4.400.0430.00415.04
5.4.390.0400.00615.05
5.4.380.0170.03015.06
5.4.370.0210.02314.87
5.4.360.0160.03114.98
5.4.350.0180.03214.87
5.4.340.0290.02715.03
5.4.330.0030.00611.20
5.4.320.0050.02211.92
5.4.310.0080.02511.74
5.4.300.0060.02211.89
5.4.290.0060.02511.81
5.4.280.0040.02211.71
5.4.270.0050.02011.84
5.4.260.0080.03315.16
5.4.250.0070.03114.90
5.4.240.0080.04115.17
5.4.230.0070.02614.85
5.4.220.0030.03214.99
5.4.210.0040.03415.03
5.4.200.0080.02814.73
5.4.190.0080.02514.77
5.4.180.0040.03214.91
5.4.170.0090.02515.09
5.4.160.0080.02715.09
5.4.150.0090.02714.99
5.4.140.0060.03113.86
5.4.130.0030.04113.81
5.4.120.0040.03013.71
5.4.110.0030.03313.85
5.4.100.0030.02813.76
5.4.90.0150.01814.02
5.4.80.0050.02813.82
5.4.70.0120.03713.69
5.4.60.0140.02013.79
5.4.50.0070.03813.73
5.4.40.0040.02913.84
5.4.30.0030.02913.91
5.4.20.0070.03513.75
5.4.10.0080.02813.78
5.4.00.0070.02713.54
5.3.290.0070.02511.53
5.3.280.0080.02712.41
5.3.270.0050.03012.46
5.3.260.0090.02712.39
5.3.250.0080.02812.50
5.3.240.0050.02812.35
5.3.230.0000.03512.46
5.3.220.0050.03612.40
5.3.210.0060.04012.38
5.3.200.0100.03012.51
5.3.190.0030.03712.36
5.3.180.0080.02512.40
5.3.170.0030.04012.56
5.3.160.0120.02912.40
5.3.150.0080.02512.57
5.3.140.0030.02712.49
5.3.130.0070.02712.34
5.3.120.0030.03112.31
5.3.110.0020.03212.53
5.3.100.0080.02512.30
5.3.90.0060.02612.27
5.3.80.0050.02712.27
5.3.70.0050.03912.22
5.3.60.0030.03012.12
5.3.50.0050.02812.22
5.3.40.0050.03712.15
5.3.30.0020.03912.09
5.3.20.0050.02711.91
5.3.10.0050.02811.96
5.3.00.0010.03111.83
5.2.170.0050.03310.27
5.2.160.0050.02310.29
5.2.150.0080.01910.17
5.2.140.0020.02310.17
5.2.130.0050.02210.26
5.2.120.0030.03110.24
5.2.110.0020.02410.19
5.2.100.0020.02510.26
5.2.90.0030.02310.29
5.2.80.0040.02210.15
5.2.70.0050.02610.29
5.2.60.0080.02710.07
5.2.50.0060.02310.22
5.2.40.0060.02010.19
5.2.30.0050.02210.16
5.2.20.0050.01910.08
5.2.10.0050.0229.83
5.2.00.0050.0229.73
5.1.60.0030.0179.18
5.1.50.0050.0219.32
5.1.40.0060.0209.28
5.1.30.0090.0249.44
5.1.20.0050.0209.43
5.1.10.0040.0239.30
5.1.00.0080.0259.16
5.0.50.0020.0218.45
5.0.40.0050.0168.48
5.0.30.0020.0228.30
5.0.20.0050.0148.34
5.0.10.0050.0158.25
5.0.00.0030.0258.33
4.4.90.0040.0107.31
4.4.80.0030.0137.31
4.4.70.0020.0137.31
4.4.60.0050.0157.31
4.4.50.0020.0137.31
4.4.40.0020.0187.31
4.4.30.0000.0187.31
4.4.20.0020.0187.31
4.4.10.0020.0187.31
4.4.00.0030.0227.31
4.3.110.0030.0107.31
4.3.100.0000.0137.31
4.3.90.0000.0127.31
4.3.80.0000.0227.31
4.3.70.0050.0137.31
4.3.60.0000.0187.31
4.3.50.0020.0127.31
4.3.40.0020.0187.31
4.3.30.0050.0127.31
4.3.20.0000.0157.31
4.3.10.0010.0147.31
4.3.00.0090.0127.58

preferences:
54.45 ms | 401 KiB | 5 Q