3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'xyz'; $password = 'abz'; $email = 'sdfs@example.com'; $isValid = true; if (empty($password)) { echo 'You need to enter a Password'; $isValid = false; } if (empty($username)) { echo 'You need to enter a Username'; $isValid = false; } if (empty($email)) { echo 'You need to enter a Email Address'; $isValid = false; }elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "You need to have a valid Email Address"; $isValid = false; } echo 'Is valid:' . ($isValid ? 'yes' : 'no');

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
165.59 ms | 1994 KiB | 11 Q