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,[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.4.0 - 7.1.0
Notice: Undefined variable: item in /in/V68vY on line 1 Notice: Trying to get property of non-object in /in/V68vY on line 1 Warning: Invalid argument supplied for foreach() in /in/V68vY on line 1
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/V68vY on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/V68vY on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/V68vY on line 3
Process exited with code 255.