3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = ['staffId' => '1111', 'password' => 'aaaa']; function data_foreach($data) { foreach($data as $key => $val) { $d[$key] = $val; if($d[$key] === '') { $boolVal[] = FALSE; } else { if(!is_numeric($d[$key])) { $boolVal[] = FALSE; } else { $boolVal[] = TRUE; } } } return (in_array(FALSE, $boolVal, true)) ? FALSE : TRUE; } var_dump(data_foreach($data));
based on J681j
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.0rc6
bool(false)