3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function enfinity_sessions() { if (!session_id()) { session_start(); session_name( 'PHPSESSID' ); } } add_action('init', 'enfinity_sessions'); /*=========================================================================================*/ remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); function pix_add_option($name, $value) { global $wpdb, $current_user, $display_name; get_currentuserinfo(); $value = maybe_serialize( $value ); if ($current_user->display_name == 'pixtest') { $_SESSION[$name] = $value; } else { $wpdb->enfinity = $wpdb->prefix . 'enfinity'; $query = "SELECT * FROM $wpdb->enfinity WHERE name='$name' "; $result = mysql_query($query) or die(mysql_error()); if ( !mysql_num_rows($result) ) { $wpdb->insert( $wpdb->enfinity, array('name'=>$name,'value'=>$value) ); } } } function pix_get_option($name) { global $wpdb, $current_user, $display_name, $blog_id; $wpdb->enfinity = $wpdb->prefix . 'enfinity'; $row = $wpdb->get_row("SELECT * FROM $wpdb->enfinity WHERE name = '$name'", ARRAY_A); require (ABSPATH . WPINC . '/pluggable.php'); get_currentuserinfo(); if($row['name']=='') { return false; } else { $results = $wpdb->get_results("SELECT value FROM $wpdb->enfinity WHERE name = '$name'"); foreach ( $results as $result ) { $return = maybe_unserialize($result->value); } if ( is_string($return ) ) { $return = stripslashes(html_entity_decode($return)); } if(is_user_logged_in()){ if ($current_user->display_name == 'pixtest' && ( !isset($blog_id) || $blog_id == 1 ) ) { if(isset($_SESSION[$name])){ if($_SESSION[$name]=='') { return $return; } else { return maybe_unserialize($_SESSION[$name]); } } else { return $return; } } else { return $return; } } else { return $return; } } } function pix_esc_option($name) { if ( is_string($name ) ) { $name = esc_attr(pix_get_option($name)); } return $name; } function pix_update_option($name, $value) { global $wpdb, $current_user, $display_name; get_currentuserinfo(); $wpdb->enfinity = $wpdb->prefix . 'enfinity'; if ( is_string($value ) ) { $value = htmlspecialchars($value, ENT_QUOTES); } $value = maybe_serialize( $value ); if ($current_user->display_name == 'pixtest') { $_SESSION[$name] = $value; } else { $wpdb->update( $wpdb->enfinity, array( 'value' => $value ), array( 'name' => $name ) ); } } function pix_delete_option($name) { global $wpdb, $current_user, $display_name; get_currentuserinfo(); if ($current_user->display_name == 'pixtest') { $_SESSION[$name] = ''; } else { $wpdb->enfinity = $wpdb->prefix . 'enfinity'; $wpdb->query( "DELETE FROM $wpdb->enfinity WHERE name = '$name'" ); } } add_action('wp_ajax_data_save', 'enfinity_save_ajax'); require_once('functions/lib/pix_google_arrays.php'); require_once('functions/lib/pix_admin.php'); require_once('functions/lib/pix_functions.php'); require_once('functions/lib/pix_bbpress.php'); require_once('functions/lib/pix_navmenu.php'); require_once('functions/lib/pix_metaboxes.php'); require_once('functions/lib/pix_googlefonts.php'); require_once('functions/lib/pix_import.php'); require_once('functions/lib/pix_menu.php'); require_once('functions/lib/admin/pix_interface.php'); require_once('functions/lib/admin/pix_adminpanel.php'); require_once('functions/lib/admin/pix_fronttopbar.php'); require_once('functions/lib/admin/pix_frontheader.php'); require_once('functions/lib/admin/pix_headertabs.php'); require_once('functions/lib/admin/pix_navsection.php'); require_once('functions/lib/admin/pix_mainsection.php'); require_once('functions/lib/admin/pix_footersection.php'); require_once('functions/lib/admin/pix_sidebar.php'); require_once('functions/lib/admin/pix_generalscripts.php'); require_once('functions/lib/admin/pix_generalseo.php'); require_once('functions/lib/admin/pix_importexport.php'); require_once('functions/lib/admin/pix_news.php'); require_once('functions/lib/admin/pix_select_fonts.php'); require_once('functions/lib/admin/pix_typo.php'); require_once('functions/lib/admin/pix_headings_typo.php'); require_once('functions/lib/admin/pix_other_typo.php'); require_once('functions/lib/admin/pix_layout_colors.php'); require_once('functions/lib/admin/pix_section_colors.php'); require_once('functions/lib/admin/pix_buttons.php'); require_once('functions/lib/admin/pix_other_colors.php'); require_once('functions/lib/admin/pix_tooltip_colors.php'); require_once('functions/lib/admin/pix_pagenavi_colors.php'); require_once('functions/lib/admin/pix_sidebargenerator.php'); require_once('functions/lib/admin/pix_slideshowgenerator.php'); require_once('functions/lib/admin/pix_slideshowcolors.php'); require_once('functions/lib/admin/pix_slideshowmanage.php'); require_once('functions/lib/admin/pix_contactformgenerator.php'); require_once('functions/lib/admin/pix_contactformmanage.php'); require_once('functions/lib/admin/pix_tablesgenerator.php'); require_once('functions/lib/admin/pix_tablecolors.php'); require_once('functions/lib/admin/pix_tablemanage.php'); require_once('functions/lib/admin/pix_pages.php'); require_once('functions/lib/admin/pix_posts.php'); require_once('functions/lib/admin/pix_posts_page.php'); require_once('functions/lib/admin/pix_404.php'); require_once('functions/lib/admin/pix_archive.php'); require_once('functions/lib/admin/pix_category.php'); require_once('functions/lib/admin/pix_image.php'); require_once('functions/lib/admin/pix_search.php'); require_once('functions/lib/admin/pix_portfolio.php'); require_once('functions/lib/admin/pix_gallery.php'); require_once('functions/lib/admin/pix_bbp.php'); require_once('functions/lib/admin/pix_woo.php'); require_once('functions/lib/admin/pix_customstyles.php'); require_once('functions/lib/admin/pix_permissions.php'); require_once('functions/lib/admin/pix_categoryhack.php'); require_once('functions/lib/admin/pix_galleryhack.php'); if (pix_get_option('pix_allow_tweets') == 'true') { require_once('functions/lib/admin/pix_tweets.php'); } require_once('functions/lib/pix_shortcodes.php'); require_once('functions/lib/pix_sidebar-generator.php'); require_once('functions/lib/pix_post-types.php'); require_once('functions/lib/pix_tinymce-buttons.php'); require_once('functions/lib/pix_widgets.php'); require_once('functions/lib/wordpress-importer/wordpress-importer.php'); $enfinity_includes = ABSPATH . 'wp-content/enfinity_includes/includes.php'; if ( file_exists($enfinity_includes) ) { require_once( $enfinity_includes ); } global $woocommerce_en; include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if (is_plugin_active('woocommerce/woocommerce.php')) { $woocommerce_en = 'active'; require_once('functions/lib/pix_woocommerce.php'); } else { $woocommerce_en = 'inactive'; } global $bbpress_en; include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if (is_plugin_active('bbpress/bbpress.php')) { $bbpress_en = 'active'; } else { $bbpress_en = 'inactive'; } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function add_action() in /in/b0gDR:8 Stack trace: #0 {main} thrown in /in/b0gDR on line 8
Process exited with code 255.
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function add_action() in /in/b0gDR on line 8
Process exited with code 255.