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]; // 1234 //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() { if ($this->id == 0) { echo $this->id; return; } echo $this->id; return; } } //'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.70.0120.00416.75
8.3.60.0100.00716.88
8.3.50.0120.00722.04
8.3.40.0100.01319.16
8.3.30.0070.01018.88
8.3.20.0040.00420.16
8.3.10.0090.00023.61
8.3.00.0050.00319.69
8.2.190.0120.00618.92
8.2.180.0090.00917.00
8.2.170.0070.01022.96
8.2.160.0070.00720.34
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0040.00422.36
8.2.110.0000.00922.20
8.2.100.0000.01118.09
8.2.90.0000.00819.35
8.2.80.0030.00517.97
8.2.70.0000.00917.88
8.2.60.0000.00818.16
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0030.00518.11
8.2.20.0000.00718.08
8.2.10.0000.00919.79
8.2.00.0080.00018.06
8.1.280.0130.00625.92
8.1.270.0000.00823.88
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.83
8.1.230.0110.00019.08
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0060.00317.60
8.1.190.0050.00317.78
8.1.180.0050.00318.10
8.1.170.0080.00018.71
8.1.160.0030.00622.08
8.1.150.0060.00318.72
8.1.140.0040.00417.58
8.1.130.0030.00317.80
8.1.120.0040.00417.50
8.1.110.0040.00417.55
8.1.100.0040.00417.54
8.1.90.0000.00717.58
8.1.80.0000.00717.49
8.1.70.0000.00817.55
8.1.60.0060.00317.79
8.1.50.0040.00417.66
8.1.40.0030.00517.68
8.1.30.0030.00617.76
8.1.20.0090.00017.77
8.1.10.0000.00817.61
8.1.00.0050.00317.69
8.0.300.0050.00318.77
8.0.290.0040.00417.30
8.0.280.0000.00718.38
8.0.270.0070.00017.38
8.0.260.0060.00316.98
8.0.250.0030.00317.19
8.0.240.0030.00517.19
8.0.230.0000.00717.09
8.0.220.0070.00017.05
8.0.210.0030.00517.04
8.0.200.0000.00717.16
8.0.190.0000.00917.18
8.0.180.0040.00417.19
8.0.170.0000.00817.07
8.0.160.0040.00417.13
8.0.150.0050.00316.97
8.0.140.0000.00917.13
8.0.130.0030.00313.59
8.0.120.0080.00017.02
8.0.110.0000.00716.93
8.0.100.0030.00516.88
8.0.90.0000.00817.09
8.0.80.0210.00317.11
8.0.70.0030.00517.14
8.0.60.0060.00317.10
8.0.50.0000.00717.10
8.0.30.0110.00917.24
8.0.20.0080.01117.49
8.0.10.0000.00917.09
8.0.00.0120.00917.05
7.4.330.0000.00515.00
7.4.320.0030.00316.62
7.4.300.0060.00316.77
7.4.290.0040.00416.79
7.4.280.0030.00316.80
7.4.270.0070.00016.88
7.4.260.0000.00716.73
7.4.250.0030.00516.72
7.4.240.0030.00416.81
7.4.230.0070.00016.67
7.4.220.0220.00416.70
7.4.210.0090.00616.92
7.4.200.0000.00816.74
7.4.190.0040.00416.90
7.4.160.0060.01316.75
7.4.150.0040.01317.40
7.4.140.0100.00817.86
7.4.130.0100.00716.87
7.4.120.0040.01316.86
7.4.110.0150.00316.79
7.4.100.0120.00616.93
7.4.90.0090.00916.68
7.4.80.0030.01416.82
7.4.70.0060.00916.97
7.4.60.0120.00616.55
7.4.50.0020.00216.65
7.4.40.0060.01222.77
7.4.30.0060.01016.75
7.4.00.0100.00615.08
7.3.330.0030.00313.45
7.3.320.0060.00013.66
7.3.310.0070.00016.46
7.3.300.0000.00716.62
7.3.290.0100.00716.45
7.3.280.0120.00616.55
7.3.270.0140.00517.40
7.3.260.0140.00416.60
7.3.250.0100.01016.70
7.3.240.0180.00316.61
7.3.230.0000.01616.63
7.3.210.0140.00316.74
7.3.200.0120.00919.39
7.3.190.0070.01116.58
7.3.180.0100.00716.54
7.3.170.0060.01116.55
7.3.160.0040.01916.75
7.3.120.0100.00315.03
7.3.00.0040.01116.66
7.2.330.0140.00316.90
7.2.320.0000.02016.65
7.2.310.0000.01716.75
7.2.300.0100.00716.87
7.2.290.0110.00516.90
7.2.130.0080.00416.69
7.2.120.0100.00716.90
7.2.110.0060.01217.28
7.2.100.0030.01316.93
7.2.90.0130.00016.85
7.2.80.0110.00417.24
7.2.70.0000.01417.02
7.2.60.0060.00516.97
7.2.50.0050.01017.15
7.2.40.0100.00017.20
7.2.30.0090.00616.94
7.2.20.0040.00817.15
7.2.10.0070.00717.25
7.2.00.0040.01116.93
7.1.250.0030.01016.08
7.1.240.0030.00715.83
7.1.230.0090.00315.93
7.1.220.0040.00816.17
7.1.210.0060.00616.03
7.1.200.0030.00915.92
7.1.190.0070.00316.14
7.1.180.0090.00315.65
7.1.170.0060.00315.87
7.1.160.0030.01015.89
7.1.150.0060.00915.92
7.1.140.0030.01316.00
7.1.130.0030.00916.21
7.1.120.0030.01016.03
7.1.110.0040.01116.07
7.1.100.0090.00316.14
7.1.90.0030.01016.11
7.1.80.0070.00716.14
7.1.70.0040.00716.83
7.1.60.0050.01317.65
7.1.50.0070.01216.60
7.1.40.0000.01416.16
7.1.30.0120.00615.91
7.1.20.0100.00615.91
7.1.10.0030.01015.75
7.1.00.0030.04319.18
7.0.330.0000.01415.71
7.0.320.0030.01015.69
7.0.310.0030.00915.69
7.0.300.0080.00515.47
7.0.290.0030.00715.38
7.0.280.0060.00615.66
7.0.270.0110.00015.82
7.0.260.0040.00915.65
7.0.250.0040.00715.63
7.0.240.0000.01515.61
7.0.230.0060.00315.60
7.0.220.0060.00915.55
7.0.210.0000.01015.63
7.0.200.0100.00616.35
7.0.190.0090.00015.32
7.0.180.0150.00015.75
7.0.170.0030.00715.53
7.0.160.0130.00315.80
7.0.150.0080.00615.54
7.0.140.0030.04018.66
7.0.130.0060.00615.74
7.0.120.0030.00915.47
7.0.110.0060.00615.54
7.0.100.0060.00915.75
7.0.90.0000.01315.50
7.0.80.0080.00415.74
7.0.70.0030.01015.52
7.0.60.0070.04817.83
7.0.50.0050.04716.78
7.0.40.0230.02317.02
7.0.30.0210.03716.97
7.0.20.0190.04017.00
7.0.10.0100.04217.04
7.0.00.0050.02516.88
5.6.380.0030.01014.13
5.6.370.0000.01114.13
5.6.360.0040.00814.14
5.6.350.0030.01014.23
5.6.340.0060.00813.97
5.6.330.0040.01113.81
5.6.320.0090.00614.34
5.6.310.0070.00714.26
5.6.300.0070.00713.95
5.6.290.0120.00014.05
5.6.280.0030.04117.44
5.6.270.0140.00014.09
5.6.260.0060.00614.37
5.6.250.0070.00314.05
5.6.240.0060.00614.12
5.6.230.0030.01214.07
5.6.220.0070.00314.01
5.6.210.0080.03217.30
5.6.200.0050.04316.09
5.6.190.0100.04017.32
5.6.180.0180.02717.31
5.6.170.0180.04117.42
5.6.160.0050.02517.19
5.6.150.0050.02316.14
5.6.140.0050.04216.06
5.6.130.0080.04216.11
5.6.120.0070.04617.63
5.6.110.0080.04017.56
5.6.100.0070.04417.69
5.6.90.0100.04317.66
5.6.80.0070.02117.25
5.6.70.0040.01114.09
5.6.60.0100.00313.95
5.6.50.0040.00714.14
5.6.40.0000.01514.06
5.6.30.0040.00813.96
5.6.20.0060.00914.02
5.6.10.0000.01213.95
5.6.00.0080.00414.05
5.5.380.0070.00711.60
5.5.370.0050.00511.60
5.5.360.0050.00511.60
5.5.350.0080.04316.03
5.5.340.0050.02314.84
5.5.330.0090.04215.90
5.5.320.2010.02315.96
5.5.310.0130.04415.96
5.5.300.0040.03014.79
5.5.290.0090.04014.78
5.5.280.0020.03116.23
5.5.270.0080.03516.20
5.5.260.0050.04216.21
5.5.250.0050.04816.20
5.5.240.0020.03615.89
5.5.230.0040.00411.60
5.5.220.0030.00711.60
5.5.210.0070.00011.60
5.5.200.0040.00411.60
5.5.190.0060.00311.60
5.5.180.0030.00311.60
5.5.170.0050.00511.60
5.5.160.0060.00311.60
5.5.150.0030.00711.60
5.5.140.0050.00511.60
5.5.130.0080.00311.60
5.5.120.0080.00011.60
5.5.110.0030.00611.60
5.5.100.0000.00911.60
5.5.90.0000.00911.60
5.5.80.0060.00311.60
5.5.70.0030.00611.60
5.5.60.0000.00911.60
5.5.50.0030.00511.60
5.5.40.0070.00011.60
5.5.30.0090.00311.60
5.5.20.0000.00911.60
5.5.10.0060.00311.60
5.5.00.0060.00611.60
5.4.450.0250.02815.46
5.4.440.0420.03115.45
5.4.430.0370.03715.59
5.4.420.0120.03515.59
5.4.410.0450.03715.55
5.4.400.0130.03315.49
5.4.390.0350.03015.44
5.4.380.0130.02815.21
5.4.370.0220.03215.11
5.4.360.0110.02815.22
5.4.350.0150.03015.22
5.4.340.0090.03215.18
5.4.330.0000.00811.60
5.4.320.0050.02212.06
5.4.310.0070.02312.06
5.4.300.0050.02112.07
5.4.290.0050.02112.06
5.4.280.0030.02012.01
5.4.270.0060.02012.01
5.4.260.0090.01912.00
5.4.250.0050.02112.00
5.4.240.0050.02112.00
5.4.230.0060.02811.99
5.4.220.0020.02411.99
5.4.210.0080.01911.99
5.4.200.0040.02311.99
5.4.190.0030.02311.99
5.4.180.0070.02011.99
5.4.170.0050.01912.00
5.4.160.0050.02011.99
5.4.150.0020.03111.99
5.4.140.0050.02511.83
5.4.130.0070.01811.83
5.4.120.0060.02011.81
5.4.110.0020.02311.81
5.4.100.0030.02111.81
5.4.90.0030.02311.81
5.4.80.0040.02511.81
5.4.70.0040.02811.80
5.4.60.0060.02611.80
5.4.50.0050.01911.80
5.4.40.0030.02111.80
5.4.30.0030.02211.80
5.4.20.0040.02211.79
5.4.10.0020.02311.80
5.4.00.0030.02311.54
5.3.290.0020.02612.20
5.3.280.0030.02412.15
5.3.270.0020.02612.16
5.3.260.0070.02112.16
5.3.250.0030.02212.16
5.3.240.0050.02012.16
5.3.230.0040.02312.15
5.3.220.0020.02212.14
5.3.210.0070.02112.14
5.3.200.0050.01912.14
5.3.190.0060.02012.14
5.3.180.0050.02112.14
5.3.170.0050.02012.13
5.3.160.0040.02112.14
5.3.150.0050.02112.14
5.3.140.0040.02212.13
5.3.130.0040.02212.13
5.3.120.0040.02012.13
5.3.110.0040.02312.13
5.3.100.0040.02211.86
5.3.90.0040.01911.84
5.3.80.0030.02411.84
5.3.70.0040.02311.84
5.3.60.0040.02211.83
5.3.50.0040.02011.80
5.3.40.0040.02311.80
5.3.30.0060.02011.78
5.3.20.0060.01911.67
5.3.10.0030.02211.65
5.3.00.0030.02111.64
5.2.170.0040.01910.39
5.2.160.0050.01710.39
5.2.150.0020.01910.39
5.2.140.0060.01410.39
5.2.130.0070.01310.37
5.2.120.0020.02210.37
5.2.110.0070.01710.38
5.2.100.0030.01710.38
5.2.90.0040.01810.38
5.2.80.0040.01710.37
5.2.70.0050.01510.37
5.2.60.0050.02010.35
5.2.50.0050.01610.33
5.2.40.0020.01710.32
5.2.30.0080.01410.31
5.2.20.0020.01810.30
5.2.10.0070.01810.26
5.2.00.0040.01610.19
5.1.60.0030.0139.83
5.1.50.0040.0149.83
5.1.40.0040.0149.83
5.1.30.0040.01510.00
5.1.20.0040.01610.01
5.1.10.0040.0149.87
5.1.00.0060.0129.87
5.0.50.0020.0139.11
5.0.40.0030.0119.04
5.0.30.0020.0188.95
5.0.20.0030.0128.94
5.0.10.0040.0158.92
5.0.00.0040.0188.92
4.4.90.0030.0098.19
4.4.80.0020.0098.18
4.4.70.0010.0098.18
4.4.60.0010.0108.18
4.4.50.0010.0118.19
4.4.40.0030.0138.15
4.4.30.0040.0078.18
4.4.20.0010.0108.22
4.4.10.0010.0148.22
4.4.00.0000.0168.18
4.3.110.0020.0108.13
4.3.100.0010.0098.13
4.3.90.0030.0078.12
4.3.80.0000.0158.09
4.3.70.0030.0098.11
4.3.60.0020.0108.11
4.3.50.0000.0118.11
4.3.40.0030.0128.07
4.3.30.0020.0107.44
4.3.20.0010.0117.43
4.3.10.0010.0117.42
4.3.00.0040.0129.43

preferences:
38.79 ms | 401 KiB | 5 Q