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); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.240.0030.03719.08
5.4.230.0170.05019.22
5.4.220.0600.03719.26
5.4.210.2100.03319.09
5.4.200.2230.04319.05
5.4.190.2330.04319.23
5.4.180.2400.03318.86
5.4.170.2130.03018.86
5.4.160.2300.03719.14
5.4.150.2300.04719.29
5.4.140.2300.04016.37
5.4.130.2400.03716.66
5.4.120.2270.03716.45
5.4.110.2370.04016.29
5.4.100.2100.03316.38
5.4.90.1900.03716.47
5.4.80.2230.04316.59
5.4.70.2330.04316.46
5.4.60.2400.04016.55
5.4.50.2300.03716.35
5.4.40.2370.03716.35
5.4.30.2630.03316.18
5.4.20.2200.04016.44
5.4.10.2130.03316.50
5.4.00.2130.03715.79
5.3.280.2230.04014.59
5.3.270.2270.03314.62
5.3.260.2170.03714.61
5.3.250.2600.04314.71
5.3.240.2670.04014.55
5.3.230.2630.04314.60
5.3.220.2170.04714.50
5.3.210.2070.03714.71
5.3.200.2270.03714.60
5.3.190.0300.03714.50
5.3.180.0000.05014.71
5.3.170.0030.03714.74
5.3.160.0570.03314.50
5.3.150.2070.03014.50
5.3.140.2130.04014.52
5.3.130.2200.03314.65
5.3.120.2130.04014.50
5.3.110.2200.03314.55
5.3.100.2600.04014.05
5.3.90.1870.03714.10
5.3.80.2070.03013.97
5.3.70.2200.03314.19
5.3.60.2300.03314.08
5.3.50.2300.03313.90
5.3.40.2530.04313.89
5.3.30.2070.03714.02
5.3.20.2200.04713.94
5.3.10.2230.03013.83
5.3.00.2300.03013.68

preferences:
152.63 ms | 1394 KiB | 7 Q