3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ems_Dhv_Jugend { public function post_submit_meta_box_fum( WP_Post $post ) { global $action; exit(); $post_type = $post->post_type; $post_type_object = get_post_type_object( $post_type ); $can_publish = current_user_can( $post_type_object->cap->publish_posts ); $args = null; if ( post_type_supports( $post_type, 'revisions' ) && 'auto-draft' != $post->post_status ) { $revisions = wp_get_post_revisions( $post->ID ); // We should aim to show the revisions metabox only when there are revisions. if ( count( $revisions ) > 1 ) { reset( $revisions ); // Reset pointer for key() $args = array( 'revisions_count' => count( $revisions ), 'revision_id' => key( $revisions ) ); add_meta_box( 'revisionsdiv', __( 'Revisions' ), 'post_revisions_meta_box', null, 'normal', 'core' ); } } ?> <div class="submitbox" id="submitpost"> <div id="minor-publishing"> <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> <div style="display:none;"> <?php submit_button( __( 'Save' ), 'button', 'save' ); ?> </div> <div id="minor-publishing-actions"> <div id="save-action"> <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> <input <?php if ('private' == $post->post_status) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button" /> <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> <input type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save as Pending' ); ?>" class="button" /> <?php } ?> <span class="spinner"></span> </div> <?php if ( $post_type_object->public ) : ?> <div id="preview-action"> <?php if ( 'publish' == $post->post_status ) { $preview_link = esc_url( get_permalink( $post->ID ) ); $preview_button = __( 'Preview Changes' ); } else { $preview_link = set_url_scheme( get_permalink( $post->ID ) ); $preview_link = esc_url( apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ) ) ); $preview_button = __( 'Preview' ); } ?> <a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview" id="post-preview"><?php echo $preview_button; ?></a> <input type="hidden" name="wp-preview" id="wp-preview" value="" /> </div> <?php endif; // public post type ?> <div class="clear"></div> </div> <!-- #minor-publishing-actions --> <div id="misc-publishing-actions"> <div class="misc-pub-section misc-pub-post-status"><label for="post_status"><?php _e( 'Status:' ) ?></label> <span id="post-status-display"> <?php switch ( $post->post_status ) { case 'private': _e( 'Privately Published' ); break; case 'publish': _e( 'Published' ); break; case 'future': _e( 'Scheduled' ); break; case 'pending': _e( 'Pending Review' ); break; case 'draft': case 'auto-draft': _e( 'Draft' ); break; } } } Ems_Dhv_Jugend::post_submit_meta_box_fum(NULL); ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught Error: Non-static method Ems_Dhv_Jugend::post_submit_meta_box_fum() cannot be called statically in /in/k3Wde:92 Stack trace: #0 {main} thrown in /in/k3Wde on line 92
Process exited with code 255.
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.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Deprecated: Non-static method Ems_Dhv_Jugend::post_submit_meta_box_fum() should not be called statically in /in/k3Wde on line 92 Fatal error: Uncaught TypeError: Argument 1 passed to Ems_Dhv_Jugend::post_submit_meta_box_fum() must be an instance of WP_Post, null given, called in /in/k3Wde on line 92 and defined in /in/k3Wde:3 Stack trace: #0 /in/k3Wde(92): Ems_Dhv_Jugend::post_submit_meta_box_fum(NULL) #1 {main} thrown in /in/k3Wde on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.26
Fatal error: Uncaught TypeError: Argument 1 passed to Ems_Dhv_Jugend::post_submit_meta_box_fum() must be an instance of WP_Post, null given, called in /in/k3Wde on line 92 and defined in /in/k3Wde:3 Stack trace: #0 /in/k3Wde(92): Ems_Dhv_Jugend::post_submit_meta_box_fum(NULL) #1 {main} thrown in /in/k3Wde on line 3
Process exited with code 255.
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Strict Standards: Non-static method Ems_Dhv_Jugend::post_submit_meta_box_fum() should not be called statically in /in/k3Wde on line 92 Catchable fatal error: Argument 1 passed to Ems_Dhv_Jugend::post_submit_meta_box_fum() must be an instance of WP_Post, null given, called in /in/k3Wde on line 92 and defined in /in/k3Wde on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.6
Strict Standards: Non-static method Ems_Dhv_Jugend::post_submit_meta_box_fum() should not be called statically in /in/k3Wde on line 92 Fatal error: Argument 1 passed to Ems_Dhv_Jugend::post_submit_meta_box_fum() must not be null, called in /in/k3Wde on line 92 and defined in /in/k3Wde on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Strict Standards: Non-static method Ems_Dhv_Jugend::post_submit_meta_box_fum() should not be called statically in /in/k3Wde on line 92 Fatal error: Argument 1 must not be null in /in/k3Wde on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/k3Wde on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/k3Wde on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/k3Wde on line 3
Process exited with code 255.

preferences:
328.02 ms | 401 KiB | 456 Q