3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $visibility = 'only_logged_in'; $loggedIn = true; var_dump(($visibility == 'only_logged_in' && $loggedIn) || ($visibility == 'not_logged_in' && !$loggedIn)); $loggedIn = false; var_dump(($visibility == 'only_logged_in' && $loggedIn) || ($visibility == 'not_logged_in' && !$loggedIn)); $visibility = 'not_logged_in'; $loggedIn = true; var_dump(($visibility == 'only_logged_in' && $loggedIn) || ($visibility == 'not_logged_in' && !$loggedIn)); $loggedIn = false; var_dump(($visibility == 'only_logged_in' && $loggedIn) || ($visibility == 'not_logged_in' && !$loggedIn));
Output for 4.3.0 - 7.2.0
bool(true) bool(false) bool(false) bool(true)