3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Get RSS Feed(s) // Get a SimplePie feed object from the specified feed source. $rss = fetch_feed( 'http://applythis.net/RaynerPersonnel/Search/rss/All/1' ); $maxitems = 0; if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly // Figure out how many total items there are, but limit it to 4. $maxitems = $rss->get_item_quantity( 4 ); // Build an array of all the items, starting with element 0 (first element). $rss_items = $rss->get_items( 0, $maxitems ); endif; ?> <div class="nJobs-container Jobs-container--alt"> <?php if ( $maxitems == 0 ) : ?> <span><?php _e( 'No items', 'my-text-domain' ); ?></span> <?php else : ?> <?php // Loop through each feed item and display each item as a hyperlink. ?> <?php foreach ( $rss_items as $item ) : ?> <a href="<?php echo esc_url( $item->get_link() ); ?>" title="rss feed" class="nJobs-job"> <span class="Jobs-role"><?php echo esc_html( $item->get_title() ); ?></span> <span class="Jobs-readmore Button">More info</span> </a> <?php endforeach; ?> <?php endif; ?> </div>
Output for 7.0.0 - 7.2.12
Fatal error: Uncaught Error: Call to undefined function fetch_feed() in /in/8BXhg:4 Stack trace: #0 {main} thrown in /in/8BXhg on line 4
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function fetch_feed() in /in/8BXhg:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function fetch_feed() in /in/8BXhg:4 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.38
Fatal error: Call to undefined function fetch_feed() in /in/8BXhg on line 4
Process exited with code 255.