3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $where = array( 'user.is_removed' => 0, 'activation_code IS NULL' => NULL); if( true ) { $where = array_merge($where, array( '(user_role.role_id != 1 OR user_role.role_id IS NULL) AND (user_role.parent_role_id != 1 OR user_role.parent_role_id IS NULL)' => NULL )); } // Members should not be able to PM to observers as well if (true) { $where = array_merge($where, array( '(user_role.role_id != 3 OR user_role.parent_role_id != 3)' => null )); } var_dump($where);
Output for 4.3.0 - 7.2.0
array(4) { ["user.is_removed"]=> int(0) ["activation_code IS NULL"]=> NULL ["(user_role.role_id != 1 OR user_role.role_id IS NULL) AND (user_role.parent_role_id != 1 OR user_role.parent_role_id IS NULL)"]=> NULL ["(user_role.role_id != 3 OR user_role.parent_role_id != 3)"]=> NULL }