3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php global $data; ?> <?php if ( empty( $data['footer_show'] ) || (!empty( $data['footer_show'] ) && $data['footer_show'] == 'yes') ) { ?> <footer id="footer"> <div class="container"> <?php //var_dump($data['footer_row1_widget_positions']); //var_dump($data['footer_row2_widget_positions']); //var_dump($data['footer_row1_show']); //var_dump($data['footer_row2_show']); if ( !empty ( $data['footer_row1_widget_positions'] ) ) { if ( (!empty ( $data['footer_row1_show'] ) && $data['footer_row1_show'] == 'yes' ) || empty ( $data['footer_row1_show'] ) ) { echo '<div class="row">'; var_dump(); $footer_row1_widget_positions = json_decode($data['footer_row1_widget_positions'],true); $number_of_columns = key( $footer_row1_widget_positions); $columns_array = $footer_row1_widget_positions ; for ($i = 1; $i <= $number_of_columns; $i++) { echo '<div class="span'.$columns_array[$number_of_columns][0][$i-1].'">'; if ( !dynamic_sidebar('Footer row 1 - widget '.$i.'') ) : endif; echo '</div>'; } echo '</div><!-- end row -->'; } } if ( !empty ( $data['footer_row2_widget_positions'] ) ) { if ( (!empty ( $data['footer_row2_show'] ) && $data['footer_row2_show'] == 'yes' ) || empty ( $data['footer_row2_show'] ) ) { echo '<div class="row">'; $number_of_columns = key( json_decode ( $data['footer_row2_widget_positions'] ) ); $columns_array = json_decode ( $data['footer_row2_widget_positions'] ,true ); for ($i = 1; $i <= $number_of_columns; $i++) { echo '<div class="span'.$columns_array[$number_of_columns][0][$i-1].'">'; if ( !dynamic_sidebar('Footer row 2 - widget '.$i.'') ) : endif; echo '</div>'; } echo '</div><!-- end row -->'; } } ?> <div class="row"> <div class="span12"> <div class="bottom fixclear"> <?php if ( isset( $data['footer_social_icons'] ) && is_array( $data['footer_social_icons'] ) && !empty ( $data['footer_social_icons'][0]['footer_social_icon'] ) ) { $icon_class = ''; if( $data['footer_which_icons_set'] == 'colored' ) { $icon_class = 'colored'; } echo '<ul class="social-icons '.$icon_class.' fixclear">'; echo '<li class="title">'.__('GET SOCIAL', THEMENAME ).'</li>'; // Translate foreach ( $data['footer_social_icons'] as $key=>$icon ){ $link = ''; $target = ''; if ( isset ( $icon['footer_social_link'] ) && is_array ( $icon['footer_social_link'] )) { $link = $icon['footer_social_link']['url']; $target = 'target="'.$icon['footer_social_link']['target'].'"'; } echo '<li class="'.$icon['footer_social_icon'].'"><a href="'.$link.'" '.$target.'>'.$icon['footer_social_title'].'</a></li>'; } echo '</ul>'; } ?> <?php if( $data['copyright_text'] || $data['footer_logo'] ) { ?> <div class="copyright"> <?php if( $data['footer_logo'] ) { echo '<a href="'.home_url().'"><img src="'.$data['footer_logo'].'" alt="'.get_bloginfo('name').'" /></a>'; } if( $data['copyright_text'] ) { echo '<p>'.stripslashes($data['copyright_text']).'</p>'; } ?> </div><!-- end copyright --> <?php } ?> </div><!-- end bottom --> </div> </div><!-- end row --> </div> </footer> <?php } ?> </div><!-- end page_wrapper --> <a href="#" id="totop"><?php echo __('TOP', THEMENAME ); ?></a> <?php // Translate ?> <?php wp_footer(); ?> </body> </html>
based on dajD3
Output for 7.0.0 - 7.1.0
<footer id="footer"> <div class="container"> <div class="row"> <div class="span12"> <div class="bottom fixclear"> </div><!-- end bottom --> </div> </div><!-- end row --> </div> </footer> </div><!-- end page_wrapper --> <a href="#" id="totop"> Fatal error: Uncaught Error: Call to undefined function __() in /in/8AIr5:130 Stack trace: #0 {main} thrown in /in/8AIr5 on line 130
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
<footer id="footer"> <div class="container"> <div class="row"> <div class="span12"> <div class="bottom fixclear"> </div><!-- end bottom --> </div> </div><!-- end row --> </div> </footer> </div><!-- end page_wrapper --> <a href="#" id="totop"> Fatal error: Call to undefined function __() in /in/8AIr5 on line 130
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<footer id="footer"> <div class="container"> <div class="row"> <div class="span12"> <div class="bottom fixclear"> </div><!-- end bottom --> </div> </div><!-- end row --> </div> </footer> </div><!-- end page_wrapper --> <a href="#" id="totop"> Fatal error: Call to undefined function: __() in /in/8AIr5 on line 130
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<footer id="footer"> <div class="container"> <div class="row"> <div class="span12"> <div class="bottom fixclear"> </div><!-- end bottom --> </div> </div><!-- end row --> </div> </footer> </div><!-- end page_wrapper --> <a href="#" id="totop"> Fatal error: Call to undefined function: __() in /in/8AIr5 on line 130
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<footer id="footer"> <div class="container"> <div class="row"> <div class="span12"> <div class="bottom fixclear"> </div><!-- end bottom --> </div> </div><!-- end row --> </div> </footer> </div><!-- end page_wrapper --> <a href="#" id="totop"> Fatal error: Call to undefined function: __() in /in/8AIr5 on line 130