3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach ($item->extra_fields as $extraField): ?> <?php if($extraField->value): ?> <?php if(in_array($extraField->id,array(13,14,15))): ?> <li class="type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <span class="moduleItemExtraFieldsLabel"><?php echo $extraField->name; ?></span> <span class="moduleItemExtraFieldsValue"><?php echo $extraField->value; ?></span> <div class="clr"></div> </li> <?php endif; ?> <?php endif; ?> <?php endforeach; ?>
Output for 5.2.1 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: item in /in/51tcd on line 1 Notice: Trying to get property of non-object in /in/51tcd on line 1 Warning: Invalid argument supplied for foreach() in /in/51tcd on line 1
Output for hhvm-3.10.0 - 3.13.2
Notice: Undefined variable: item in /in/51tcd on line 1 Notice: Cannot access property on non-object in /in/51tcd on line 1 Warning: Invalid argument supplied for foreach() in /in/51tcd on line 11
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.2.0
Warning: Invalid argument supplied for foreach() in /in/51tcd on line 1
Output for 4.3.11