3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AdInfoExtractor { var $id = 0; function __construct1($a1) { $id = $a1; } function getHMTL () { if ($id == 0) { echo $this->Id; return; } echo $id; return; } } $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>"; $regexa = '/\<a(.*)\<\/a\>/'; preg_match($regexa, $html_liste, $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"; 'http://montreal.kijiji.ca/c-ViewAd?AdId=576130148' $tc = new AdInfoExtractor($url_fiche); echo test::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.0130.04718.93
5.4.250.0070.08718.76
5.4.240.0000.05718.65
5.4.230.0070.05018.74
5.4.220.0130.04718.96
5.4.210.0170.06318.86
5.4.200.0130.04719.02
5.4.190.0070.05018.79
5.4.180.0130.04318.92
5.4.170.0070.06018.80
5.4.160.0070.06718.91
5.4.150.0070.05319.07
5.4.140.0130.04716.39
5.4.130.0100.04316.39
5.4.120.0130.04716.54
5.4.110.0030.05316.43
5.4.100.0170.04016.62
5.4.90.0100.06016.61
5.4.80.0130.05716.37
5.4.70.0070.05016.42
5.4.60.0030.05716.45
5.4.50.0100.07016.62
5.4.40.0200.05316.64
5.4.30.0100.04716.29
5.4.20.0230.05316.32
5.4.10.0130.05316.54
5.4.00.0100.05015.94
5.3.280.0100.04714.51
5.3.270.0070.05314.52
5.3.260.0100.05014.70
5.3.250.0170.04714.84
5.3.240.0170.06714.71
5.3.230.0030.07714.44
5.3.220.0100.04714.66
5.3.210.0130.06014.67
5.3.200.0100.06314.41
5.3.190.0000.06014.64
5.3.180.0100.04714.58
5.3.170.0030.05014.66
5.3.160.0130.04314.56
5.3.150.0070.05714.66
5.3.140.0100.07314.57
5.3.130.0070.05714.53
5.3.120.0130.06714.55
5.3.110.0000.05714.55
5.3.100.0230.04014.08
5.3.90.0130.07014.11
5.3.80.0070.05014.11
5.3.70.0170.06014.01
5.3.60.0000.05714.00
5.3.50.0170.04013.86
5.3.40.0030.05713.94
5.3.30.0070.05014.13
5.3.20.0200.04313.86
5.3.10.0070.04713.81
5.3.00.0100.07013.73
5.2.170.0070.04711.23
5.2.160.0070.05711.31
5.2.150.0100.05011.23
5.2.140.0100.03711.21
5.2.130.0000.04711.18
5.2.120.0100.03311.27
5.2.110.0030.04711.06
5.2.100.0070.03711.09
5.2.90.0100.03311.19
5.2.80.0000.04311.16
5.2.70.0100.03310.93
5.2.60.0100.04011.06
5.2.50.0030.04311.25
5.2.40.0100.04311.09
5.2.30.0130.03010.98
5.2.20.0030.04011.14
5.2.10.0030.04010.93
5.2.00.0030.04010.82
5.1.60.0130.03010.10
5.1.50.0070.03710.10
5.1.40.0030.04010.09
5.1.30.0170.03710.42
5.1.20.0030.05310.54
5.1.10.0030.03710.18
5.1.00.0000.05310.00
5.0.50.0030.0308.61
5.0.40.0070.0238.42
5.0.30.0000.0438.29
5.0.20.0000.0308.25
5.0.10.0000.0308.15
5.0.00.0000.0438.41
4.4.90.0030.0206.23
4.4.80.0070.0306.22
4.4.70.0000.0236.22
4.4.60.0130.0136.22
4.4.50.0070.0206.22
4.4.40.0030.0376.22
4.4.30.0070.0276.22
4.4.20.0070.0306.22
4.4.10.0030.0206.22
4.4.00.0070.0306.22
4.3.110.0070.0176.22
4.3.100.0030.0206.22
4.3.90.0030.0206.22
4.3.80.0000.0336.22
4.3.70.0030.0306.22
4.3.60.0070.0176.22
4.3.50.0000.0236.22
4.3.40.0030.0306.22
4.3.30.0000.0306.22
4.3.20.0000.0236.22
4.3.10.0030.0206.22
4.3.00.0170.0176.63

preferences:
147.53 ms | 1394 KiB | 7 Q