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.0080.00819.08
8.3.30.0150.00019.21
8.3.20.0090.00020.41
8.3.10.0090.00022.09
8.3.00.0080.00022.44
8.2.170.0140.00322.96
8.2.160.0110.00419.33
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0030.00619.51
8.2.110.0030.00722.15
8.2.100.0100.00718.16
8.2.90.0000.00819.27
8.2.80.0000.00918.05
8.2.70.0030.00617.99
8.2.60.0040.00417.93
8.2.50.0000.00918.07
8.2.40.0050.00320.20
8.2.30.0000.00718.14
8.2.20.0000.00817.96
8.2.10.0030.00617.92
8.2.00.0030.00617.89
8.1.270.0040.00422.31
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0070.00323.92
8.1.230.0080.00319.13
8.1.220.0040.00417.91
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0040.00417.66
8.1.180.0050.00318.92
8.1.170.0000.00918.89
8.1.160.0000.00722.21
8.1.150.0040.00418.81
8.1.140.0040.00417.53
8.1.130.0040.00417.78
8.1.120.0070.00017.72
8.1.110.0050.00317.63
8.1.100.0050.00317.72
8.1.90.0040.00417.67
8.1.80.0000.00717.67
8.1.70.0000.00717.63
8.1.60.0040.00417.84
8.1.50.0050.00317.71
8.1.40.0000.00817.78
8.1.30.0000.00717.73
8.1.20.0040.00417.82
8.1.10.0000.00717.81
8.1.00.0060.00317.66
8.0.300.0030.00518.77
8.0.290.0070.00017.30
8.0.280.0000.00718.39
8.0.270.0030.00317.30
8.0.260.0040.00418.48
8.0.250.0030.00317.26
8.0.240.0040.00417.19
8.0.230.0070.00017.08
8.0.220.0030.00317.16
8.0.210.0000.00817.19
8.0.200.0030.00317.18
8.0.190.0050.00217.31
8.0.180.0050.00217.24
8.0.170.0040.00417.07
8.0.160.0020.00517.26
8.0.150.0000.00717.17
8.0.140.0040.00417.01
8.0.130.0000.00613.58
8.0.120.0000.00817.14
8.0.110.0000.00717.14
8.0.100.0000.00817.17
8.0.90.0050.00317.11
8.0.80.0030.01617.20
8.0.70.0000.00816.97
8.0.60.0070.00017.18
8.0.50.0080.00017.11
8.0.30.0120.01017.40
8.0.20.0110.00917.51
8.0.10.0030.00617.17
8.0.00.0110.01217.16
7.4.330.0030.00315.04
7.4.320.0030.00316.78
7.4.300.0000.00716.82
7.4.290.0040.00416.87
7.4.280.0030.00316.79
7.4.270.0030.00316.88
7.4.260.0000.00716.75
7.4.250.0080.00016.70
7.4.240.0040.00416.82
7.4.230.0030.00316.92
7.4.220.0090.00916.93
7.4.210.0080.01016.88
7.4.200.0000.00716.94
7.4.190.0040.00417.00
7.4.160.0100.00716.91
7.4.150.0160.01017.40
7.4.140.0110.00817.86
7.4.130.0110.00816.84
7.4.120.0080.01316.67
7.4.110.0030.01416.88
7.4.100.0150.00316.71
7.4.90.0110.01016.82
7.4.80.0150.00319.39
7.4.70.0150.01316.62
7.4.60.0140.00316.53
7.4.50.0080.00016.70
7.4.40.0070.00722.77
7.4.30.0070.01016.79
7.4.00.0070.01015.18
7.3.330.0050.00013.47
7.3.320.0030.00313.55
7.3.310.0000.00716.64
7.3.300.0030.00316.57
7.3.290.0140.00716.59
7.3.280.0110.00716.63
7.3.270.0140.00317.40
7.3.260.0060.01216.65
7.3.250.0140.00516.63
7.3.240.0100.00716.96
7.3.230.0120.01216.61
7.3.210.0070.01016.58
7.3.200.0060.01219.39
7.3.190.0140.00316.67
7.3.180.0080.00816.55
7.3.170.0090.00816.70
7.3.160.0120.00416.88
7.3.120.0080.00815.01
7.3.110.0100.00314.92
7.3.100.0100.00314.99
7.3.90.0090.00015.13
7.3.80.0030.01415.06
7.3.70.0040.01215.15
7.3.60.0040.01214.82
7.3.50.0040.00815.05
7.3.40.0110.00415.06
7.3.30.0060.00314.82
7.3.20.0090.00016.99
7.3.10.0040.00816.98
7.3.00.0030.01316.77
7.2.330.0120.00617.04
7.2.320.0080.00816.95
7.2.310.0090.00916.96
7.2.300.0090.00916.91
7.2.290.0120.00616.84
7.2.250.0100.00715.05
7.2.240.0030.01615.01
7.2.230.0090.00615.23
7.2.220.0050.00515.37
7.2.210.0000.01715.40
7.2.200.0040.01515.30
7.2.190.0000.01515.20
7.2.180.0060.00315.30
7.2.170.0030.01015.39
7.2.60.0220.00516.90
7.1.330.0140.00016.11
7.1.320.0040.00715.79
7.1.310.0110.00016.14
7.1.300.0060.00615.92
7.1.290.0040.01116.08
7.1.280.0090.00615.80
7.1.270.0100.00316.06
7.1.260.0090.00616.28
7.1.200.0080.00415.81
7.1.70.0050.00217.31
7.1.60.0070.00419.82
7.1.50.0060.01317.32
7.1.00.0030.07722.32
7.0.200.0030.00516.71
7.0.140.0030.07722.18
7.0.60.0030.04019.93
7.0.50.0100.04317.85
7.0.40.0000.05320.20
7.0.30.0300.07320.24
7.0.20.0270.07320.33
7.0.10.0170.04020.19
7.0.00.0070.04020.09
5.6.280.0070.06721.07
5.6.210.0130.07320.52
5.6.200.0100.07718.28
5.6.190.0130.06320.61
5.6.180.3130.05020.52
5.6.170.0330.03720.56
5.6.160.0000.04720.58
5.6.150.0130.08318.14
5.6.140.0130.03018.15
5.6.130.0070.06718.18
5.6.120.0070.07720.98
5.6.110.0030.08721.15
5.6.100.0100.07721.04
5.6.90.0100.06721.05
5.6.80.0070.07320.55
5.6.70.4570.03720.50
5.5.350.0000.04320.33
5.5.340.0030.08718.09
5.5.330.0230.06720.27
5.5.320.0330.07320.32
5.5.310.0170.05320.37
5.5.300.0030.08717.95
5.5.290.0000.08317.95
5.5.280.0100.08720.82
5.5.270.0000.04720.97
5.5.260.0070.04020.97
5.5.250.0230.07020.67
5.5.240.0130.03020.29
5.4.450.0470.06019.17
5.4.440.0500.07019.55
5.4.430.0500.06319.61
5.4.420.0600.05319.33
5.4.410.0100.05319.58
5.4.400.1730.00018.67
5.4.390.1630.00018.57
5.4.380.0300.05318.72
5.4.370.0230.05318.58
5.4.360.0270.05318.84
5.4.350.0300.05018.84
5.4.340.0370.04318.80
5.4.320.0090.04212.51
5.4.310.0080.04412.51
5.4.300.0060.04312.51
5.4.290.0050.03812.51
5.4.280.0060.03912.40
5.4.270.0080.04112.41
5.4.260.0170.06718.96
5.4.250.0170.05718.97
5.4.240.0100.06318.65
5.4.230.0170.04018.80
5.4.220.0030.08019.08
5.4.210.0230.04018.79
5.4.200.0030.07019.02
5.4.190.0170.04018.76
5.4.180.0070.05318.95
5.4.170.0030.05718.83
5.4.160.0100.04719.01
5.4.150.0030.05718.98
5.4.140.0130.04716.59
5.4.130.0000.05316.55
5.4.120.0070.05016.43
5.4.110.0070.05016.46
5.4.100.0130.04316.54
5.4.90.0030.05016.70
5.4.80.0070.04716.52
5.4.70.0070.05016.68
5.4.60.0170.04016.31
5.4.50.0030.05316.39
5.4.40.0130.05016.46
5.4.30.0100.06716.38
5.4.20.0130.06316.59
5.4.10.0100.07016.44
5.4.00.0170.06015.90
5.3.290.0060.04112.80
5.3.280.0130.04714.62
5.3.270.0070.05014.70
5.3.260.0000.05714.60
5.3.250.0030.05714.78
5.3.240.0070.04714.59
5.3.230.0030.06014.68
5.3.220.0130.04014.49
5.3.210.0000.06014.75
5.3.200.0170.04314.64
5.3.190.0030.05314.49
5.3.180.0100.04714.79
5.3.170.0100.06714.66
5.3.160.0100.04714.48
5.3.150.0100.05014.59
5.3.140.0100.05314.47
5.3.130.0130.06714.39
5.3.120.0000.06714.46
5.3.110.0100.05014.73
5.3.100.0070.05314.18
5.3.90.0100.06713.86
5.3.80.0100.06314.08
5.3.70.0070.06014.02
5.3.60.0030.05314.00
5.3.50.0000.05313.95
5.3.40.0070.05314.18
5.3.30.0100.04313.98
5.3.20.0100.06313.61
5.3.10.0170.05713.56
5.3.00.0000.05313.81
5.2.170.0130.03311.34
5.2.160.0130.03311.24
5.2.150.0170.04711.23
5.2.140.0070.04011.32
5.2.130.0030.04711.19
5.2.120.0030.04011.18
5.2.110.0030.04311.27
5.2.100.0100.03011.18
5.2.90.0070.03711.08
5.2.80.0030.04311.08
5.2.70.0000.04310.93
5.2.60.0100.05011.03
5.2.50.0030.04311.02
5.2.40.0030.04011.23
5.2.30.0030.04010.88
5.2.20.0100.03310.94
5.2.10.0130.04310.93
5.2.00.0100.03310.74
5.1.60.0070.03310.17
5.1.50.0070.03310.21
5.1.40.0070.0339.99
5.1.30.0070.03310.25
5.1.20.0130.03710.43
5.1.10.0100.03710.14
5.1.00.0170.03710.13
5.0.50.0000.0438.52
5.0.40.0030.0338.63
5.0.30.0000.0478.30
5.0.20.0000.0308.28
5.0.10.0070.0278.34
5.0.00.0000.0478.18
4.4.90.0000.0236.21
4.4.80.0030.0206.21
4.4.70.0130.0106.21
4.4.60.0000.0236.21
4.4.50.0030.0206.21
4.4.40.0030.0436.21
4.4.30.0070.0206.21
4.4.20.0030.0236.21
4.4.10.0030.0336.21
4.4.00.0070.0436.21
4.3.110.0070.0236.21
4.3.100.0000.0236.21
4.3.90.0070.0176.21
4.3.80.0030.0306.21
4.3.70.0000.0236.21
4.3.60.0000.0306.21
4.3.50.0030.0206.21
4.3.40.0000.0376.21
4.3.30.0030.0206.21
4.3.20.0000.0236.21
4.3.10.0030.0206.21
4.3.00.0130.0236.63

preferences:
44.94 ms | 400 KiB | 5 Q