3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(null, false, 0, array(), 'false'); foreach ($array as $heru) { echo '!Isset: ' . (!isset($heru) ? 'True' : 'False') . PHP_EOL; echo '!: ' . (!$heru ? 'True' : 'False') . PHP_EOL; echo 'empty: ' . (empty($heru) ? 'True' : 'False') . PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
!Isset: True !: True empty: True !Isset: False !: True empty: True !Isset: False !: True empty: True !Isset: False !: True empty: True !Isset: False !: False empty: False
Output for 4.3.1 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 6 !Isset: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 7 !: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/aO2Kc on line 8 empty: FalsePHP_EOL
Output for 4.3.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 6 !Isset: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 7 !: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 8 empty: TruePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 6 !Isset: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 7 !: FalsePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LqN8T on line 8 empty: FalsePHP_EOL