3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $page_access = array( 'index' => array('1', '2', '3'), 'users' => array('4', '5', '6') ); function level_access($page){ global $page_access; if (array_key_exists($page, $page_access)) { echo "yes"; } else { echo "no"; } } level_access('index'); function level_access2($page){ global $page_access; if (isset($page_access[$page])) { echo "yes"; } else { echo "no"; } } level_access2('index');
Output for 5.6.38 - 7.3.0rc3
yesyes