3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class User{ private string $email; private string $password; public $errors = []; public function __construct(string $email, string $password){ $this->email = $email; $this->password = $password; } public function validateEmail($email){ if(!filter_var($this->email, FILTER_VALIDATE_EMAIL)){ $this->errors[] = "falsche email"; return false; } else { return true; } } public function validatePassword($password){ If((strlen($password)<4) | (strlen($password)>6)){ $this->errors[] = "passwort zu kurz oder zu lang"; return false; } else { return true; } public function getEmail(){ return $this->email = $email; } public function setEmail(){ $this->email = email; } } ?>

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)
8.5.20.0270.00817.08
8.5.10.0340.00916.46
8.5.00.0230.00716.55
8.4.170.0290.00620.36
8.4.160.0120.00520.21
8.4.150.0300.01119.69
8.4.140.0320.01017.69
8.4.130.0370.00717.66
8.4.120.0390.00817.85
8.4.110.0410.00617.90
8.4.100.0390.01217.48
8.4.90.0430.00917.84
8.4.80.0370.01317.68
8.4.70.0390.00817.88
8.4.60.0400.00817.72
8.4.50.0340.01117.96
8.4.40.0410.00817.60
8.4.30.0410.01117.41
8.4.20.0450.01317.37
8.4.10.0410.00917.53
8.3.300.0340.00618.29
8.3.290.0290.01118.23
8.3.280.0340.00618.38
8.3.270.0390.00716.60
8.3.260.0380.00716.87
8.3.250.0380.01016.59
8.3.240.0410.00916.63
8.3.230.0440.00916.55
8.3.220.0360.00816.68
8.3.210.0400.00516.62
8.3.200.0360.00716.79
8.3.190.0340.01016.89
8.3.180.0420.00816.60
8.3.170.0410.00816.58
8.3.160.0400.00516.69
8.3.150.0400.00516.71
8.3.140.0390.00716.77
8.3.130.0360.00716.92
8.3.120.0330.00916.68
8.3.110.0340.00716.72
8.3.100.0350.01116.57
8.3.90.0420.00716.59
8.3.80.0450.00716.44
8.3.70.0380.00916.44
8.3.60.0390.01116.31
8.3.50.0390.00816.84
8.3.40.0350.00917.81
8.3.30.0300.00617.87
8.3.20.0290.00617.98
8.3.10.0320.00717.78
8.3.00.0140.01017.79

preferences:
150.2 ms | 1304 KiB | 7 Q