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 $id = 0; function __construct($a1) { $this->id = $a1; } function getHMTL() { $regexatt = '\<table class="ad-attributes">(.*)\<\/table\>'; preg_match($regexatt, $this->id, $matches); $a = $matches[1]; $regexcontent = '/\<div id="UserContent">(.*)\<\/div\>/'; preg_match($regexcontent, $this->id, $matches); $b = $matches[1]; return $a . $b; } } //'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.40.0110.00719.17
8.3.30.0060.01219.21
8.3.20.0040.00420.20
8.3.10.0080.00022.09
8.3.00.0040.00422.46
8.2.170.0100.00322.96
8.2.160.0070.00719.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0110.00726.16
8.2.120.0040.00419.73
8.2.110.0060.00320.52
8.2.100.0060.00617.89
8.2.90.0000.00819.17
8.2.80.0080.00017.97
8.2.70.0080.00017.88
8.2.60.0050.00318.05
8.2.50.0000.00818.07
8.2.40.0000.00820.20
8.2.30.0060.00318.04
8.2.20.0000.00818.05
8.2.10.0040.00418.02
8.2.00.0000.00817.99
8.1.270.0080.00022.36
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0100.00023.81
8.1.230.0090.00320.87
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.63
8.1.180.0040.00418.86
8.1.170.0040.00418.68
8.1.160.0000.00722.10
8.1.150.0050.00218.79
8.1.140.0000.00717.55
8.1.130.0000.00717.80
8.1.120.0050.00217.47
8.1.110.0030.00617.46
8.1.100.0040.00417.47
8.1.90.0040.00417.40
8.1.80.0070.00017.53
8.1.70.0030.00317.46
8.1.60.0030.00617.70
8.1.50.0000.00817.54
8.1.40.0040.00417.68
8.1.30.0000.00817.70
8.1.20.0080.00017.65
8.1.10.0040.00417.76
8.1.00.0000.01017.61
8.0.300.0080.00018.77
8.0.290.0000.00717.30
8.0.280.0000.00818.40
8.0.270.0000.00717.26
8.0.260.0000.00716.95
8.0.250.0030.00317.16
8.0.240.0000.00717.07
8.0.230.0000.00817.08
8.0.220.0000.00717.18
8.0.210.0000.00717.13
8.0.200.0030.00317.09
8.0.190.0000.00717.17
8.0.180.0030.00517.02
8.0.170.0030.00517.12
8.0.160.0000.00817.12
8.0.150.0000.00817.08
8.0.140.0000.00817.13
8.0.130.0000.00613.59
8.0.120.0040.00417.17
8.0.110.0050.00217.12
8.0.100.0040.00417.00
8.0.90.0000.00817.19
8.0.80.0100.00717.07
8.0.70.0040.00417.19
8.0.60.0040.00417.14
8.0.50.0020.00517.11
8.0.30.0090.01117.28
8.0.20.0110.00817.42
8.0.10.0000.00817.19
8.0.00.0110.01017.08
7.4.330.0050.00015.00
7.4.320.0000.00616.77
7.4.300.0070.00016.73
7.4.290.0000.00716.80
7.4.280.0000.00716.71
7.4.270.0030.00316.69
7.4.260.0000.00716.70
7.4.250.0040.00416.74
7.4.240.0030.00516.77
7.4.230.0040.00416.85
7.4.220.0060.01816.93
7.4.210.0070.00816.72
7.4.200.0030.00316.53
7.4.190.0030.00316.77
7.4.160.0060.01016.79
7.4.150.0110.00717.40
7.4.140.0150.00817.86
7.4.130.0050.01516.81
7.4.120.0120.00716.78
7.4.110.0070.01016.72
7.4.100.0140.00616.90
7.4.90.0090.00916.96
7.4.80.0060.01019.39
7.4.70.0090.00916.64
7.4.60.0070.01416.67
7.4.50.0030.00616.78
7.4.40.0050.00522.77
7.4.30.0100.00716.67
7.4.00.0050.01015.11
7.3.330.0060.00013.40
7.3.320.0030.00313.43
7.3.310.0000.00716.40
7.3.300.0050.00316.59
7.3.290.0040.01116.61
7.3.280.0070.01016.59
7.3.270.0100.00717.40
7.3.260.0110.00516.65
7.3.250.0080.01116.66
7.3.240.0140.00316.89
7.3.230.0080.01616.55
7.3.210.0060.01116.75
7.3.200.0060.01019.39
7.3.190.0160.00016.60
7.3.180.0090.01216.82
7.3.170.0060.01616.53
7.3.160.0040.01216.60
7.3.120.0030.00714.81
7.3.110.0080.00414.67
7.3.100.0030.00914.92
7.3.90.0040.00815.13
7.3.80.0070.01015.07
7.3.70.0070.00315.17
7.3.60.0060.00915.12
7.3.50.0070.01015.11
7.3.40.0040.00415.09
7.3.30.0090.00014.91
7.3.20.0120.00316.91
7.3.10.0070.00316.93
7.3.00.0070.01017.02
7.2.330.0140.03116.95
7.2.320.0080.00816.64
7.2.310.0150.00317.00
7.2.300.0070.01416.90
7.2.290.0190.00016.76
7.2.250.0100.00715.21
7.2.240.0040.01415.31
7.2.230.0070.00715.47
7.2.220.0060.00615.32
7.2.210.0030.01215.51
7.2.200.0090.00615.09
7.2.190.0000.00915.29
7.2.180.0030.01415.28
7.2.170.0070.00715.08
7.2.160.0000.01415.36
7.2.150.0070.00316.89
7.2.140.0040.01117.21
7.2.130.0080.00817.21
7.2.120.0070.00517.10
7.2.110.0070.00716.92
7.2.100.0050.00816.84
7.2.90.0050.00716.89
7.2.80.0110.00116.95
7.2.70.0070.00817.28
7.2.60.0060.00916.87
7.2.50.0030.00717.01
7.2.40.0050.01117.20
7.2.30.0060.01017.17
7.2.20.0050.00817.00
7.2.10.0020.01217.16
7.2.00.0080.00516.96
7.1.330.0030.01115.91
7.1.320.0030.00716.03
7.1.310.0040.00715.66
7.1.300.0060.01015.77
7.1.290.0070.00716.02
7.1.280.0060.00615.80
7.1.270.0060.00616.07
7.1.260.0030.01215.96
7.1.250.0080.00815.93
7.1.240.0040.01115.63
7.1.230.0000.01316.06
7.1.220.0070.00715.91
7.1.210.0070.00715.93
7.1.200.0030.01116.01
7.1.190.0030.01016.13
7.1.180.0090.00316.09
7.1.170.0070.00715.88
7.1.160.0000.01116.15
7.1.150.0040.01116.00
7.1.140.0060.00915.71
7.1.130.0030.00615.77
7.1.120.0030.00916.09
7.1.110.0090.00016.03
7.1.100.0130.00316.07
7.1.90.0030.01015.95
7.1.80.0070.00316.11
7.1.70.0060.01016.40
7.1.60.0020.01417.91
7.1.50.0050.01516.54
7.1.40.0080.00315.91
7.1.30.0070.00415.87
7.1.20.0040.01216.03
7.1.10.0040.01116.05
7.1.00.0060.04619.27
7.0.320.0040.00715.64
7.0.310.0060.00615.87
7.0.300.0030.01015.64
7.0.290.0000.01215.30
7.0.280.0090.00315.49
7.0.270.0040.00815.68
7.0.260.0040.01115.67
7.0.250.0120.00315.31
7.0.240.0040.01115.66
7.0.230.0040.01015.64
7.0.220.0100.00315.58
7.0.210.0060.00315.56
7.0.200.0070.00316.21
7.0.190.0030.01015.44
7.0.180.0000.01315.75
7.0.170.0100.00315.66
7.0.160.0100.00315.53
7.0.150.0060.00615.34
7.0.140.0100.03318.86
7.0.130.0060.00615.41
7.0.120.0040.01115.75
7.0.110.0080.00415.69
7.0.100.0120.00315.48
7.0.90.0060.00615.49
7.0.80.0090.00315.61
7.0.70.0000.01215.78
7.0.60.0030.02517.66
7.0.50.0070.02316.80
7.0.40.0090.04716.99
7.0.30.0170.02616.86
7.0.20.0150.04116.96
7.0.10.0100.02216.98
7.0.00.0040.02616.79
5.6.380.0070.00714.64
5.6.370.0000.01014.44
5.6.360.0090.00614.41
5.6.350.0060.00614.62
5.6.340.0030.01014.51
5.6.330.0060.00914.71
5.6.320.0040.00414.88
5.6.310.0120.00014.43
5.6.300.0070.00714.54
5.6.290.0040.00714.18
5.6.280.0050.04017.81
5.6.270.0060.00314.51
5.6.260.0130.00014.52
5.6.250.0030.00614.91
5.6.240.0030.01014.36
5.6.230.0030.00614.72
5.6.220.0030.00914.60
5.6.210.0080.04217.73
5.6.200.0090.04316.18
5.6.190.0050.03617.48
5.6.180.1620.02717.58
5.6.170.0240.03117.47
5.6.160.0050.02917.61
5.6.150.0070.04216.48
5.6.140.0090.01816.29
5.6.130.0050.03516.33
5.6.120.0110.03217.79
5.6.110.0090.04017.88
5.6.100.0100.03617.80
5.6.90.0090.04417.81
5.6.80.0030.02717.34
5.6.70.2350.02017.29
5.6.60.0120.00014.34
5.6.50.0000.01214.63
5.6.40.0000.01414.45
5.6.30.0050.00514.65
5.6.20.0030.00914.26
5.6.10.0090.00314.32
5.6.00.0070.00714.52
5.5.380.0000.00711.43
5.5.370.0060.00311.30
5.5.360.0060.00611.50
5.5.350.0000.02615.89
5.5.340.0060.02314.61
5.5.330.0080.02315.77
5.5.320.0170.04015.92
5.5.310.0050.02615.77
5.5.300.0130.03614.61
5.5.290.0050.04614.69
5.5.280.0060.04616.10
5.5.270.0030.03216.20
5.5.260.0020.02516.18
5.5.250.0070.04915.99
5.5.240.0050.02215.76
5.5.230.0000.00811.45
5.5.220.0040.00811.27
5.5.210.0060.00611.34
5.5.200.0030.00611.46
5.5.190.0030.00611.27
5.5.180.0060.00611.39
5.5.170.0030.00914.38
5.5.160.0030.00611.39
5.5.150.0030.00611.29
5.5.140.0000.01111.35
5.5.130.0060.00611.48
5.5.120.0000.00811.27
5.5.110.0040.00411.47
5.5.100.0030.00911.30
5.5.90.0030.00711.32
5.5.80.0090.00311.41
5.5.70.0040.00811.27
5.5.60.0000.00711.34
5.5.50.0000.01211.39
5.5.40.0040.00811.27
5.5.30.0090.00011.42
5.5.20.0000.01111.39
5.5.10.0080.00311.46
5.5.00.0080.00411.29
5.4.450.0270.02815.38
5.4.440.0330.03115.38
5.4.430.0230.02115.37
5.4.420.0460.02715.35
5.4.410.0050.03215.37
5.4.400.0460.00315.05
5.4.390.1090.00014.93
5.4.380.0240.03315.01
5.4.370.0150.02815.01
5.4.360.0180.02514.91
5.4.350.0120.03315.00
5.4.340.0120.03415.02
5.4.330.0050.00311.27
5.4.320.0050.01911.93
5.4.310.0040.02611.89
5.4.300.0040.02311.93
5.4.290.0050.02411.94
5.4.280.0070.01911.84
5.4.270.0050.02111.84
5.4.260.0100.02315.01
5.4.250.0050.02815.23
5.4.240.0070.03915.12
5.4.230.0060.02815.09
5.4.220.0060.04314.94
5.4.210.0090.03415.02
5.4.200.0030.03215.19
5.4.190.0030.03315.01
5.4.180.0080.03115.10
5.4.170.0030.03615.11
5.4.160.0060.03415.10
5.4.150.0080.02815.12
5.4.140.0050.03013.92
5.4.130.0050.02613.84
5.4.120.0050.03813.89
5.4.110.0120.03813.92
5.4.100.0050.02713.96
5.4.90.0110.02213.92
5.4.80.0030.03713.97
5.4.70.0130.02413.94
5.4.60.0050.02813.86
5.4.50.0050.03113.81
5.4.40.0070.03513.88
5.4.30.0050.03213.81
5.4.20.0160.03013.82
5.4.10.0100.02913.92
5.4.00.0130.02813.57
5.3.290.0030.02712.04
5.3.280.0050.04112.94
5.3.270.0120.02513.01
5.3.260.0080.02812.89
5.3.250.0080.03912.93
5.3.240.0050.03012.97
5.3.230.0070.02812.97
5.3.220.0100.03712.99
5.3.210.0130.03312.84
5.3.200.0100.02512.84
5.3.190.0130.02813.01
5.3.180.0080.02813.03
5.3.170.0100.03613.03
5.3.160.0080.02713.00
5.3.150.0080.03212.96
5.3.140.0070.03813.00
5.3.130.0070.04013.03
5.3.120.0060.03212.91
5.3.110.0040.03012.92
5.3.100.0030.02912.61
5.3.90.0020.03612.69
5.3.80.0120.03212.60
5.3.70.0070.03812.57
5.3.60.0030.03812.67
5.3.50.0100.03512.62
5.3.40.0070.02812.57
5.3.30.0070.02612.63
5.3.20.0080.02812.53
5.3.10.0030.04012.46
5.3.00.0030.03112.45
5.2.170.0120.02611.13
5.2.160.0050.03111.21
5.2.150.0090.01811.25
5.2.140.0040.02311.25
5.2.130.0030.02511.23
5.2.120.0060.03011.19
5.2.110.0020.03311.24
5.2.100.0050.02211.22
5.2.90.0080.01811.18
5.2.80.0090.03011.22
5.2.70.0050.02411.17
5.2.60.0060.02311.21
5.2.50.0050.02211.07
5.2.40.0090.02511.12
5.2.30.0080.02311.12
5.2.20.0070.02011.15
5.2.10.0050.02611.18
5.2.00.0110.02511.07
5.1.60.0050.02410.63
5.1.50.0030.01810.62
5.1.40.0060.02510.62
5.1.30.0060.02110.80
5.1.20.0050.02210.93
5.1.10.0070.02110.68
5.1.00.0050.02710.80
5.0.50.0070.0169.89
5.0.40.0050.0199.82
5.0.30.0030.0239.80
5.0.20.0080.0179.83
5.0.10.0010.0189.73
5.0.00.0020.0239.64
4.4.90.0000.0148.76
4.4.80.0030.0118.76
4.4.70.0000.0148.76
4.4.60.0000.0188.76
4.4.50.0000.0178.76
4.4.40.0040.0208.76
4.4.30.0020.0318.76
4.4.20.0040.0158.76
4.4.10.0040.0168.76
4.4.00.0050.0228.76
4.3.110.0050.0158.76
4.3.100.0060.0128.76
4.3.90.0020.0138.76
4.3.80.0040.0178.76
4.3.70.0000.0148.76
4.3.60.0020.0118.76
4.3.50.0030.0178.76
4.3.40.0080.0128.76
4.3.30.0040.0148.76
4.3.20.0020.0128.76
4.3.10.0050.0148.76
4.3.00.0070.0168.95

preferences:
50.65 ms | 400 KiB | 5 Q