3v4l.org

run code in 300+ PHP versions simultaneously
<?php 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_liste = "<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>"; $liste = new AdsListExtractor($html_liste); $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.53
8.3.50.0140.00222.17
8.3.40.0140.00419.13
8.3.30.0070.00719.03
8.3.20.0070.00020.16
8.3.10.0040.00421.95
8.3.00.0000.00822.52
8.2.180.0080.00816.88
8.2.170.0110.00722.96
8.2.160.0070.00721.13
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0050.00317.75
8.2.110.0060.00322.09
8.2.100.0080.00818.03
8.2.90.0080.00019.10
8.2.80.0030.00617.97
8.2.70.0000.00917.88
8.2.60.0030.00618.05
8.2.50.0040.00418.07
8.2.40.0050.00318.16
8.2.30.0000.00718.08
8.2.20.0080.00017.96
8.2.10.0040.00417.86
8.2.00.0000.00818.00
8.1.280.0120.00925.92
8.1.270.0040.00422.39
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0000.00923.80
8.1.230.0110.00019.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0040.00417.53
8.1.180.0040.00418.72
8.1.170.0060.00318.71
8.1.160.0030.00522.05
8.1.150.0080.00018.88
8.1.140.0040.00417.67
8.1.130.0040.00417.77
8.1.120.0040.00417.63
8.1.110.0040.00417.64
8.1.100.0040.00417.61
8.1.90.0040.00417.70
8.1.80.0030.00517.68
8.1.70.0050.00217.49
8.1.60.0030.00617.81
8.1.50.0090.00017.61
8.1.40.0040.00417.59
8.1.30.0000.00817.80
8.1.20.0040.00417.81
8.1.10.0030.00617.71
8.1.00.0060.00317.66
8.0.300.0050.00318.77
8.0.290.0040.00417.30
8.0.280.0000.00718.49
8.0.270.0070.00017.20
8.0.260.0030.00317.02
8.0.250.0050.00317.23
8.0.240.0000.00817.20
8.0.230.0070.00017.23
8.0.220.0050.00317.09
8.0.210.0040.00417.06
8.0.200.0000.00717.23
8.0.190.0000.00817.12
8.0.180.0030.00617.00
8.0.170.0000.00817.16
8.0.160.0040.00417.11
8.0.150.0040.00417.07
8.0.140.0050.00217.09
8.0.130.0100.00013.62
8.0.120.0080.00017.07
8.0.110.0000.00817.14
8.0.100.0040.00417.15
8.0.90.0000.00816.93
8.0.80.0150.00017.01
8.0.70.0040.00417.07
8.0.60.0050.00217.19
8.0.50.0040.00417.12
8.0.30.0090.01317.42
8.0.20.0110.01117.50
8.0.10.0000.00717.09
8.0.00.0110.00816.85
7.4.330.0050.00015.22
7.4.320.0000.00616.75
7.4.300.0020.00516.68
7.4.290.0030.00316.80
7.4.280.0000.00716.83
7.4.270.0030.00316.67
7.4.260.0040.00416.82
7.4.250.0080.00016.65
7.4.240.0030.00416.77
7.4.230.0030.00316.54
7.4.220.0120.00616.92
7.4.210.0080.00816.86
7.4.200.0000.00716.94
7.4.190.0000.00716.82
7.4.160.0110.00716.57
7.4.150.0110.00717.40
7.4.140.0140.00517.86
7.4.130.0100.00716.86
7.4.120.0100.00816.79
7.4.110.0130.00416.82
7.4.100.0170.00316.86
7.4.90.0200.00616.75
7.4.80.0200.00319.39
7.4.70.0090.00916.56
7.4.60.0070.01017.00
7.4.50.0000.00816.64
7.4.40.0070.00822.77
7.4.30.0060.00916.61
7.4.00.0130.00315.13
7.3.330.0030.00313.59
7.3.320.0050.00013.62
7.3.310.0000.00716.70
7.3.300.0030.00316.65
7.3.290.0060.00816.58
7.3.280.0100.00616.56
7.3.270.0030.01317.40
7.3.260.0060.01516.63
7.3.250.0090.00916.73
7.3.240.0100.00716.61
7.3.230.0090.00916.71
7.3.210.0100.01316.48
7.3.200.0110.00719.39
7.3.190.0120.00616.52
7.3.180.0110.00616.52
7.3.170.0100.00716.72
7.3.160.0060.01116.60
7.3.120.0100.00714.84
7.2.330.0100.01616.97
7.2.320.0120.01216.91
7.2.310.0070.01016.83
7.2.300.0070.01117.01
7.2.290.0100.01316.88
7.2.60.0000.01417.16
7.2.00.0060.00919.34
7.1.200.0030.00615.90
7.1.100.0070.01018.43
7.1.70.0040.00417.37
7.1.60.0130.01019.82
7.1.50.0180.00716.92
7.1.00.0030.09322.53
7.0.200.0050.00517.07
7.0.140.0200.06022.08
7.0.110.0130.08019.95
7.0.100.0170.07320.03
7.0.90.0030.08019.94
7.0.80.0070.08320.06
7.0.70.0070.08319.97
7.0.60.0070.08319.90
7.0.50.0100.07720.10
7.0.40.0070.09019.86
7.0.30.0170.07019.71
7.0.20.0130.07319.70
7.0.10.0100.07719.73
7.0.00.0070.08319.87
5.6.280.0070.06721.12
5.6.260.0000.08320.61
5.6.250.0070.08720.66
5.6.240.0100.08020.57
5.6.230.0130.07720.70
5.6.220.0100.08020.55
5.6.210.0100.07720.60
5.6.200.0070.08020.72
5.6.190.0130.06320.60
5.6.180.0200.06020.57
5.6.170.0100.08020.60
5.6.160.0130.08020.66
5.6.150.0000.08720.64
5.6.140.0100.07320.66
5.6.130.0100.05320.71
5.6.120.0130.07320.86
5.6.110.0030.06320.64
5.6.100.0070.08720.68
5.6.90.0170.04320.65
5.6.80.0130.06320.02
5.6.70.0070.08020.00
5.6.60.0000.08020.08
5.6.50.0000.05320.25
5.6.40.0130.06720.23
5.6.30.0070.08319.93
5.6.20.0000.07320.08
5.6.10.0070.06319.92
5.6.00.0130.07320.05
5.5.380.0200.05717.54
5.5.370.0070.08017.70
5.5.360.0070.04717.69
5.5.350.0100.07717.63
5.5.340.0170.07318.07
5.5.330.0200.07317.89
5.5.320.0100.07718.22
5.5.310.0030.08018.23
5.5.300.0070.07718.10
5.5.290.0070.08018.23
5.5.280.0130.07018.23
5.5.270.0070.04318.12
5.5.260.0070.06017.92
5.5.250.0130.07717.64
5.5.240.0000.06717.20
5.5.230.0070.06017.30
5.5.220.0170.06317.47
5.5.210.0100.07317.48
5.5.200.0030.07717.28
5.5.190.0130.07317.26
5.5.180.0130.07017.48
5.5.160.0130.05717.55
5.5.150.0130.07017.26
5.5.140.0070.06017.45
5.5.130.0200.06017.44
5.5.120.0070.05317.28
5.5.110.0100.06017.27
5.5.100.0100.05717.34
5.5.90.0030.05317.16
5.5.80.0000.05717.37
5.5.70.0000.08317.34
5.5.60.0030.06717.36
5.5.50.0070.06717.34
5.5.40.0070.04717.15
5.5.30.0000.04717.29
5.5.20.0200.06317.15
5.5.10.0030.08017.49
5.5.00.0130.05017.08
5.4.450.0070.08319.33
5.4.440.0070.07319.41
5.4.430.0030.05019.50
5.4.420.0100.03719.50
5.4.410.0130.05719.23
5.4.400.0030.04319.34
5.4.390.0030.04719.34
5.4.380.0070.05018.98
5.4.370.0070.07019.14
5.4.360.0170.07319.32
5.4.350.0100.08019.01
5.4.340.0030.08019.14
5.4.320.0130.06719.17
5.4.310.0030.06319.14
5.4.300.0100.04019.09
5.4.290.0070.07719.31
5.4.280.0130.06019.33
5.4.270.0100.07019.09
5.4.260.0070.07019.08
5.4.250.0030.06319.00
5.4.240.0070.06719.18
5.4.230.0130.06719.13
5.4.220.0130.05018.99
5.4.210.0070.07019.11
5.4.200.0170.06019.17
5.4.190.0070.06319.23
5.4.180.0000.06719.30
5.4.170.0030.07719.08
5.4.160.0130.06319.01
5.4.150.0070.05318.97
5.4.140.0030.05316.39
5.4.130.0030.07716.50
5.4.120.0070.03716.57
5.4.110.0030.04016.56
5.4.100.0130.03316.36
5.4.90.0070.06016.71
5.4.80.0070.04016.63
5.4.70.0030.07716.59
5.4.60.0070.06716.39
5.4.50.0130.06316.44
5.4.40.0100.06716.59
5.4.30.0030.08016.62
5.4.20.0100.06716.53
5.4.10.0100.06716.41
5.4.00.0200.06315.91
5.3.290.0100.07314.81
5.3.280.0070.07714.62
5.3.270.0030.06314.47
5.3.260.0030.08014.59
5.3.250.0000.07014.57
5.3.240.0170.05714.65
5.3.230.0030.08314.74
5.3.220.0070.04714.54
5.3.210.0030.04714.57
5.3.200.0030.04014.71
5.3.190.0030.05714.57
5.3.180.0170.06714.58
5.3.170.0030.04014.70
5.3.160.0100.06314.67
5.3.150.0170.06014.58
5.3.140.0100.06714.53
5.3.130.0170.06714.69
5.3.120.0130.04314.57
5.3.110.0070.06714.64
5.3.100.0030.07314.29
5.3.90.0070.06314.03
5.3.80.0030.08014.01
5.3.70.0000.08014.04
5.3.60.0070.07314.24
5.3.50.0070.07713.98
5.3.40.0070.07714.05
5.3.30.0100.07313.93
5.3.20.0070.05013.67
5.3.10.0030.07013.63
5.3.00.0100.07013.79
5.2.170.0100.06011.22
5.2.160.0070.06311.01
5.2.150.0070.06311.23
5.2.140.0070.06011.29
5.2.130.0030.06310.96
5.2.120.0100.05711.12
5.2.110.0100.05311.25
5.2.100.0030.05310.97
5.2.90.0070.05711.34
5.2.80.0030.06711.09
5.2.70.0070.06311.17
5.2.60.0100.05311.05
5.2.50.0070.03311.17
5.2.40.0000.04711.02
5.2.30.0100.05010.96
5.2.20.0000.06310.98
5.2.10.0130.05311.02
5.2.00.0030.06310.86
5.1.60.0070.04710.19
5.1.50.0070.05010.19
5.1.40.0070.05010.19
5.1.30.0070.05010.43
5.1.20.0070.04710.45
5.1.10.0070.04010.26
5.1.00.0100.04710.19
5.0.50.0000.05010.19
5.0.40.0030.04310.19
5.0.30.0100.06010.19
5.0.20.0030.04310.19
5.0.10.0000.05010.19
5.0.00.0030.06010.19
4.4.90.0000.03710.19
4.4.80.0030.02010.19
4.4.70.0030.03310.19
4.4.60.0070.03010.19
4.4.50.0030.03010.19
4.4.40.0000.05010.19
4.4.30.0030.03310.19
4.4.20.0030.03710.19
4.4.10.0030.03310.19
4.4.00.0000.05010.19
4.3.110.0000.03710.19
4.3.100.0070.02710.19
4.3.90.0030.03310.19
4.3.80.0000.05310.19
4.3.70.0030.03310.19
4.3.60.0100.02710.19
4.3.50.0000.03310.19
4.3.40.0000.05010.19
4.3.30.0000.02710.19
4.3.20.0000.03310.19
4.3.10.0000.03710.19
4.3.00.0000.02310.19

preferences:
41.14 ms | 401 KiB | 5 Q