3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = ['staffId' => '1111', 'password' => '']; foreach($data as $key => $val) { $d[$key] = $val; $boolVal[] = ($d[$key] === '') ? FALSE : TRUE; } $valiA = (in_array(FALSE, $boolVal, true)) ? FALSE : TRUE; // if($valiA) { // foreach($data as $key => $val) { // $d[$key] = $val; // $boolval[] = is_numeric($d[$key]); // } // $valiB = (in_array(FALSE, $boolval, true)) ? FALSE : TRUE; // var_dump(($valiB) ? $data : FALSE); // } var_dump($valiA);
based on AJ2MI
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.2.6
bool(false)