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');
Output for git.master, git.master_jit, rfc.property-hooks
Is valid:yes

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
122.92 ms | 1361 KiB | 4 Q