3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('LANGUAGE_NONE', 'und'); $node = new stdClass(); $node->type = 'tv_show'; if ($node->type == 'tv_show' && !empty($node->field_show_type[LANGUAGE_NONE]) && !empty($node->field_show_type[LANGUAGE_NONE][0]['value'])) { var_export($node->field_show_type[LANGUAGE_NONE][0]['value']); } else { echo "field_show_type is empty\n"; } if ($node->type == 'tv_show' && !empty($node->field_show_type[LANGUAGE_NONE][0]['value'])) { var_export($node->field_show_type[LANGUAGE_NONE][0]['value']); }else { echo "field_show_type is empty\n"; }
based on uBBiQ
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
field_show_type is empty field_show_type is empty