3v4l.org

run code in 300+ PHP versions simultaneously
<?php add_action('widgets_init', 'my_widget_plugin_td_load'); function my_widget_plugin_td_load() { register_widget('my_widget_plugin_td'); } class my_widget_plugin_td extends WP_Widget { function __construct() { parent::__construct( 'my-widget-plugin-vdj', 'Время и Дата', array('description' => 'Время и дата на Java',) ); } /** * Настройка виджета. В данном случае заголовок. * @param array $instance * @return string|void */ public function form($instance) { if (isset($instance['title'])) { $title = $instance['title']; } else { $title = 'Здесь можно указать заголовок виджета'; } ?> <p> <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>"/> </p> <?php } /** * Вывод виджета * @param array $args * @param array $instance */ public function widget($args, $instance) { // $title = apply_filters('widget_title', $instance['title']); $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); echo $args['before_widget']; if (!empty($title)) echo $args['before_title'] . $title . $args['after_title']; // здесь выводим содержимое (форму) echo <<<HTML <div class="cleanslate w24tz-current-time w24tz-small" style="display: inline-block !important; visibility: hidden !important; min-width:100px !important; width:100% !important; min-height:100px !important; text-align:center !important;"><p><a href="//24timezones.com/world_directory/time_in_moscow.php" style="text-decoration: none" class="clock24" id="tz24-1539074187-c1166-eyJob3VydHlwZSI6IjI0Iiwic2hvd2RhdGUiOiIxIiwic2hvd3NlY29uZHMiOiIxIiwiY29udGFpbmVyX2lkIjoiY2xvY2tfYmxvY2tfY2I1YmJjNjg4YmJjZjE1IiwidHlwZSI6ImRiIiwibGFuZyI6InJ1In0=" title="часовой пояс Moscow" target="_blank" rel="nofollow">Текущее время</a></p> <div id="clock_block_cb5bbc688bbcf15"></div> </div> <script type="text/javascript" src="//w.24timezones.com/l.js" async></script> HTML; // конец формы echo $args['after_widget']; } public function update($new_instance, $old_instance) { $instance = array(); $instance['title'] = (!empty($new_instance['title'])) ? strip_tags($new_instance['title']) : ''; return $instance; } } ?>

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.0070.01117.00
8.3.50.0100.00717.79
8.3.40.0060.00918.83
8.3.30.0120.00318.84
8.3.20.0090.00024.18
8.3.10.0070.00324.66
8.3.00.0080.00626.16
8.2.180.0030.01725.92
8.2.170.0000.01418.88
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00319.23
8.2.110.0090.00021.00
8.2.100.0060.00617.84
8.2.90.0060.00317.75
8.2.80.0040.00418.79
8.2.70.0040.00418.04
8.2.60.0090.00318.16
8.2.50.0080.00318.10
8.2.40.0040.00420.73
8.2.30.0000.00819.23
8.2.20.0000.00717.96
8.2.10.0000.00719.11
8.2.00.0040.00419.23
8.1.280.0070.01125.92
8.1.270.0090.00022.24
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.46
8.1.230.0040.00722.75
8.1.220.0000.00717.74
8.1.210.0050.00318.77
8.1.200.0060.00317.25
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0000.00818.52
8.1.160.0000.00718.72
8.1.150.0040.00718.71
8.1.140.0040.00418.86
8.1.130.0040.00420.07
8.1.120.0090.00317.43
8.1.110.0080.00017.38
8.1.100.0000.00717.41
8.1.90.0050.00317.42
8.1.80.0040.00417.35
8.1.70.0000.00817.25
8.1.60.0030.00617.47
8.1.50.0040.00417.41
8.1.40.0000.00817.49
8.1.30.0060.00317.61
8.1.20.0040.00417.62
8.1.10.0040.00817.52
8.1.00.0000.00817.38
8.0.300.0080.00018.77
8.0.290.0060.00816.63
8.0.280.0030.00618.45
8.0.270.0070.00016.82
8.0.260.0030.00318.30
8.0.250.0050.00317.01
8.0.240.0000.00717.06
8.0.230.0040.00416.87
8.0.220.0070.00016.85
8.0.210.0040.00416.85
8.0.200.0070.00016.90
8.0.190.0040.00716.88
8.0.180.0050.00316.86
8.0.170.0040.00416.97
8.0.160.0040.00417.00
8.0.150.0000.01116.90
8.0.140.0040.00416.86
8.0.130.0040.00313.34
8.0.120.0000.00916.83
8.0.110.0070.00016.97
8.0.100.0050.00316.77
8.0.90.0050.00316.91
8.0.80.0080.00916.96
8.0.70.0040.00416.99
8.0.60.0040.00417.00
8.0.50.0080.00016.89
8.0.30.0190.00816.93
8.0.20.0080.00817.04
8.0.10.0130.01016.99
8.0.00.0100.00816.93
7.4.330.0020.00215.55
7.4.320.0060.00016.45
7.4.300.0000.00616.63
7.4.290.0000.00716.30
7.4.280.0030.00516.59
7.4.270.0000.00716.50
7.4.260.0030.00313.21
7.4.250.0070.00016.44
7.4.240.0040.00416.38
7.4.230.0030.00316.23
7.4.220.0050.00316.63
7.4.210.0090.01116.56
7.4.200.0070.00016.49
7.4.160.0000.01416.53
7.4.150.0100.00616.57
7.4.140.0060.01616.64
7.4.130.0070.00716.44
7.4.120.0000.01416.45
7.4.110.0060.00916.41
7.4.100.0080.00816.54
7.4.90.0040.01016.38
7.4.80.0000.01416.54
7.4.70.0060.00816.47
7.4.60.0100.00316.41
7.4.50.0030.01116.41
7.4.40.0110.00316.35
7.4.30.0070.00716.43
7.4.20.0100.01016.38
7.4.10.0030.01216.44
7.4.00.0110.00316.50
7.3.330.0050.00316.25
7.3.320.0000.00513.21
7.3.310.0030.00316.36
7.3.300.0060.00016.21
7.3.290.0070.00916.33
7.3.270.0000.02116.39
7.3.260.0050.01316.36
7.3.250.0150.00016.34
7.3.240.0050.01016.29
7.3.230.0070.01016.36
7.3.220.0120.00316.34
7.3.210.0030.01016.29
7.3.200.0080.00516.23
7.3.190.0000.01416.28
7.3.180.0120.00616.26
7.3.170.0100.00816.30
7.3.160.0070.01316.23
7.3.150.0100.01016.20
7.3.140.0000.01416.20
7.3.130.0040.01116.28
7.3.120.0110.00316.26
7.3.110.0060.01516.23
7.3.100.0130.00616.26
7.3.90.0120.00916.56
7.3.80.0000.01416.23
7.3.70.0080.00616.32
7.3.60.0060.01516.41
7.3.50.0150.00716.41
7.3.40.0070.00716.46
7.3.30.0060.00916.36
7.3.20.0110.00716.42
7.3.10.0090.00616.27
7.3.00.0060.00916.34

preferences:
54.77 ms | 401 KiB | 5 Q