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.60.0140.00718.43
8.3.50.0060.01322.05
8.3.40.0070.00718.98
8.3.30.0100.00319.10
8.3.20.0040.00420.20
8.3.10.0080.00021.92
8.3.00.0040.00422.39
8.2.180.0160.01016.63
8.2.170.0110.00722.96
8.2.160.0030.01020.60
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0060.00926.16
8.2.120.0080.00019.63
8.2.110.0060.00322.24
8.2.100.0100.00319.88
8.2.90.0000.00819.30
8.2.80.0040.00419.79
8.2.70.0040.00417.88
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0080.00018.16
8.2.30.0000.00718.18
8.2.20.0040.00417.90
8.2.10.0070.00017.96
8.2.00.0020.00517.98
8.1.280.0000.01425.92
8.1.270.0060.00322.03
8.1.260.0030.00626.35
8.1.250.0090.00028.09
8.1.240.0070.00323.77
8.1.230.0060.00619.28
8.1.220.0090.00017.86
8.1.210.0080.00018.77
8.1.200.0100.00017.60
8.1.190.0000.00817.66
8.1.180.0000.00818.10
8.1.170.0050.00318.90
8.1.160.0040.00421.96
8.1.150.0000.00818.82
8.1.140.0060.00317.63
8.1.130.0000.00717.82
8.1.120.0040.00417.73
8.1.110.0060.00317.57
8.1.100.0080.00017.63
8.1.90.0000.00817.63
8.1.80.0070.00017.67
8.1.70.0040.00417.61
8.1.60.0070.00317.83
8.1.50.0090.00017.61
8.1.40.0040.00417.71
8.1.30.0000.00817.80
8.1.20.0000.00817.74
8.1.10.0000.00817.76
8.1.00.0040.00717.69
8.0.300.0050.00318.77
8.0.290.0040.00417.30
8.0.280.0000.00718.52
8.0.270.0000.00717.24
8.0.260.0000.00717.02
8.0.250.0030.00317.19
8.0.240.0040.00417.14
8.0.230.0040.00417.13
8.0.220.0020.00517.05
8.0.210.0040.00417.12
8.0.200.0000.00717.07
8.0.190.0040.00417.22
8.0.180.0040.00417.07
8.0.170.0000.00817.11
8.0.160.0000.00717.08
8.0.150.0050.00317.02
8.0.140.0040.00417.07
8.0.130.0030.00313.49
8.0.120.0000.00817.05
8.0.110.0000.00717.09
8.0.100.0000.00816.98
8.0.90.0050.00217.12
8.0.80.0060.00917.13
8.0.70.0000.00717.03
8.0.60.0030.00617.10
8.0.50.0040.00416.98
8.0.30.0130.00917.24
8.0.20.0090.01017.50
8.0.10.0050.00217.12
8.0.00.0060.01416.94
7.4.330.0030.00315.12
7.4.320.0000.00716.86
7.4.300.0060.00016.89
7.4.290.0070.00016.75
7.4.280.0050.00216.66
7.4.270.0030.00316.86
7.4.260.0070.00016.90
7.4.250.0040.00416.90
7.4.240.0050.00216.87
7.4.230.0070.00016.60
7.4.220.0100.00616.76
7.4.210.0070.01216.80
7.4.200.0070.00016.84
7.4.190.0040.00416.73
7.4.160.0090.00616.74
7.4.150.0060.01217.40
7.4.140.0060.01117.86
7.4.130.0070.01116.73
7.4.120.0110.00716.77
7.4.110.0130.00416.80
7.4.100.0110.00716.72
7.4.90.0090.00916.84
7.4.80.0130.00719.39
7.4.70.0090.00616.91
7.4.60.0130.00316.51
7.4.50.0000.00816.49
7.4.40.0090.00622.77
7.4.30.0060.01116.81
7.4.00.0090.00915.20
7.3.330.0000.00513.60
7.3.320.0060.00013.35
7.3.310.0040.00416.49
7.3.300.0000.00716.53
7.3.290.0000.01516.72
7.3.280.0100.00716.59
7.3.270.0090.00917.40
7.3.260.0120.00816.58
7.3.250.0050.01516.66
7.3.240.0130.00616.81
7.3.230.0130.00716.66
7.3.210.0110.00616.58
7.3.200.0140.00719.39
7.3.190.0120.01016.78
7.3.180.0150.00416.74
7.3.170.0080.01216.68
7.3.160.0060.01016.53
7.3.120.0060.01014.86
7.3.110.0180.00015.21
7.3.100.0040.01115.11
7.3.90.0060.00915.05
7.3.80.0040.01514.88
7.3.70.0030.00615.14
7.3.60.0120.00615.11
7.3.50.0040.01514.84
7.3.40.0040.01114.90
7.3.30.0110.00415.11
7.3.20.0070.01016.81
7.3.10.0040.00817.00
7.3.00.0030.01316.99
7.2.330.0090.00917.07
7.2.320.0220.00316.89
7.2.310.0090.00916.91
7.2.300.0090.00916.75
7.2.290.0070.01016.85
7.2.250.0140.00415.28
7.2.240.0070.01315.51
7.2.230.0060.00615.35
7.2.220.0040.00815.06
7.2.210.0050.00515.20
7.2.200.0070.00715.29
7.2.190.0040.01415.46
7.2.180.0040.01515.02
7.2.170.0080.00415.15
7.2.00.0100.00319.33
7.1.330.0030.01415.98
7.1.320.0060.00915.82
7.1.310.0000.01216.20
7.1.300.0070.01115.81
7.1.290.0000.01216.16
7.1.280.0030.00616.09
7.1.270.0040.00815.84
7.1.260.0100.00715.79
7.1.100.0080.00418.53
7.1.70.0040.00417.33
7.1.60.0030.02119.82
7.1.50.0030.01317.12
7.1.00.0070.07322.33
7.0.200.0050.00516.70
7.0.140.0030.07321.95
7.0.100.0030.04719.93
7.0.90.0070.06319.98
7.0.80.0100.04719.97
7.0.70.0100.08019.93
7.0.60.0030.08720.00
7.0.50.0170.05020.30
7.0.40.0070.06720.19
7.0.30.0030.08020.02
7.0.20.0070.07320.09
7.0.10.0030.05719.99
7.0.00.0100.04720.10
5.6.280.0100.06720.79
5.6.250.0000.05020.82
5.6.240.0100.08720.71
5.6.230.0070.04320.68
5.6.220.0070.05020.56
5.6.210.0200.04720.66
5.6.200.0100.07021.10
5.6.190.0130.06321.12
5.6.180.0070.08321.07
5.6.170.0070.05721.06
5.6.160.0000.09321.03
5.6.150.0070.06721.06
5.6.140.0100.07721.05
5.6.130.0030.04721.14
5.6.120.0030.05321.06
5.6.110.0030.06021.09
5.6.100.0270.06721.02
5.6.90.0100.05020.89
5.6.80.0030.04320.39
5.6.70.0070.06020.43
5.6.60.0000.04720.33
5.6.50.0200.05020.47
5.6.40.0070.04720.41
5.6.30.0000.06320.40
5.6.20.0030.05320.41
5.6.10.0100.04720.34
5.6.00.0070.04720.31
5.5.380.0130.03720.57
5.5.370.0030.04020.41
5.5.360.0070.06320.52
5.5.350.0030.08020.43
5.5.340.0170.06320.92
5.5.330.0070.07720.82
5.5.320.0070.06720.79
5.5.310.0100.06320.77
5.5.300.0130.05020.77
5.5.290.0030.05320.80
5.5.280.0070.08020.79
5.5.270.0070.04720.92
5.5.260.0070.06320.89
5.5.250.0070.05020.74
5.5.240.0100.04720.28
5.5.230.0100.03720.24
5.5.220.0070.08320.31
5.5.210.0170.03320.03
5.5.200.0170.07320.20
5.5.190.0070.08020.25
5.5.180.0030.04720.29
5.5.160.0100.04320.29
5.5.150.0000.06720.10
5.5.140.0130.06719.97
5.5.130.0100.05320.12
5.5.120.0170.04320.11
5.5.110.0070.04020.25
5.5.100.0030.05320.03
5.5.90.0070.05020.08
5.5.80.0000.04720.14
5.5.70.0130.07720.15
5.5.60.0100.04020.08
5.5.50.0070.06720.11
5.5.40.0030.05720.16
5.5.30.0030.08720.01
5.5.20.0030.04720.05
5.5.10.0100.04320.04
5.5.00.0000.04320.11
5.4.450.0100.06319.28
5.4.440.0070.07019.36
5.4.430.0130.07019.47
5.4.420.0030.08019.22
5.4.410.0030.05019.43
5.4.400.0130.06319.03
5.4.390.0100.04719.13
5.4.380.0070.08019.23
5.4.370.0070.04319.14
5.4.360.0070.04318.95
5.4.350.0100.04319.13
5.4.340.0000.05719.09
5.4.320.0030.05019.16
5.4.310.0030.04019.13
5.4.300.0030.05019.23
5.4.290.0100.03319.17
5.4.280.0000.05719.23
5.4.270.0100.07718.87
5.4.260.0030.05718.90
5.4.250.0000.06319.22
5.4.240.0070.03719.02
5.4.230.0030.04719.11
5.4.220.0170.06019.08
5.4.210.0100.03719.17
5.4.200.0030.05318.89
5.4.190.0000.04319.11
5.4.180.0030.05719.11
5.4.170.0070.07319.02
5.4.160.0100.07019.16
5.4.150.0000.07319.00
5.4.140.0070.06716.49
5.4.130.0070.05016.48
5.4.120.0070.07316.43
5.4.110.0100.06016.39
5.4.100.0030.06016.44
5.4.90.0070.05716.41
5.4.80.0070.06716.50
5.4.70.0070.07716.43
5.4.60.0130.05716.46
5.4.50.0000.07716.25
5.4.40.0070.04016.37
5.4.30.0070.05716.35
5.4.20.0100.07316.36
5.4.10.0000.04316.32
5.4.00.0030.03715.77
5.3.290.0100.04314.79
5.3.280.0000.07714.59
5.3.270.0000.09014.62
5.3.260.0030.03714.70
5.3.250.0100.05314.67
5.3.240.0030.07014.62
5.3.230.0100.04714.72
5.3.220.0100.05714.64
5.3.210.0170.06714.67
5.3.200.0100.07314.58
5.3.190.0170.06014.50
5.3.180.0170.06014.64
5.3.170.0130.04314.67
5.3.160.0070.06714.53
5.3.150.0030.06714.59
5.3.140.0170.04314.50
5.3.130.0030.06714.67
5.3.120.0170.03314.53
5.3.110.0130.06014.48
5.3.100.0030.06013.98
5.3.90.0170.06314.05
5.3.80.0030.05714.04
5.3.70.0030.06313.95
5.3.60.0030.05714.09
5.3.50.0000.04014.10
5.3.40.0130.06313.95
5.3.30.0070.07314.05
5.3.20.0030.06313.72
5.3.10.0130.06013.73
5.3.00.0030.05713.53
5.2.170.0070.04311.18
5.2.160.0030.04711.21
5.2.150.0030.04711.04
5.2.140.0000.05011.18
5.2.130.0130.03711.23
5.2.120.0070.04311.20
5.2.110.0030.05310.99
5.2.100.0100.05711.16
5.2.90.0000.06311.20
5.2.80.0070.04011.09
5.2.70.0070.06311.19
5.2.60.0030.05311.05
5.2.50.0100.04011.05
5.2.40.0000.06710.96
5.2.30.0000.04710.98
5.2.20.0000.07011.06
5.2.10.0100.03710.78
5.2.00.0000.07010.68
5.1.60.0030.03710.12
5.1.50.0130.05010.12
5.1.40.0070.03710.12
5.1.30.0070.05010.35
5.1.20.0030.03710.30
5.1.10.0070.05010.12
5.1.00.0030.04710.16
5.0.50.0030.04010.12
5.0.40.0030.02310.12
5.0.30.0070.05710.12
5.0.20.0030.03710.12
5.0.10.0000.04010.12
5.0.00.0030.05010.12
4.4.90.0000.02710.12
4.4.80.0000.02310.12
4.4.70.0030.03010.12
4.4.60.0000.03010.12
4.4.50.0030.02710.12
4.4.40.0000.04310.12
4.4.30.0000.04010.12
4.4.20.0070.03010.12
4.4.10.0000.01710.12
4.4.00.0000.05010.12
4.3.110.0030.02310.12
4.3.100.0030.03310.12
4.3.90.0170.02010.12
4.3.80.0070.03310.12
4.3.70.0000.03010.12
4.3.60.0070.02010.12
4.3.50.0000.03310.12
4.3.40.0000.03710.12
4.3.30.0000.02710.12
4.3.20.0030.02010.12
4.3.10.0030.02310.12
4.3.00.0030.03010.12

preferences:
43.1 ms | 400 KiB | 5 Q