3v4l.org

run code in 500+ PHP versions simultaneously
<?php add_action('widgets_init', 'my_widget_plugin_four_buttons'); function my_widget_plugin_four_buttons() { register_widget('my_widget_four_buttons'); } class my_widget_four_buttons extends WP_Widget { function __construct() { parent::__construct( 'my_widget_four_buttons_construct', 'four_buttons', array('description' => 'Widget_four_buttons',) ); } public function widget($args, $instance) { $title = apply_filters('widget_title', $instance['title']); echo $args['before_widget']; if (!empty($title)) echo $args['before_title'] . $title . $args['after_title']; echo ' <div class="container_color_buttons"> <div style="text-align: center;"> <a href="#win3" class="button button-blue">Add-Event</a> </div> <a href="#x" class="overlay" id="win3"></a> <div class="popup popup2"> <p>'; echo do_shortcode('[emefs_submit_event_form]'); echo '</p> <a class="close" title="Close" href="index.html" onclick = "index.html(); return false;"></a> </div> </div> <style> .container_color_buttons { position: relative; display: block; margin: 0 auto; width: 80%; min-width: 172px; background: lightgrey; color: #404040; font: 14px/20px Tahoma, Arial, sans-serif; padding: 0; } .container_color_buttons > .button { margin: 12px; } .button { position: relative; display: inline-block; margin: 5px 0; padding: 0; height: 36px; width: 226px; border: 1px solid; border-radius: 3px; background-clip: padding-box; -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.25); -moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.25); box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.25); color: white; vertical-align: top; text-align: center; text-decoration: none; text-shadow: 0 -1px rgba(0, 0, 0, 0.4); font-size: 14px; line-height: 35px; cursor: pointer; } .rounded-button { border-radius: 18px; } .circular-button { padding: 0; width: 36px; border-radius: 65px 65px 65px 65px; } .button:before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-image: -webkit-radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)); background-image: -moz-radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)); background-image: -o-radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)); background-image: radial-gradient(center top, farthest-corner, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)); content: ""; pointer-events: none; } .button:hover:before { background-image: -webkit-radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)); background-image: -moz-radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)); background-image: -o-radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)); background-image: radial-gradient(farthest-corner, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)); } .button:active { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2); } .button:active:before { content: ""; } .button-blue { border-color: #0d78b6 #0d78b6 #0b689e; background: #1097e6; background-image: -webkit-linear-gradient(top, #25a5f0, #1097e6 66%, #0f8ad3); background-image: -moz-linear-gradient(top, #25a5f0, #1097e6 66%, #0f8ad3); background-image: -o-linear-gradient(top, #25a5f0, #1097e6 66%, #0f8ad3); background-image: linear-gradient(to bottom, #25a5f0, #1097e6 66%, #0f8ad3); } .button-blue:active { border-color: #0b689e #0d78b6 #0d78b6; background: #1097e6; } .button-darkblue { border-color: #2d477b #2d477b #263c68; background: #3b5ca0; background-image: -webkit-linear-gradient(top, #4369b6, #3b5ca0 66%, #365391); background-image: -moz-linear-gradient(top, #4369b6, #3b5ca0 66%, #365391); background-image: -o-linear-gradient(top, #4369b6, #3b5ca0 66%, #365391); background-image: linear-gradient(to bottom, #4369b6, #3b5ca0 66%, #365391); } .button-darkblue:active { border-color: #263c68 #2d477b #2d477b; background: #3b5ca0; } @media only screen and (min-width: 768px) and (max-width: 959px) { .container_color_buttons { width: 100%; } } @media only screen and (max-width: 767px) { .container_color_buttons { width: 95%; } .button { min-width: auto; min-height: auto; font-size: 12px; } } @media only screen and (min-width: 480px) and (max-width: 767px) { .container_color_buttons { width: 70%; } } .overlay { top: 0; right: 0; bottom: 0; left: 0; z-index: 9999; visibility: hidden; background-color: rgba(0, 0, 0, 0.7); opacity: 0; position: fixed; cursor: default; } .overlay:target { visibility: visible; opacity: 1; -webkit-transition: all 0.6s; -moz-transition: all 0.6s; -ms-transition: all 0.6s; -o-transition: all 0.6s; transition: all 0.6s; } .popup2 { height: 600px; border: 1px solid blue; } .popup { top: 0; right: 0; left: 50%; font-size: 14px; font-family: Tahoma, Arial, sans-serif; z-index: 10000; margin: 0 auto; width: 100%; min-width: 320px; max-width: 820px; position: fixed; padding: 15px; border: 1px solid #383838; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; border-radius: 4px; background-color: #FFFFFF; -webkit-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3); -moz-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3); -ms-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3); -o-box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3); box-shadow: 0 15px 20px rgba(0,0,0,.22),0 19px 60px rgba(0,0,0,.3); -webkit-transform: translate(-50%, -150%); -ms-transform: translate(-50%, -150%); -o-transform: translate(-50%, -150%); transform: translate(-50%, -150%); } .overlay:target+.popup { top: 50%; -webkit-transform: translate(-50%,-50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); /* анимируем трансформацию */ -webkit-transition: transform 0.6s ease-out; -moz-transition: transform 0.6s ease-out; -ms-transition: transform 0.6s ease-out; -o-transition: transform 0.6s ease-out; transition: transform 0.6s ease-out; } .close { position: absolute; padding: 0; top: -10px; right: -10px; width: 36px; height: 36px; border: 2px solid #ccc; -webkit-border-radius: 50%; -moz-border-radius: 50%; -ms-border-radius: 50%; -o-border-radius: 50%; border-radius: 50%; background-color: rgba(61, 61, 61, 0.8); -webkit-box-shadow: 0px 0px 10px #000; -moz-box-shadow: 0px 0px 10px #000; box-shadow: 0px 0px 10px #000; text-align: center; text-decoration: none; font-weight: bold; line-height: 20px; -webkit-transition: all ease .8s; -moz-transition: all ease .8s; -ms-transition: all ease .8s; -o-transition: all ease .8s; transition: all ease .8s; } .close:before { color: rgba(255, 255, 255, 0.9); text-shadow: 0 -1px rgba(0, 0, 0, 0.9); font-size: 14px; content: "Закрыть"; } .close:hover { background-color: rgba(252, 20, 0, 0.8); -webkit-transform: rotate(360deg); -moz-transform: rotate(360deg); -ms-transform: rotate(360deg); -o-transform: rotate(360deg); transform: rotate(360deg); } @media only screen and (min-width: 768px) and (max-width: 959px) { .popup { width: 95%; } } @media only screen and (min-width: 320px) and (max-width: 767px) { .popup { width:85%; } } </style> '; echo $args['after_widget']; } public function form($instance) { if (isset($instance['title'])) { $title = $instance['title']; } else { $title = 'Title of widget'; } ?> <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 } 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.5.30.0080.01117.31
8.5.20.0060.01019.30
8.5.10.0100.00916.74
8.5.00.0090.01120.24
8.4.180.0130.01119.66
8.4.170.0120.01120.00
8.4.160.0140.00923.96
8.4.150.0080.00517.89
8.4.140.0110.01017.61
8.4.130.0100.01217.89
8.4.120.0140.01022.15
8.4.110.0130.00922.70
8.4.100.0100.01124.20
8.4.90.0130.00818.61
8.4.80.0100.00419.74
8.4.70.0070.00218.09
8.4.60.0120.01118.88
8.4.50.0080.01118.78
8.4.40.0130.00719.57
8.4.30.0100.00920.32
8.4.20.0110.00725.96
8.4.10.0090.00921.30
8.3.300.0100.01120.93
8.3.290.0150.00620.90
8.3.280.0160.00620.09
8.3.270.0100.00916.52
8.3.260.0140.00516.79
8.3.250.0130.00619.01
8.3.240.0050.00416.63
8.3.230.0060.00816.57
8.3.220.0100.00818.82
8.3.210.0080.00818.55
8.3.200.0050.00416.69
8.3.190.0060.00317.01
8.3.180.0080.00217.29
8.3.170.0140.00620.84
8.3.160.0070.01120.15
8.3.150.0040.00417.18
8.3.140.0000.00817.05
8.3.130.0080.00018.49
8.3.120.0090.00019.27
8.3.110.0070.01120.94
8.3.100.0030.00724.06
8.3.90.0030.00526.77
8.3.80.0030.00616.88
8.3.70.0070.00716.58
8.3.60.0140.00416.50
8.3.50.0100.00724.55
8.3.40.0120.00618.83
8.3.30.0170.00318.84
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0050.00326.16
8.2.300.0100.01022.20
8.2.290.0100.00520.53
8.2.280.0140.00718.73
8.2.270.0110.00816.94
8.2.260.0000.00816.77
8.2.250.0090.00618.66
8.2.240.0120.00316.82
8.2.230.0100.00022.58
8.2.220.0040.00437.54
8.2.210.0150.00326.77
8.2.200.0090.00016.50
8.2.190.0100.01016.63
8.2.180.0080.00825.92
8.2.170.0110.00418.79
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0080.00024.66
8.2.130.0040.01126.16
8.2.120.0070.00019.64
8.2.110.0030.00622.04
8.2.100.0080.00417.59
8.2.90.0040.00417.75
8.2.80.0040.00418.54
8.2.70.0080.00017.63
8.2.60.0040.00417.63
8.2.50.0000.00817.80
8.2.40.0050.00319.35
8.2.30.0040.00418.05
8.2.20.0000.00718.19
8.2.10.0040.00419.25
8.2.00.0000.00819.23
8.1.340.0110.00919.88
8.1.330.0120.00721.82
8.1.320.0110.00818.07
8.1.310.0040.01418.33
8.1.300.0040.00717.98
8.1.290.0060.00330.84
8.1.280.0140.00725.92
8.1.270.0090.00023.99
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00018.78
8.1.230.0070.00422.07
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.13
8.1.190.0030.00517.23
8.1.180.0030.00619.01
8.1.170.0050.00317.62
8.1.160.0000.00718.82
8.1.150.0040.00418.75
8.1.140.0060.00318.73
8.1.130.0030.00320.10
8.1.120.0040.00417.43
8.1.110.0040.00417.42
8.1.100.0000.00817.34
8.1.90.0000.00717.28
8.1.80.0040.00717.43
8.1.70.0030.00317.39
8.1.60.0040.00417.55
8.1.50.0080.00017.44
8.1.40.0040.00417.56
8.1.30.0040.00417.75
8.1.20.0030.00617.57
8.1.10.0090.00317.44
8.1.00.0050.00317.36
8.0.300.0040.00418.77
8.0.290.0080.00416.75
8.0.280.0070.00020.13
8.0.270.0030.00317.98
8.0.260.0060.00018.39
8.0.250.0040.00416.93
8.0.240.0000.00717.02
8.0.230.0040.00417.05
8.0.220.0030.00316.98
8.0.210.0030.00516.96
8.0.200.0000.00717.01
8.0.190.0040.00416.95
8.0.180.0020.00517.02
8.0.170.0000.00917.02
8.0.160.0040.00417.00
8.0.150.0060.00316.85
8.0.140.0040.00416.89
8.0.130.0030.00313.37
8.0.120.0040.00417.01
8.0.110.0030.00516.91
8.0.100.0050.00216.91
8.0.90.0020.00517.03
8.0.80.0090.00616.90
8.0.70.0040.00416.99
8.0.60.0000.00716.83
8.0.50.0040.00416.76
8.0.30.0090.00916.91
8.0.20.0150.00817.15
8.0.10.0000.00717.07
8.0.00.0040.01416.83
7.4.330.0050.00015.55
7.4.320.0000.00716.50
7.4.300.0000.00616.45
7.4.290.0050.00216.66
7.4.280.0040.00416.61
7.4.270.0050.00316.50
7.4.260.0060.00013.19
7.4.250.0030.00316.51
7.4.240.0000.00716.49
7.4.230.0050.00316.69
7.4.220.0000.00716.25
7.4.210.0100.00616.60
7.4.200.0050.00216.62
7.4.130.0110.00916.48
7.4.120.0100.01016.72
7.4.110.0030.01316.31
7.4.100.0110.01116.38
7.4.90.0060.01216.39
7.4.80.0200.01116.39
7.4.70.0160.00516.53
7.4.60.0210.00416.51
7.4.50.0310.00016.52
7.4.40.0070.01316.48
7.4.30.0170.00316.52
7.4.20.0150.00816.53
7.4.10.0030.02016.59
7.4.00.0130.01016.70
7.3.330.0040.00416.34
7.3.320.0020.00513.36
7.3.310.0040.00416.24
7.3.300.0040.00416.36
7.3.290.0040.01216.37
7.3.280.0130.00616.38
7.3.260.0120.00916.41
7.3.230.0070.01016.25
7.3.210.0100.01316.34
7.3.200.0240.00916.28
7.3.190.0260.00516.52
7.3.180.0100.01516.34
7.3.170.0230.01216.33
7.3.160.0200.00816.49
7.3.150.0180.01016.39
7.3.140.0270.00316.42
7.3.130.0240.00316.56
7.3.120.0180.01016.34
7.3.110.0210.01216.21
7.3.100.0230.01216.29
7.3.90.0200.01216.25
7.3.80.0200.01216.71
7.3.70.0170.01416.31
7.3.60.0210.00516.43
7.3.50.0210.00716.38
7.3.40.0030.02216.31
7.3.30.0090.01516.48
7.3.20.0420.03016.27
7.3.10.0340.02116.41
7.3.00.0300.02616.31
7.2.330.0060.01216.53
7.2.320.0220.01016.63
7.2.310.0290.00316.37
7.2.300.0240.00816.61
7.2.290.0180.00616.29
7.2.280.0210.00816.63
7.2.270.0230.00716.68
7.2.260.0200.00716.62
7.2.250.0140.01816.55
7.2.240.0260.01116.26
7.2.230.0130.02016.56
7.2.220.0330.00716.59
7.2.210.0190.00816.51
7.2.200.0220.01316.34
7.2.190.0180.01216.41
7.2.180.0170.00916.28
7.2.170.0190.00616.34
7.2.160.0280.02616.38
7.2.150.0360.01716.46
7.2.140.0250.00416.35
7.2.130.0210.01116.54
7.2.120.0340.01516.53
7.2.110.0130.01616.44
7.2.100.0270.01116.43
7.2.90.0210.00916.40
7.2.80.0180.00916.20
7.2.70.0120.01216.34
7.2.60.0180.00716.46
7.2.50.0140.00716.44
7.2.40.0150.00716.30
7.2.30.0140.01116.58
7.2.20.0350.02116.36
7.2.10.0100.01416.30
7.2.00.0290.00016.34

preferences:
51.03 ms | 1504 KiB | 5 Q