3v4l.org

run code in 300+ PHP versions simultaneously
<?php $programs = json_decode($fields['programs']->rawvalue); $class = $fields['programs']->params->get('render_class'); ?> <div class="programs"> <?php foreach($programs as $program) { ?> <div class="program <?php echo $class; ?>"> <?php if(!empty($program->Image)) { ?> <div class="program__image"><?php echo $program->Image; ?></div> <?php } ?> <?php if(!empty($program->Title)) { ?> <h3 class="program__title"><?php echo $program->Title; ?></h3> <?php } ?> <?php if(!empty($program->Synopsis)) { echo $program->Synopsis; } ?> <div class="program__meta"> <ul> <?php if (!empty($program->Duration)) { ?> <li> <strong><?php echo JText::_('MRWC_PROGRAM_DURATION_TITLE'); ?></strong> <?php echo $program->Duration; ?> </li> <?php } ?> <?php if(!empty($program->Size)) { ?> <li> <strong><?php echo JText::_('MRWC_PROGRAM_CLASS_SIZE_TITLE'); ?></strong> <?php echo $program->Size; ?> </li> <?php } ?> <?php if(!empty($program->Duration) || !empty($program->Size)) { // you may wish to check for a non-empty Title too $mailToQuery = http_build_query(['subject' => 'Booking for ' . $program->Title . ' Program']); ?> <li> <a href="mailto:education@name.com?<?php echo $mailToQuery; ?>"> <?php echo JText::_('MRWC_PROGRAM_BOOK_LABEL'); ?> </a> </li> <?php } ?> </ul> </div> </div> <?php } ?> </div>
Output for git.master, git.master_jit
Warning: Undefined variable $fields in /in/JgYpH on line 2 Warning: Trying to access array offset on value of type null in /in/JgYpH on line 2 Warning: Attempt to read property "rawvalue" on null in /in/JgYpH on line 2 Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /in/JgYpH on line 2 Warning: Undefined variable $fields in /in/JgYpH on line 3 Warning: Trying to access array offset on value of type null in /in/JgYpH on line 3 Warning: Attempt to read property "params" on null in /in/JgYpH on line 3 Fatal error: Uncaught Error: Call to a member function get() on null in /in/JgYpH:3 Stack trace: #0 {main} thrown in /in/JgYpH on line 3
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $fields in /in/JgYpH on line 2 Warning: Trying to access array offset on null in /in/JgYpH on line 2 Warning: Attempt to read property "rawvalue" on null in /in/JgYpH on line 2 Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /in/JgYpH on line 2 Warning: Undefined variable $fields in /in/JgYpH on line 3 Warning: Trying to access array offset on null in /in/JgYpH on line 3 Warning: Attempt to read property "params" on null in /in/JgYpH on line 3 Fatal error: Uncaught Error: Call to a member function get() on null in /in/JgYpH:3 Stack trace: #0 {main} thrown in /in/JgYpH on line 3
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
39.63 ms | 401 KiB | 8 Q