3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AdsListExtractor { var $html = 0; function __construct($a1) { $this->html = $a1; echo $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 { var $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.40.0120.00319.18
8.3.30.0070.01119.30
8.3.20.0040.00420.43
8.3.10.0090.00021.92
8.3.00.0040.00422.40
8.2.170.0090.00922.96
8.2.160.0100.00319.32
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0050.00319.61
8.2.110.0030.00722.03
8.2.100.0100.00318.03
8.2.90.0050.00319.30
8.2.80.0000.00818.16
8.2.70.0000.00818.00
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0030.00520.01
8.2.30.0000.00818.07
8.2.20.0030.00517.97
8.2.10.0040.00418.00
8.2.00.0000.00818.05
8.1.270.0060.00322.32
8.1.260.0040.00426.35
8.1.250.0000.00928.09
8.1.240.0030.00624.05
8.1.230.0040.00819.27
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0070.00417.48
8.1.190.0000.00817.50
8.1.180.0040.00418.92
8.1.170.0050.00318.96
8.1.160.0040.00422.19
8.1.150.0040.00418.73
8.1.140.0020.00517.65
8.1.130.0000.00717.90
8.1.120.0000.00817.55
8.1.110.0030.00617.64
8.1.100.0040.00417.48
8.1.90.0000.00717.69
8.1.80.0040.00417.55
8.1.70.0020.00517.67
8.1.60.0040.00417.78
8.1.50.0000.00817.64
8.1.40.0060.00317.68
8.1.30.0000.00817.72
8.1.20.0000.00917.85
8.1.10.0000.00817.80
8.1.00.0030.00517.76
8.0.300.0030.00618.77
8.0.290.0040.00417.04
8.0.280.0080.00018.53
8.0.270.0040.00417.32
8.0.260.0000.00717.10
8.0.250.0000.00717.20
8.0.240.0040.00417.18
8.0.230.0070.00017.10
8.0.220.0000.00817.04
8.0.210.0030.00517.13
8.0.200.0030.00317.07
8.0.190.0000.00817.27
8.0.180.0000.00717.18
8.0.170.0020.00517.14
8.0.160.0040.00417.12
8.0.150.0000.00817.00
8.0.140.0040.00417.02
8.0.130.0030.00313.54
8.0.120.0040.00416.97
8.0.110.0060.00317.22
8.0.100.0070.00017.06
8.0.90.0050.00317.04
8.0.80.0030.01217.18
8.0.70.0000.00717.08
8.0.60.0000.00717.04
8.0.50.0040.00417.14
8.0.30.0100.00917.23
8.0.20.0100.00917.40
8.0.10.0000.00717.05
8.0.00.0130.00717.11
7.4.330.0030.00315.00
7.4.320.0030.00316.86
7.4.300.0060.00016.65
7.4.290.0030.00316.75
7.4.280.0000.00716.86
7.4.270.0040.00416.78
7.4.260.0030.00316.84
7.4.250.0040.00416.82
7.4.240.0050.00316.84
7.4.230.0040.00416.67
7.4.220.0090.01616.84
7.4.210.0080.01016.78
7.4.200.0000.00716.84
7.4.190.0030.00516.73
7.4.160.0080.00816.96
7.4.150.0110.00717.40
7.4.140.0100.00917.86
7.4.130.0120.00816.86
7.4.120.0120.00516.94
7.4.110.0100.01016.80
7.4.100.0030.01416.63
7.4.90.0150.00616.75
7.4.80.0070.01419.39
7.4.70.0030.00716.75
7.4.60.0120.00616.71
7.4.50.0030.00616.87
7.4.40.0120.00322.77
7.4.30.0090.01316.62
7.4.00.0070.01115.27
7.3.330.0030.00313.56
7.3.320.0060.00013.31
7.3.310.0030.00316.62
7.3.300.0060.00016.55
7.3.290.0140.00716.62
7.3.280.0090.01016.54
7.3.270.0070.01117.40
7.3.260.0150.00316.69
7.3.250.0090.00816.82
7.3.240.0100.00616.73
7.3.230.0090.01216.66
7.3.210.0110.00616.80
7.3.200.0090.00619.39
7.3.190.0150.00716.86
7.3.180.0130.00316.67
7.3.170.0070.01016.68
7.3.160.0070.01016.73
7.3.120.0040.01615.23
7.3.110.0030.01715.26
7.3.100.0150.00015.14
7.3.90.0060.00614.97
7.3.80.0060.00615.06
7.3.70.0030.01615.11
7.3.60.0120.00315.09
7.3.50.0080.00414.71
7.3.40.0130.00014.82
7.3.30.0040.01214.86
7.3.20.0090.00316.85
7.3.10.0070.00717.11
7.3.00.0060.00616.96
7.2.330.0090.00916.59
7.2.320.0140.00316.59
7.2.310.0120.00616.94
7.2.300.0030.01416.92
7.2.290.0060.01116.84
7.2.240.0070.01015.20
7.2.230.0150.00015.11
7.2.220.0000.01315.38
7.2.210.0090.00615.23
7.2.200.0060.01215.28
7.2.190.0060.00615.32
7.2.180.0030.01015.04
7.2.170.0030.00715.32
7.2.160.0100.00314.96
7.2.150.0070.00717.17
7.2.140.0070.00717.14
7.2.130.0030.01017.35
7.2.120.0060.00917.21
7.2.110.0130.00317.09
7.2.100.0070.01017.15
7.2.90.0030.00717.04
7.2.80.0060.00617.16
7.2.70.0030.01017.08
7.2.60.0040.01117.06
7.2.50.0000.01317.11
7.2.40.0000.01617.18
7.2.30.0060.00617.09
7.2.20.0060.00316.93
7.2.10.0030.00916.97
7.2.00.0050.00918.47
7.1.330.0080.00815.98
7.1.320.0060.01016.22
7.1.310.0040.01116.24
7.1.300.0100.00716.06
7.1.290.0070.00715.73
7.1.280.0100.00315.91
7.1.270.0060.00315.68
7.1.260.0000.01415.64
7.1.250.0000.01316.13
7.1.100.0040.00718.36
7.1.70.0030.00717.29
7.1.60.0070.01719.82
7.1.50.0120.01217.17
7.1.00.0030.07722.29
7.0.200.0040.00716.76
7.0.140.0070.07322.11
7.0.60.0130.07719.92
7.0.50.0070.06017.92
7.0.40.0100.07720.42
7.0.30.0370.06020.21
7.0.20.0230.05720.28
7.0.10.0100.04720.15
7.0.00.0070.05020.27
5.6.280.0000.07721.09
5.6.210.0070.05720.55
5.6.200.0000.04318.18
5.6.190.0170.07720.50
5.6.180.3730.04320.55
5.6.170.0370.05020.47
5.6.160.0030.04020.58
5.6.150.0070.08318.25
5.6.140.0100.05718.18
5.6.130.0030.04018.24
5.6.120.0130.07721.13
5.6.110.0100.06720.90
5.6.100.0070.08320.99
5.6.90.0070.04020.99
5.6.80.0000.04320.52
5.6.70.3230.03020.36
5.5.350.0030.06020.47
5.5.340.0100.05017.95
5.5.330.0070.05020.27
5.5.320.0400.06720.35
5.5.310.0200.04320.41
5.5.300.0030.04318.08
5.5.290.0100.06017.97
5.5.280.0000.05020.75
5.5.270.0070.06720.89
5.5.260.0100.07720.88
5.5.250.0130.08020.48
5.5.240.0000.08320.29
5.4.450.3700.04019.46
5.4.440.4030.04719.36
5.4.430.3730.03719.38
5.4.420.3600.03319.19
5.4.410.3800.04019.05
5.4.400.3630.03318.98
5.4.390.3870.03319.22
5.4.380.3870.03019.31
5.4.370.3400.04319.09
5.4.360.3730.04318.98
5.4.350.3570.03319.16
5.4.340.3800.03719.08
5.4.320.3670.04319.08
5.4.310.4470.04319.07
5.4.300.3530.03319.22
5.4.290.3530.03719.09
5.4.280.3500.03719.22
5.4.270.3730.03719.24
5.4.260.3870.03719.09
5.4.250.3530.03318.97
5.4.240.3500.03719.13
5.4.230.3800.03719.20
5.4.220.3730.03319.12
5.4.210.4000.02719.13
5.4.200.3270.05018.98
5.4.190.0070.07019.16
5.4.180.0100.06718.94
5.4.170.3530.04018.99
5.4.160.3570.03019.21
5.4.150.3800.03319.04
5.4.140.2400.03716.56
5.4.130.2170.03316.55
5.4.120.2730.03316.55
5.4.110.3330.03716.60
5.4.100.3300.04016.50
5.4.90.2970.03316.42
5.4.80.3370.03016.40
5.4.70.0030.03316.62
5.4.60.0030.04316.52
5.4.50.3430.03316.43
5.4.40.3800.03016.48
5.4.30.3730.03716.34
5.4.20.3930.03016.43
5.4.10.3600.03016.53
5.4.00.4100.04015.96
5.3.290.4430.03714.76
5.3.280.3630.03714.57
5.3.270.3900.03714.62
5.3.260.3800.03714.61
5.3.250.3770.03314.73
5.3.240.2270.03714.62
5.3.230.2670.04014.72
5.3.220.2930.03014.48
5.3.210.3300.03714.49
5.3.200.3430.05014.58
5.3.190.3330.04014.63
5.3.180.3100.04714.49
5.3.170.3200.03714.68
5.3.160.0100.03014.48
5.3.150.1570.03714.47
5.3.140.3570.03314.55
5.3.130.3830.03714.67
5.3.120.3870.03314.63
5.3.110.3200.04314.72
5.3.100.3800.03013.99
5.3.90.3700.04014.00
5.3.80.3900.03713.95
5.3.70.3830.03713.94
5.3.60.3830.04014.10
5.3.50.4600.02714.18
5.3.40.3870.03313.94
5.3.30.3530.03013.99
5.3.20.3970.02713.86
5.3.10.3570.03713.57
5.3.00.3770.04013.66
5.2.170.2900.03311.07
5.2.160.2870.03011.23
5.2.150.3200.02311.07
5.2.140.3000.02711.16
5.2.130.3100.03311.03
5.2.120.3100.03311.34
5.2.110.2930.02311.01
5.2.100.3230.02311.03
5.2.90.2830.03311.12
5.2.80.2930.02711.06
5.2.70.3330.03011.04
5.2.60.3000.02710.99
5.2.50.3070.03310.93
5.2.40.3000.03010.99
5.2.30.2970.03310.98
5.2.20.2800.02711.02
5.2.10.2930.03010.87
5.2.00.3100.02710.74
5.1.60.2600.02310.09
5.1.50.3100.02010.08
5.1.40.3070.02710.08
5.1.30.3000.02010.25
5.1.20.3100.02710.48
5.1.10.2770.02710.08
5.1.00.2730.03010.08
5.0.50.1730.02010.08
5.0.40.1630.02310.08
5.0.30.1670.03310.08
5.0.20.1500.01710.08
5.0.10.1870.01010.08
5.0.00.1770.03010.08
4.4.90.1400.01710.08
4.4.80.1500.01710.08
4.4.70.1770.01010.08
4.4.60.1670.01710.08
4.4.50.1400.01710.08
4.4.40.1370.02310.08
4.4.30.1670.01310.08
4.4.20.1730.01710.08
4.4.10.1670.01710.08
4.4.00.1730.02310.08
4.3.110.1730.01710.08
4.3.100.1700.01710.08
4.3.90.1500.01710.08
4.3.80.1400.02310.08
4.3.70.1530.01310.08
4.3.60.1670.01710.08
4.3.50.1630.01710.08
4.3.40.1700.02310.08
4.3.30.0900.02310.08
4.3.20.1000.02310.08
4.3.10.0730.01710.08
4.3.00.0770.01010.08

preferences:
39.67 ms | 400 KiB | 5 Q