3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(!$str) { echo 'EMPTY', ','; } else { echo 'NOT EMPTY', ','; } if(empty($str)) { echo 'EMPTY', ','; } else { echo 'NOT EMPTY', ','; } if(!strlen($str)) { echo 'EMPTY', ','; } else { echo 'NOT EMPTY', ','; }
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: str in /in/T16GS on line 2 EMPTY,EMPTY, Notice: Undefined variable: str in /in/T16GS on line 13 EMPTY,
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: str in /in/T16GS on line 2 EMPTY,EMPTY, Notice: Undefined variable: str in /in/T16GS on line 13 EMPTY,