3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Plugin Name: Stylish Top Author Widget * Plugin URI: http://demo.forsideint.com * Description: Stylish Top Author List Widget in different style. * Version: 1.1 * Author: Forside International * Author URI: http://forsideint.com * License: GPLv2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.html */ /* Do not try to edit any code here. If you try to do this the Plugin will be broken */ /* Modifications in lieu of rediculous disclaimer above by Ardelean Solutions on 2014-06-18 * Changes: Added filters for specific authors */ define('FORSIDE_STYLISH_TOP_AUTHOR_PLUGIN_PATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' ); function forside_stylish_top_author_scripts($hook) { /* Register our script. */ wp_enqueue_style( 'FORSIDE_STYLISH_TOP_AUTHOR_STYLE', FORSIDE_STYLISH_TOP_AUTHOR_PLUGIN_PATH.'stylesheet/css3.css' ); } add_action('wp_enqueue_scripts', 'forside_stylish_top_author_scripts'); //add_action( 'widgets_init', 'forside_stylish_top_author_widget' ); wp_register_sidebar_widget( 'forside_stylish_top_author_widget', // Widget ID 'Stylish Top Author Widget', // Name of the Widget 'forside_stylish_top_authors_widget_display', // Callback Function array( // Options 'description' => 'Stylish Top Authors List' ) ); wp_register_widget_control( 'forside_stylish_top_author_widget', // id 'forside_stylish_top_author_widget', // name 'forside_stylish_top_authors_widget_control'// callback function ); function forside_stylish_top_authors_widget_control($args=array(), $params=array()) { // DB option update if (isset($_POST['submitted'])) { update_option('forside_stylish_top_author_widget_title', $_POST['widgettitle']); update_option('forside_stylish_top_author_widget_title_icon', $_POST['widgettitleicon']); update_option('forside_stylish_top_author_widget_title_icon_width', $_POST['widgettitleiconwidth']); update_option('forside_stylish_top_author_widget_number', $_POST['number']); update_option('forside_stylish_top_author_widget_author_filter', $_POST['authorfilter']); } // Options $widgettitle = get_option('forside_stylish_top_author_widget_title'); $widgettitleicon = get_option('forside_stylish_top_author_widget_title_icon'); $widgettitleiconwidth = get_option('forside_stylish_top_author_widget_title_icon_width'); $number = get_option('forside_stylish_top_author_widget_number'); $authorfilter = get_option('forside_stylish_top_author_widget_author_filter'); ?> <h4>Icon Link For Title : <input type="text" style="width:50%" name="widgettitleicon" value="<?php echo stripslashes($widgettitleicon); ?>" /></h4> <h4>Width of Icon : <input type="text" style="width:60%" name="widgettitleiconwidth" value="<?php echo stripslashes($widgettitleiconwidth); ?>" /></h4> <h4>Title <input type="text" style="width:80%" name="widgettitle" value="<?php echo stripslashes($widgettitle); ?>" /></h4> <h4><strong>Show <input type="text" style="width:55%" name="number" value="<?php echo stripslashes($number); ?>" /> Authors</strong></h4> <h4>Author Filter <input type="text" style="width:80%" name="authorfilter" value="<?php echo stripslashes($authorfilter); ?>" /><br />(Only show author's in this list, and in this order)</h4> </br> <input type="hidden" name="submitted" value="1" /> <?php } function forside_stylish_top_authors_widget_display($args=array(), $params=array()) { // Options Loading $widgettitle = get_option('forside_stylish_top_author_widget_title'); $widgettitleicon = get_option('forside_stylish_top_author_widget_title_icon'); $widgettitleiconwidth = get_option('forside_stylish_top_author_widget_title_icon_width'); $number = get_option('forside_stylish_top_author_widget_number'); $authorfilter = get_option('forside_stylish_top_author_widget_author_filter'); // Widget Output echo stripslashes($args['before_widget']); echo '<div id="stylish_top_author">'; if ($widgettitle != '') { echo stripslashes($args['before_title']);?> <img style="margin-right:5px" width="<?php echo stripslashes($widgettitleiconwidth);?>" src="<?php echo stripslashes($widgettitleicon);?>"/><?php echo stripslashes($widgettitle); echo stripslashes($args['after_title']); } else { echo ""; } ?> <ol> <?php $userArray = array(); if (trim($authorfilter) == '') $userArray = get_users('order=DESC&orderby=post_count&number='.$number.''); else { $userNames = explode( ',', stripslashes($authorfilter) ); $userIDs = array(); foreach ($userNames as $userName) { if ( trim ( $userName ) != '' && count( $userArray ) < $number ) { $userObjects = get_users( array ( 'search' => trim ( $userName ) ) ); $userObject = $userObjects[0]; if ( $userObject != null ) $userArray[] = $userObject; } } #$userArray = $userObjects = get_users( array( 'include' => $userIDs ) ); } foreach ( $userArray as $user ) : ?> <li><a href="<?php echo bloginfo( url )."/author/".$user->user_login; ?>"> <figure> <?php echo get_avatar($user->ID, 100); ?> <figcaption> <h5> <?php echo $user->display_name; ?> </h5> <p style="color:aquamarine">Published <?php echo count_user_posts($user->ID); ?> Posts</p> <p><?php echo $user->description; ?></p> </figcaption> </figure></a> </li> <?php endforeach; ?> </ol> <!-- Stylish Top Author List --> <?php echo '</div> <!-- Stylish Top Author List Widget -->'; echo stripslashes($args['after_widget']); } /* Coding for STYLISH TOP AUTHOR PLUGIN */

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)
8.3.60.0180.00316.75
8.3.50.0070.01318.02
8.3.40.0130.00618.93
8.3.30.0070.00719.07
8.3.20.0040.00420.50
8.3.10.0050.00323.69
8.3.00.0080.00019.14
8.2.180.0100.00718.16
8.2.170.0070.00722.96
8.2.160.0030.01020.35
8.2.150.0000.01624.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00822.09
8.2.110.0110.00020.94
8.2.100.0060.00617.84
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0090.00017.63
8.2.60.0030.00517.79
8.2.50.0060.00318.07
8.2.40.0000.00819.71
8.2.30.0080.00018.21
8.2.20.0000.00817.73
8.2.10.0000.00818.06
8.2.00.0000.00817.88
8.1.270.0000.00823.81
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0060.00321.29
8.1.230.0110.00017.58
8.1.220.0000.00817.88
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0050.00318.42
8.1.160.0040.00422.01
8.1.150.0040.00418.56
8.1.140.0050.00317.48
8.1.130.0030.00317.88
8.1.120.0070.00017.55
8.1.110.0030.00517.50
8.1.100.0040.00417.35
8.1.90.0030.00517.38
8.1.80.0040.00417.37
8.1.70.0000.00717.47
8.1.60.0030.00617.62
8.1.50.0000.00917.36
8.1.40.0090.00017.57
8.1.30.0080.00017.57
8.1.20.0080.00017.51
8.1.10.0050.00317.60
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0000.00718.41
8.0.270.0000.00717.25
8.0.260.0080.00017.21
8.0.250.0060.00317.04
8.0.240.0070.00017.11
8.0.230.0030.00317.11
8.0.220.0000.00716.93
8.0.210.0070.00016.91
8.0.200.0030.00317.00
8.0.190.0070.00017.00
8.0.180.0040.00417.01
8.0.170.0040.00417.07
8.0.160.0040.00416.97
8.0.150.0040.00417.00
8.0.140.0040.00416.98
8.0.130.0060.00013.39
8.0.120.0010.00715.18
8.0.110.0050.00215.21
8.0.100.0040.00415.23
8.0.90.0030.00315.17
8.0.80.0030.00815.32
8.0.70.0030.00515.26
8.0.60.0030.00515.25
8.0.50.0020.00515.18
8.0.30.0110.00615.89
8.0.20.0050.00916.12
8.0.10.0060.00215.20
8.0.00.0060.01015.65
7.4.330.0020.00215.00
7.4.320.0000.00716.60
7.4.300.0000.00616.51
7.4.290.0000.00716.51
7.4.280.0040.00416.56
7.4.270.0040.00416.63
7.4.260.0070.00016.57
7.4.250.0050.00214.88
7.4.240.0020.00515.43
7.4.230.0020.00514.83
7.4.220.0030.00315.02
7.4.210.0070.00715.75
7.4.200.0000.00714.79
7.4.190.0040.00415.05
7.4.180.0040.00413.47
7.4.160.0080.00414.92
7.4.150.0020.01015.34
7.4.140.0070.00816.35
7.4.130.0040.01115.53
7.4.120.0070.00715.43
7.4.110.0100.00614.90
7.4.100.0040.00914.95
7.4.90.0070.00514.92
7.4.80.0090.00416.32
7.4.70.0050.00714.99
7.4.60.0020.00914.93
7.4.50.0010.00614.90
7.4.40.0030.00914.93
7.4.30.0040.00814.76
7.4.20.0070.00013.13
7.4.10.0030.00313.23
7.4.00.0070.00614.42
7.3.330.0000.00513.24
7.3.320.0050.00013.14
7.3.310.0020.00514.89
7.3.300.0030.00514.80
7.3.290.0070.00414.81
7.3.280.0060.00915.56
7.3.270.0070.00615.42
7.3.260.0040.00914.76
7.3.250.0070.00915.38
7.3.240.0080.00414.81
7.3.230.0050.00814.99
7.3.220.0040.00413.15
7.3.210.0090.00314.90
7.3.200.0090.00516.35
7.3.190.0110.00314.90
7.3.180.0030.00914.82
7.3.170.0030.00814.82
7.3.160.0060.00614.83
7.3.150.0000.00513.18
7.3.140.0000.00813.17
7.3.130.0000.00613.35
7.3.120.0060.00514.27
7.3.110.0070.00414.01
7.3.100.0090.00014.00
7.3.90.0030.00814.09
7.3.80.0040.00713.98
7.3.70.0050.00714.22
7.3.60.0060.00514.13
7.3.50.0050.00614.26
7.3.40.0030.00714.18
7.3.30.0040.00813.90
7.3.20.0070.00315.70
7.3.10.0080.00215.70
7.3.00.0060.00515.78
7.2.340.0080.00413.23
7.2.330.0120.00314.80
7.2.320.0100.00714.98
7.2.310.0150.00115.10
7.2.300.0110.00415.02
7.2.290.0100.00615.04
7.2.280.0100.00213.33
7.2.270.0080.00413.34
7.2.260.0130.00013.21
7.2.250.0100.00714.26
7.2.240.0050.01114.14
7.2.230.0100.00413.96
7.2.220.0100.00614.13
7.2.210.0100.00314.21
7.2.200.0070.00514.21
7.2.190.0030.01114.24
7.2.180.0070.00714.24
7.2.170.0050.01114.01
7.2.160.0100.00313.53
7.2.150.0110.00315.17
7.2.140.0100.00315.25
7.2.130.0100.00315.37
7.2.120.0110.00215.34
7.2.110.0080.00515.38
7.2.100.0130.00015.37
7.2.90.0090.00415.37
7.2.80.0090.00415.18
7.2.70.0120.00015.16
7.2.60.0100.00316.08
7.2.50.0100.00315.15
7.2.40.0130.00015.16
7.2.30.0100.00315.31
7.2.20.0070.00715.18
7.2.10.0070.00715.13
7.2.00.0080.00517.29
7.1.330.0060.00714.73
7.1.320.0100.00414.96
7.1.310.0100.00514.77
7.1.300.0030.00815.01
7.1.290.0080.00614.97
7.1.280.0110.00314.98
7.1.270.0080.00514.98
7.1.260.0040.00915.05
7.1.250.0120.00014.07
7.1.240.0040.00914.16
7.1.230.0090.00314.04
7.1.220.0120.00014.13
7.1.210.0040.00814.23
7.1.200.0070.00415.02
7.1.190.0060.00614.23
7.1.180.0120.00014.16
7.1.170.0080.00414.24
7.1.160.0080.00414.16
7.1.150.0070.00714.07
7.1.140.0080.00414.03
7.1.130.0060.00614.17
7.1.120.0090.00514.20
7.1.110.0000.01214.23
7.1.100.0130.00516.01
7.1.90.0100.00214.11
7.1.80.0090.00314.30
7.1.70.0060.00515.69
7.1.60.0050.01316.92
7.1.50.0080.00715.51
7.1.40.0120.00014.17
7.1.30.0060.00614.31
7.1.20.0100.00314.27
7.1.10.0070.00614.18
7.1.00.0050.04118.27
7.0.330.0120.00014.13
7.0.320.0080.00413.96
7.0.310.0120.00014.14
7.0.300.0090.00314.18
7.0.290.0090.00314.17
7.0.280.0090.00614.19
7.0.270.0060.00614.18
7.0.260.0120.00014.00
7.0.250.0080.00514.33
7.0.240.0190.00014.08
7.0.230.0120.00014.21
7.0.220.0060.00614.02
7.0.210.0120.00014.25
7.0.200.0040.00714.53
7.0.190.0090.00314.21
7.0.180.0120.00014.09
7.0.170.0120.00014.22
7.0.160.0090.00314.16
7.0.150.0090.00414.06
7.0.140.0110.03317.99
7.0.130.0080.00414.21
7.0.120.0110.00014.20
7.0.110.0080.00314.02
7.0.100.0080.00414.04
7.0.90.0040.00813.92
7.0.80.0120.00013.94
7.0.70.0090.00314.00
7.0.60.0160.03717.14
7.0.50.0080.03915.96
7.0.40.0030.02817.17
7.0.30.0230.04217.09
7.0.20.0210.04217.09
7.0.10.0110.02017.15
7.0.00.0070.03217.16
5.6.400.0060.00612.74
5.6.390.0060.00612.82
5.6.380.0040.00812.64
5.6.370.0060.00612.34
5.6.360.0060.00612.62
5.6.350.0050.00512.63
5.6.340.0060.00612.62
5.6.330.0080.00412.52
5.6.320.0090.00412.64
5.6.310.0090.00312.67
5.6.300.0100.00212.49
5.6.290.0100.00012.51
5.6.280.0070.04916.91
5.6.270.0110.00012.82
5.6.260.0080.00412.64
5.6.250.0060.00612.46
5.6.240.0140.00012.57
5.6.230.0080.00412.47
5.6.220.0000.01412.82
5.6.210.0080.04516.60
5.6.200.0040.04915.39
5.6.190.0030.03616.64
5.6.180.0130.03516.72
5.6.170.0180.02216.60
5.6.160.0090.03916.60
5.6.150.0070.02315.47
5.6.140.0060.02115.42
5.6.130.0080.03815.37
5.6.120.0050.02516.91
5.6.110.0090.04016.70
5.6.100.0090.02516.68
5.6.90.0080.04516.88
5.6.80.0090.04416.58
5.6.70.0050.00512.80
5.6.60.0060.00612.79
5.6.50.0060.00612.68
5.6.40.0110.00312.66
5.6.30.0050.00812.81
5.6.20.0080.00412.66
5.6.10.0120.00012.58
5.6.00.0040.00812.39
5.5.380.0080.00412.86
5.5.370.0100.00312.77
5.5.360.0090.00312.52
5.5.350.1850.02716.52
5.5.340.0030.05015.23
5.5.330.0110.04016.62
5.5.320.0190.04416.40
5.5.310.0240.04116.58
5.5.300.0080.03815.33
5.5.290.0050.02315.30
5.5.280.0070.03116.79
5.5.270.0110.04016.65
5.5.260.0100.03816.74
5.5.250.0070.04416.65
5.5.240.0090.04016.38
5.5.230.0090.00212.72
5.5.220.0110.00012.45
5.5.210.0070.00312.69
5.5.200.0050.00512.52
5.5.190.0110.00012.51
5.5.180.0100.00212.50
5.5.170.0090.00312.57
5.5.160.0110.00012.52
5.5.150.0080.00412.23
5.5.140.0120.00012.28
5.5.130.0090.00312.36
5.5.120.0060.00612.55
5.5.110.0060.00612.25
5.5.100.0070.00412.80
5.5.90.0070.00412.71
5.5.80.0050.00512.72
5.5.70.0110.00012.54
5.5.60.0120.00012.63
5.5.50.0110.00012.64
5.5.40.0040.00712.64
5.5.30.0050.00512.43
5.5.20.0100.00012.66
5.5.10.0070.00412.53
5.5.00.0070.00412.46
5.4.450.0200.03716.21
5.4.440.0180.03016.09
5.4.430.0220.02016.11
5.4.420.0190.02615.97
5.4.410.0060.03316.02
5.4.400.0150.02815.91
5.4.390.0110.03016.01
5.4.380.0170.02415.70
5.4.370.0160.02115.69
5.4.360.0080.02815.63
5.4.350.0120.03715.78
5.4.340.0040.03415.71
5.4.330.0060.00612.61
5.4.320.0080.02812.64
5.4.310.0050.02512.59
5.4.300.0090.01712.64
5.4.290.0140.02812.64
5.4.280.0120.01612.56
5.4.270.0100.02112.46
5.4.260.0100.02112.51
5.4.250.0070.02312.60
5.4.240.0090.02912.60
5.4.230.0080.03012.50
5.4.220.0130.03612.46
5.4.210.0120.02912.31
5.4.200.0140.02312.27
5.4.190.0090.03312.46
5.4.180.0080.02212.45
5.4.170.0120.02912.35
5.4.160.0060.02512.50
5.4.150.0050.02312.40
5.4.140.0090.01912.38
5.4.130.0070.02012.32
5.4.120.0050.03112.32
5.4.110.0120.02012.33
5.4.100.0090.02512.27
5.4.90.0100.03312.24
5.4.80.0090.03012.35
5.4.70.0080.03412.35
5.4.60.0080.04512.35
5.4.50.0200.03612.37
5.4.40.0070.02612.27
5.4.30.0100.02312.35
5.4.20.0080.02412.32
5.4.10.0080.03312.35
5.4.00.0080.03812.00
5.3.290.0070.02312.95
5.3.280.0080.02912.72
5.3.270.0090.02712.78
5.3.260.0110.03112.90
5.3.250.0070.02412.87
5.3.240.0070.02112.68
5.3.230.0070.02212.72
5.3.220.0080.02312.84
5.3.210.0110.02012.70
5.3.200.0070.02212.65
5.3.190.0100.02912.73
5.3.180.0070.02312.90
5.3.170.0080.02312.90
5.3.160.0090.02812.80
5.3.150.0080.02312.78
5.3.140.0100.01912.90
5.3.130.0040.02712.88
5.3.120.0060.02312.76
5.3.110.0040.02612.75
5.3.100.0060.02312.47
5.3.90.0040.02612.63
5.3.80.0070.02712.47
5.3.70.0090.01812.44
5.3.60.0070.02312.41
5.3.50.0070.02412.52
5.3.40.0060.02412.43
5.3.30.0110.03012.36
5.3.20.0100.02012.23
5.3.10.0060.02212.16
5.3.00.0090.02112.11
5.2.170.0060.01810.64
5.2.160.0070.02410.64
5.2.150.0050.02210.51
5.2.140.0070.01510.61
5.2.130.0060.02310.55
5.2.120.0060.01810.60
5.2.110.0060.01810.56
5.2.100.0070.01710.45
5.2.90.0060.01810.44
5.2.80.0050.03210.47
5.2.70.0070.01810.39
5.2.60.0070.02310.42
5.2.50.0080.01810.50
5.2.40.0060.02110.37
5.2.30.0030.02810.37
5.2.20.0040.02410.40
5.2.10.0070.01610.21
5.2.00.0080.01710.17
5.1.60.0070.0129.40
5.1.50.0050.0199.41
5.1.40.0060.0159.48
5.1.30.0080.0149.65
5.1.20.0060.0189.63
5.1.10.0080.0209.50
5.1.00.0050.0239.42
5.0.50.0050.0128.59
5.0.40.0020.0148.52
5.0.30.0040.0198.43
5.0.20.0040.0148.41
5.0.10.0040.0158.40
5.0.00.0030.0208.40
4.4.90.0040.0127.63
4.4.80.0040.0097.63
4.4.70.0030.0097.62
4.4.60.0040.0087.62
4.4.50.0020.0117.63
4.4.40.0030.0147.60
4.4.30.0030.0097.63
4.4.20.0050.0077.67
4.4.10.0030.0097.67
4.4.00.0010.0167.63
4.3.110.0040.0087.58
4.3.100.0030.0097.58
4.3.90.0020.0107.56
4.3.80.0020.0207.54
4.3.70.0050.0097.56
4.3.60.0050.0127.56
4.3.50.0030.0107.56
4.3.40.0040.0137.52
4.3.30.0020.0116.92
4.3.20.0010.0106.91
4.3.10.0010.0126.89
4.3.00.0030.0139.01

preferences:
69.05 ms | 400 KiB | 5 Q