3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateRandomString() { return 4; } class Connection { public function execute($query) { return true; } } class ConnectionFactory { public static CreateConnection() { return new Connection; } } function pg_escape($data) { return $data; } class LocalAuth { protected $login; protected $pass; protected $salt; function Store(){ $db = ConnectionFactory::CreateConnection(); $q = "insert into localauth (login, pass, salt) values ('".$this->login."','".$this->pass."','".$this->salt."');"; $db->execute($q); } } $auth= new LocalAuth(); $auth->login= pg_escape($_POST['login']); $auth->pass= pg_escape($_POST['pass']); $auth->salt = generateRandomString(); $auth->Store();

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.190.0120.04512.40
5.4.180.0090.04812.40
5.4.170.0090.04912.39
5.4.160.0120.04512.39
5.4.150.0100.04612.39
5.4.140.0110.04712.08
5.4.130.0120.04312.06
5.4.120.0100.04612.02
5.4.110.0110.03912.02
5.4.100.0140.04112.02
5.4.90.0110.04012.02
5.4.80.0130.05212.02
5.4.70.0100.04112.02
5.4.60.0160.03712.02
5.4.50.0120.04312.02
5.4.40.0220.03212.00
5.4.30.0140.05312.00
5.4.20.0130.03612.00
5.4.10.0120.04312.00
5.4.00.0110.03811.49
5.3.270.0120.04812.72
5.3.260.0100.04512.72
5.3.250.0120.04612.72
5.3.240.0090.04512.72
5.3.230.0090.04712.71
5.3.220.0120.04112.68
5.3.210.0120.04212.68
5.3.200.0160.05312.68
5.3.190.0130.04212.68
5.3.180.0110.04112.68
5.3.170.0120.04012.67
5.3.160.0100.04212.67
5.3.150.0210.03212.67
5.3.140.0130.03912.66
5.3.130.0110.04312.65
5.3.120.0110.04812.66
5.3.110.0130.05712.65
5.3.100.0130.03812.13
5.3.90.0090.04112.10
5.3.80.0120.03912.09
5.3.70.0120.04212.09
5.3.60.0150.05212.07
5.3.50.0120.03912.02
5.3.40.0080.04312.02

preferences:
148.68 ms | 1394 KiB | 7 Q