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) { $id = $a1; } function getHMTL() { if ($id == 0) { echo $this->Id; return; } echo $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.60.0100.00618.68
8.3.50.0090.01121.20
8.3.40.0090.00619.21
8.3.30.0110.00319.17
8.3.20.0040.00420.30
8.3.10.0040.00421.95
8.3.00.0050.00320.69
8.2.180.0100.00616.75
8.2.170.0140.00722.96
8.2.160.0070.00719.32
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00626.16
8.2.120.0080.00019.61
8.2.110.0060.00321.96
8.2.100.0090.00319.88
8.2.90.0040.00419.18
8.2.80.0050.00317.97
8.2.70.0060.00317.88
8.2.60.0040.00418.03
8.2.50.0080.00018.07
8.2.40.0030.00518.34
8.2.30.0070.00018.24
8.2.20.0030.00617.88
8.2.10.0050.00217.96
8.2.00.0040.00717.93
8.1.280.0060.00925.92
8.1.270.0040.00422.19
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00024.02
8.1.230.0030.00819.05
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0030.00617.72
8.1.190.0040.00417.65
8.1.180.0030.00618.81
8.1.170.0040.00418.70
8.1.160.0000.00722.16
8.1.150.0000.00718.84
8.1.140.0040.00417.55
8.1.130.0000.00717.95
8.1.120.0040.00417.54
8.1.110.0030.00617.71
8.1.100.0000.00817.61
8.1.90.0020.00517.54
8.1.80.0000.00817.56
8.1.70.0030.00317.63
8.1.60.0050.00517.64
8.1.50.0000.00717.61
8.1.40.0030.00617.62
8.1.30.0060.00317.77
8.1.20.0100.00017.81
8.1.10.0080.00017.79
8.1.00.0000.00917.69
8.0.300.0000.00718.77
8.0.290.0000.00717.18
8.0.280.0030.00318.55
8.0.270.0000.00717.32
8.0.260.0000.00817.18
8.0.250.0070.00017.08
8.0.240.0070.00017.11
8.0.230.0030.00317.11
8.0.220.0000.00717.05
8.0.210.0030.00317.11
8.0.200.0000.00817.14
8.0.190.0030.00517.14
8.0.180.0080.00017.16
8.0.170.0030.00517.16
8.0.160.0070.00017.11
8.0.150.0040.00416.99
8.0.140.0030.00617.10
8.0.130.0030.00313.51
8.0.120.0040.00417.09
8.0.110.0050.00317.18
8.0.100.0000.00717.03
8.0.90.0030.00617.12
8.0.80.0150.00617.14
8.0.70.0040.00417.05
8.0.60.0040.00417.13
8.0.50.0040.00417.08
8.0.30.0090.01017.22
8.0.20.0070.01217.54
8.0.10.0000.00717.36
8.0.00.0080.01116.86
7.4.330.0020.00215.20
7.4.320.0070.00016.91
7.4.300.0030.00316.62
7.4.290.0000.00816.88
7.4.280.0060.00316.76
7.4.270.0040.00416.87
7.4.260.0000.00716.85
7.4.250.0000.00816.72
7.4.240.0020.00516.72
7.4.230.0030.00316.95
7.4.220.0120.00616.71
7.4.210.0070.00816.86
7.4.200.0000.00816.78
7.4.190.0000.00716.57
7.4.160.0160.00616.66
7.4.150.0060.01217.40
7.4.140.0070.01317.86
7.4.130.0060.01116.88
7.4.120.0070.01216.77
7.4.110.0070.01016.91
7.4.100.0130.00916.79
7.4.90.0150.00316.81
7.4.80.0100.00919.39
7.4.70.0090.00916.87
7.4.60.0110.00616.63
7.4.50.0000.00816.49
7.4.40.0030.01322.77
7.4.30.0100.00716.77
7.4.00.0040.01115.29
7.3.330.0030.00313.38
7.3.320.0030.00313.58
7.3.310.0030.00316.62
7.3.300.0070.00016.56
7.3.290.0130.00016.62
7.3.280.0110.00516.57
7.3.270.0120.00617.40
7.3.260.0110.00616.87
7.3.250.0150.00516.59
7.3.240.0130.01216.65
7.3.230.0090.01216.64
7.3.210.0080.00816.68
7.3.200.0090.00919.39
7.3.190.0100.01316.96
7.3.180.0190.00316.62
7.3.170.0150.00816.73
7.3.160.0060.00916.85
7.3.120.0120.00314.91
7.3.110.0060.00614.99
7.3.100.0080.00415.26
7.3.90.0040.00815.03
7.3.80.0000.01415.21
7.3.70.0050.00515.09
7.3.60.0100.00715.01
7.3.50.0090.00614.93
7.3.40.0030.01415.05
7.3.30.0070.00714.89
7.3.20.0070.01016.56
7.3.10.0100.00516.72
7.3.00.0060.00816.90
7.2.330.0110.00717.00
7.2.320.0030.01516.99
7.2.310.0260.00016.83
7.2.300.0110.00616.71
7.2.290.0030.01317.05
7.2.240.0030.01515.24
7.2.230.0030.01015.31
7.2.220.0090.00315.40
7.2.210.0030.01314.98
7.2.200.0060.00914.99
7.2.190.0030.01315.19
7.2.180.0030.01214.93
7.2.170.0080.00814.99
7.2.160.0100.00615.08
7.2.150.0090.00917.11
7.2.140.0100.00717.32
7.2.130.0080.00817.15
7.2.120.0080.00717.19
7.2.110.0080.00817.14
7.2.100.0050.00617.05
7.2.90.0090.00717.17
7.2.80.0130.00317.21
7.2.70.0030.00717.03
7.2.60.0050.00917.14
7.2.50.0080.00717.10
7.2.40.0030.00717.00
7.2.30.0060.00817.20
7.2.20.0050.01017.07
7.2.10.0050.01017.06
7.2.00.0040.01117.16
7.1.330.0090.00615.87
7.1.320.0060.01015.95
7.1.310.0000.01415.81
7.1.300.0030.01316.18
7.1.290.0040.00715.74
7.1.280.0000.01115.82
7.1.270.0070.01015.98
7.1.260.0030.01015.93
7.1.250.0090.00715.79
7.1.70.0120.00317.13
7.1.60.0040.01219.82
7.1.50.0000.02117.23
7.1.00.0000.08022.34
7.0.200.0070.00317.04
7.0.140.0030.07322.08
7.0.120.0070.07722.15
7.0.110.0130.04022.11
7.0.100.0070.07322.10
7.0.90.0070.06721.94
7.0.80.0070.06022.15
7.0.70.0030.04022.20
7.0.60.0100.06322.15
7.0.50.0000.05722.04
7.0.40.0030.05020.07
7.0.30.0070.05719.94
7.0.20.0070.08020.14
7.0.10.0000.08719.93
7.0.00.0130.04020.16
5.6.280.0100.06721.13
5.6.270.0070.08720.92
5.6.260.0030.08320.83
5.6.250.0000.08320.94
5.6.240.0000.06720.80
5.6.230.0070.04721.02
5.6.220.0000.04720.80
5.6.210.0030.05320.92
5.6.200.0000.06020.89
5.6.190.0030.07720.97
5.6.180.0030.04321.03
5.6.170.0030.05021.05
5.6.160.0000.07320.98
5.6.150.0030.08020.71
5.6.140.0070.07020.89
5.6.130.0100.07721.02
5.6.120.0070.08320.96
5.6.110.0000.08720.98
5.6.100.0000.07320.79
5.6.90.0070.07020.87
5.6.80.0030.04020.20
5.6.70.0030.03720.34
5.6.60.0030.04720.28
5.6.50.0000.06320.43
5.6.40.0000.04020.33
5.6.30.0030.03720.36
5.6.20.0000.03720.36
5.6.10.0070.04320.41
5.6.00.0070.04720.33
5.5.380.0030.07717.70
5.5.370.0070.07017.69
5.5.360.0000.04317.53
5.5.350.0030.07017.68
5.5.340.0000.09318.13
5.5.330.0030.08018.20
5.5.320.0030.04718.10
5.5.310.0100.07317.93
5.5.300.0070.04317.91
5.5.290.0070.07318.07
5.5.280.0070.08017.93
5.5.270.0030.03717.92
5.5.260.0030.07318.10
5.5.250.0000.07717.94
5.5.240.0030.03717.30
5.5.230.0030.05017.43
5.5.220.0030.05017.61
5.5.210.0030.07317.50
5.5.200.0070.05317.48
5.5.190.0070.03017.48
5.5.180.0070.03317.26
5.5.160.0030.03017.60
5.5.150.0000.03717.27
5.5.140.0000.04317.27
5.5.130.0030.03017.39
5.5.120.0000.04717.46
5.5.110.0030.06317.27
5.5.100.0000.07017.18
5.5.90.0000.04717.35
5.5.80.0000.06317.16
5.5.70.0000.03717.44
5.5.60.0030.04317.46
5.5.50.0000.07717.36
5.5.40.0030.03317.36
5.5.30.0030.03717.29
5.5.20.0000.05017.17
5.5.10.0000.08017.15
5.5.00.0000.03717.30
5.4.450.0000.04719.26
5.4.440.0000.07319.28
5.4.430.0030.07019.43
5.4.420.0030.06719.50
5.4.410.0100.06019.17
5.4.400.0030.04019.04
5.4.390.0000.04319.21
5.4.380.0030.07718.96
5.4.370.0030.06019.28
5.4.360.0030.05719.26
5.4.350.0000.06319.11
5.4.340.0030.03719.18
5.4.320.0030.03719.13
5.4.310.0000.04019.26
5.4.300.0030.03319.28
5.4.290.0030.07718.89
5.4.280.0000.03718.89
5.4.270.0070.07018.94
5.4.260.0030.03719.16
5.4.250.0030.03018.95
5.4.240.0030.04318.89
5.4.230.0000.03319.03
5.4.220.0070.03719.12
5.4.210.0030.03319.03
5.4.200.0000.03718.97
5.4.190.0030.03719.25
5.4.180.0030.04018.96
5.4.170.0000.03718.95
5.4.160.0000.06318.87
5.4.150.0000.04018.91
5.4.140.0000.05016.36
5.4.130.0000.05716.35
5.4.120.0030.06716.33
5.4.110.0000.08016.50
5.4.100.0100.06016.59
5.4.90.0070.07716.40
5.4.80.0070.06316.35
5.4.70.0070.06016.49
5.4.60.0030.03716.40
5.4.50.0070.03016.50
5.4.40.0000.04016.54
5.4.30.0030.04316.19
5.4.20.0030.02716.41
5.4.10.0100.03016.32
5.4.00.0000.03715.92
5.3.290.0000.04014.76
5.3.280.0030.05014.61
5.3.270.0000.05014.71
5.3.260.0000.07314.64
5.3.250.0030.04014.57
5.3.240.0000.08014.69
5.3.230.0070.05714.69
5.3.220.0030.03314.72
5.3.210.0000.05314.57
5.3.200.0030.03014.58
5.3.190.0030.07014.58
5.3.180.0030.06714.72
5.3.170.0030.07014.65
5.3.160.0030.07014.58
5.3.150.0000.06314.59
5.3.140.0000.09014.42
5.3.130.0070.03014.69
5.3.120.0000.04014.58
5.3.110.0030.03014.56
5.3.100.0000.04714.01
5.3.90.0030.05714.12
5.3.80.0100.02713.98
5.3.70.0000.06314.26
5.3.60.0000.06714.04
5.3.50.0100.02713.95
5.3.40.0000.06313.81
5.3.30.0000.03713.95
5.3.20.0000.03713.69
5.3.10.0000.06713.67
5.3.00.0030.07013.64
5.2.170.0000.06711.12
5.2.160.0000.06011.30
5.2.150.0030.03011.13
5.2.140.0000.03011.23
5.2.130.0000.02311.08
5.2.120.0030.02311.20
5.2.110.0000.02711.11
5.2.100.0000.03011.13
5.2.90.0030.02011.21
5.2.80.0000.03011.06
5.2.70.0000.05010.96
5.2.60.0030.04311.06
5.2.50.0000.05010.89
5.2.40.0030.02311.04
5.2.30.0000.06710.98
5.2.20.0070.06011.04
5.2.10.0000.04010.83
5.2.00.0000.04310.71
5.1.60.0070.0479.99
5.1.50.0000.05010.27
5.1.40.0030.0379.98
5.1.30.0030.05310.48
5.1.20.0030.05310.34
5.1.10.0070.04710.09
5.1.00.0070.03710.06
5.0.50.0030.0439.49
5.0.40.0070.0279.49
5.0.30.0000.0679.49
5.0.20.0070.0279.49
5.0.10.0030.0409.49
5.0.00.0000.0479.49
4.4.90.0000.0279.49
4.4.80.0030.0309.49
4.4.70.0000.0179.49
4.4.60.0030.0309.49
4.4.50.0030.0239.49
4.4.40.0000.0539.49
4.4.30.0030.0209.49
4.4.20.0030.0239.49
4.4.10.0070.0279.49
4.4.00.0000.0539.49
4.3.110.0100.0209.49
4.3.100.0030.0409.49
4.3.90.0030.0109.49
4.3.80.0000.0279.49
4.3.70.0000.0209.49
4.3.60.0000.0139.49
4.3.50.0000.0179.49
4.3.40.0000.0239.49
4.3.30.0000.0179.49
4.3.20.0000.0179.49
4.3.10.0000.0179.49
4.3.00.0000.0179.49

preferences:
46 ms | 401 KiB | 5 Q