3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class db extends PDO { private $engine; private $host; private $database; private $user; private $pass; private $charset; private static $link = null ; public static VirtualDeletion = array( 'on' => false, 'Field' => '', 'Value' => '' ); public function __construct() { return self::i(); } public static function i() { if (!self::$link) return self::$link; $this->engine = 'mysql'; $this->host = 'localhost'; $this->database = ''; $this->user = 'root'; $this->pass = ''; $this->charset = 'utf8'; $dsn = $this->engine .":dbname=". $this->database .";charset=". $this->charset .";host=". $this->host; self::$link = parent::__construct( $dsn, $this->user, $this->pass ); /* PHP < 5.3.6 self::$link->exec("set names utf8"); */ return self::$link; } public function __destruct() { if(self::$link) { /* Estudar as implicações disto: if(PDO::inTransaction()) self::$link->commit(); */ self::$link = null; } } }

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.5.80.0100.03317.23
5.5.70.0130.06317.29
5.5.60.0070.06317.32
5.5.50.0030.04017.16
5.5.40.0100.06717.19
5.5.30.0100.07017.27
5.5.20.0100.07317.16
5.5.10.0100.05017.32
5.5.00.0170.06717.22
5.4.240.0030.03719.02
5.4.230.0100.07019.09
5.4.220.0030.07719.00
5.4.210.0070.05019.00
5.4.200.0030.07719.00
5.4.190.0130.07019.04
5.4.180.0100.06319.09
5.4.170.0100.07318.87
5.4.160.0070.05719.07
5.4.150.0100.06019.02
5.4.140.0170.06316.53
5.4.130.0070.06316.43
5.4.120.0100.05016.30
5.4.110.0070.03716.24
5.4.100.0100.05016.57
5.4.90.0070.07316.42
5.4.80.0070.07316.33
5.4.70.0100.06716.57
5.4.60.0070.07316.35
5.4.50.0100.06716.39
5.4.40.0130.06716.51
5.4.30.0070.07716.43
5.4.20.0030.06316.45
5.4.10.0100.04716.55
5.4.00.0100.04015.74
5.3.280.0100.03714.65
5.3.270.0070.08014.57
5.3.260.0130.07014.66
5.3.250.0000.08314.63
5.3.240.0130.04014.64
5.3.230.0070.08014.68
5.3.220.0030.05314.65
5.3.210.0030.08014.55
5.3.200.0130.06714.56
5.3.190.0030.07714.61
5.3.180.0100.06014.63
5.3.170.0070.07014.41
5.3.160.0030.04314.60
5.3.150.0030.04014.62
5.3.140.0130.06314.77
5.3.130.0100.06714.64
5.3.120.0200.07014.59
5.3.110.0070.05014.39
5.3.100.0100.04014.07
5.3.90.0030.04713.97
5.3.80.0070.07314.07
5.3.70.0130.05314.06
5.3.60.0070.07714.07
5.3.50.0030.06713.94
5.3.40.0100.07313.84
5.3.30.0070.07313.96
5.3.20.0030.03713.79
5.3.10.0130.05013.66
5.3.00.0000.05713.53

preferences:
142.23 ms | 1394 KiB | 7 Q