3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Template Name: Shop Categories Page */ ?> <?php get_header(); ?> <!-- Page Title --> <section id="home" class="xl-py t-center white fullwidth"> <!-- Background image - you can choose parallax ratio and offset --> <div class="bg-parallax" data-stellar-ratio="0.76" data-stellar-vertical-offset="0" data-background="<?php echo get_theme_file_uri('/assets/images/backgrounds/background_1.jpg'); ?>"></div> <!-- Container --> <div class="container relative"> <div class="white skrollr" data-0="opacity:1; transform:translateY(0px);" data-700="opacity:0; transform:translateY(220px);"> <!-- <h5 class="gray4">выбор по категориям</h5> --> <h1 class="firasans">Все категории</h1> </div> </div> <!-- End Container --> </section> <!-- End Page Title --> <?php $args = array( 'taxonomy' => 'product_category', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => true, ); $the_query = new WP_Term_Query($args); ?> <section class="clearfix"> <div class="tab-container sm-my"> <div class="container col-3 gap-10 boxes-type-4 mini-mt white"> <?php foreach($the_query->get_terms() as $category) : ?> <?php $category_url = get_term_link($category->term_id, $category->taxonomy); $image = get_field('image', $category->taxonomy.'_'.$category->term_id); $image = $image['sizes']['product_category']; ?> <!-- Box --> <div class="box"> <a href="<?php echo $category_url; ?>" class="radius cover" data-background="<?php echo $image ?>"> <div class="texts"> <h3 class="bold-title"><?php echo $category->name; ?></h3> </div> </a> </div> <?php endforeach; ?> </div> </div> </section> <?php get_footer(); ?>
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
Fatal error: Uncaught Error: Call to undefined function get_header() in /in/XONEE:6 Stack trace: #0 {main} thrown in /in/XONEE on line 6
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught Error: Call to undefined function get_header() in /in/XONEE:6 Stack trace: #0 {main} thrown in /in/XONEE on line 6
Process exited with code 255.
Output for 5.6.0 - 5.6.40
Fatal error: Call to undefined function get_header() in /in/XONEE on line 6
Process exited with code 255.

preferences:
285.92 ms | 401 KiB | 289 Q