3v4l.org

run code in 300+ PHP versions simultaneously
<?php public function login() { if(isset($_POST["user"]) && isset($_POST["password"])) { $postUserID = DataFormat::parsePersonID($_POST["user"]); if(!$postUserID) { return false; } $user = $this->db->getPerson($postUserID); if(!$user) { return false; } if ($user["activated"] == 0){ return false; } $hashedPassword = hash("sha512", $_POST["password"] . $user["salt"]); if($hashedPassword != $user["password"]) { return false; } if(!in_array($user["id"], $this->testUsers)) { return false; } $_SESSION["user"] = $user; $_SESSION["loginKey"] = $this->getLoginKey(); return true; } return false; }

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.180.0100.03712.38
5.4.170.0170.04412.37
5.4.160.0170.04512.36
5.4.150.0180.04512.36
5.4.140.0190.04012.05
5.4.130.0180.04012.03
5.4.120.0240.06412.00
5.4.110.0140.04311.99
5.4.100.0150.04711.99
5.4.90.0150.04311.99
5.4.80.0240.06511.99
5.4.70.0160.04211.99
5.4.60.0400.11911.99
5.4.50.0150.04411.98
5.4.40.0140.05111.98
5.4.30.0210.04311.98
5.4.20.0340.08311.96
5.4.10.0140.04611.97
5.4.00.0130.04411.46
5.3.270.0170.04512.72
5.3.260.0230.03712.71
5.3.250.0240.06612.72
5.3.240.0140.04712.72
5.3.230.0210.04112.71
5.3.220.0210.03812.68
5.3.210.0150.04612.68
5.3.200.0250.06412.68
5.3.190.0180.04312.67
5.3.180.0160.04312.67
5.3.170.0180.04112.67
5.3.160.0140.04612.67
5.3.150.0170.04412.67
5.3.140.0130.04812.66
5.3.130.0180.04312.66
5.3.120.0170.04312.66
5.3.110.0160.04412.66
5.3.100.0280.06312.12
5.3.90.0130.04512.08
5.3.80.0220.03812.07
5.3.70.0180.04212.07
5.3.60.0200.04012.07
5.3.50.0140.04712.00
5.3.40.0190.04112.00
5.3.30.0180.03811.95
5.3.20.0180.03911.73
5.3.10.0200.03611.69
5.3.00.0110.04611.67

preferences:
134.8 ms | 1394 KiB | 7 Q