3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AdsListExtractor { var $html = 0; function __construct($a1) { $html = $a1; } function getURLs() { $regexa = '/\<a(.*)\<\/a\>/'; preg_match($regexa, $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[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)
5.4.260.0100.07718.76
5.4.250.0100.07018.76
5.4.240.0070.06718.98
5.4.230.0130.05718.76
5.4.220.0200.07018.97
5.4.210.0100.05318.94
5.4.200.0100.05018.83
5.4.190.0170.05018.99
5.4.180.0030.05718.80
5.4.170.0100.05019.08
5.4.160.0070.05319.01
5.4.150.0070.06018.93
5.4.140.0070.05316.39
5.4.130.0070.05316.56
5.4.120.0130.06716.54
5.4.110.0070.05016.61
5.4.100.0100.04716.51
5.4.90.0070.06316.70
5.4.80.0030.05016.37
5.4.70.0200.04016.37
5.4.60.0070.07316.48
5.4.50.0030.05016.46
5.4.40.0130.05016.51
5.4.30.0100.04716.56
5.4.20.0000.06016.50
5.4.10.0030.06016.39
5.4.00.0070.05015.71
5.3.280.0100.07314.59
5.3.270.0130.05014.60
5.3.260.0070.05714.63
5.3.250.0100.04714.83
5.3.240.0070.05314.61
5.3.230.0100.05014.61
5.3.220.0130.04314.71
5.3.210.0170.04314.56
5.3.200.0100.04714.57
5.3.190.0100.05014.56
5.3.180.0030.07314.54
5.3.170.0070.07314.71
5.3.160.0130.04014.57
5.3.150.0030.07314.56
5.3.140.0100.07314.48
5.3.130.0070.08014.74
5.3.120.0100.05014.64
5.3.110.0100.06014.63
5.3.100.0170.04314.04
5.3.90.0100.05013.86
5.3.80.0100.05014.25
5.3.70.0200.06014.02
5.3.60.0070.06014.23
5.3.50.0100.05713.86
5.3.40.0030.05313.95
5.3.30.0030.05014.00
5.3.20.0030.05013.93
5.3.10.0100.04713.68
5.3.00.0100.04713.48
5.2.170.0100.05311.23
5.2.160.0100.05011.21
5.2.150.0100.04711.33
5.2.140.0030.04011.15
5.2.130.0070.04711.20
5.2.120.0130.05311.19
5.2.110.0030.05011.18
5.2.100.0030.04010.93
5.2.90.0070.04711.20
5.2.80.0070.04011.19
5.2.70.0070.05311.19
5.2.60.0100.03310.98
5.2.50.0000.04311.11
5.2.40.0100.03711.01
5.2.30.0070.04011.20
5.2.20.0100.04710.96
5.2.10.0030.04010.96
5.2.00.0030.04310.81
5.1.60.0070.0439.96
5.1.50.0030.03710.05
5.1.40.0000.05010.14
5.1.30.0030.04010.43
5.1.20.0070.03310.59
5.1.10.0070.03310.17
5.1.00.0070.03310.09
5.0.50.0000.0338.65
5.0.40.0000.0308.49
5.0.30.0100.0508.25
5.0.20.0030.0278.44
5.0.10.0070.0308.24
5.0.00.0070.0378.27
4.4.90.0030.0206.23
4.4.80.0030.0206.23
4.4.70.0000.0236.23
4.4.60.0000.0236.23
4.4.50.0000.0236.23
4.4.40.0030.0376.23
4.4.30.0000.0336.23
4.4.20.0000.0236.23
4.4.10.0030.0206.23
4.4.00.0030.0406.23
4.3.110.0070.0206.23
4.3.100.0030.0206.23
4.3.90.0030.0206.23
4.3.80.0000.0376.23
4.3.70.0000.0236.23
4.3.60.0030.0306.23
4.3.50.0000.0236.23
4.3.40.0030.0306.23
4.3.30.0000.0236.23
4.3.20.0100.0136.23
4.3.10.0000.0206.23
4.3.00.0100.0206.63

preferences:
142.01 ms | 1394 KiB | 7 Q