3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $user_login, $current_user; $user_info = array( 'nothing', 'even more nothing' ); $roles = array ( 'administrator', 'subscriber', ); if (array_intersect( $roles, $user_info)) { echo 'success'; } else { echo 'failure'; } ?>

preferences:
23.96 ms | 404 KiB | 5 Q