Title: bug deprecated php 4 / problems with php7
Last modified: August 25, 2018

---

# bug deprecated php 4 / problems with php7

 *  Resolved [nautrino](https://wordpress.org/support/users/nautrino/)
 * (@nautrino)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/bug-deprecated-php-4-problems-with-php7/)
 * Hi,
    this is what our expert says – I hope it helps:
 * The author is using deprecated PHP 4 syntax that will fail after PHP 7.
 * They need to use proper, defensive syntax that will remain compatible with PHP
   4 (if that’s what they are aiming for) while at the same time protecting their
   client against future site failures. Specifically code like this:
 * class QuadMenu_Widget extends WP_Widget {
    function QuadMenu_Widget() { $widget_ops
   = array(‘classname’ => ‘widget_quadmenu_widget’, ‘description’ => esc_html__(‘
   A widget that displays the menu in the sidebar.’, ‘quadmenu’)); $control_ops 
   = array(‘width’ => 200, ‘height’ => 250, ‘id_base’ => ‘quadmenu_widget’); parent::
   __construct(‘quadmenu_widget’, esc_html__(‘QuadMenu Widget’, ‘quadmenu’), $widget_ops,
   $control_ops); }
 * needs to be enhanced for full PHP 7+ support to:
 * class QuadMenu_Widget extends WP_Widget {
 *  function __construct() {
    self::QuadMenu_Widget(); }
 *  function QuadMenu_Widget() {
    $widget_ops = array(‘classname’ => ‘widget_quadmenu_widget’,‘
   description’ => esc_html__(‘A widget that displays the menu in the sidebar.’,‘
   quadmenu’)); $control_ops = array(‘width’ => 200, ‘height’ => 250, ‘id_base’ 
   => ‘quadmenu_widget’); parent::__construct(‘quadmenu_widget’, esc_html__(‘QuadMenu
   Widget’, ‘quadmenu’), $widget_ops, $control_ops); }
 * As long as a class has a proper PHP 5+ constructor BEFORE the old PHP 4- constructor(
   using the class name as a method name), PHP7 will suppress the warning “Deprecated:
   Methods with the same name as their class will not be constructors in a future
   version of PHP;”

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/bug-deprecated-php-4-problems-with-php7/#post-10628665)
 * Hello mate
 * Thanks for the detailed bug report
 * We will get into this issue
 * Regards
 *  Plugin Author [quadlayers](https://wordpress.org/support/users/quadlayers/)
 * (@quadlayers)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/bug-deprecated-php-4-problems-with-php7/#post-10638219)
 * Solven on latest update
 *  Thread Starter [nautrino](https://wordpress.org/support/users/nautrino/)
 * (@nautrino)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/bug-deprecated-php-4-problems-with-php7/#post-10641035)
 * thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘bug deprecated php 4 / problems with php7’ is closed to new replies.

 * ![](https://ps.w.org/quadmenu/assets/icon-256x256.jpg?rev=2916917)
 * [QuadMenu - Mega Menu](https://wordpress.org/plugins/quadmenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quadmenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quadmenu/)
 * [Active Topics](https://wordpress.org/support/plugin/quadmenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quadmenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quadmenu/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [nautrino](https://wordpress.org/support/users/nautrino/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/bug-deprecated-php-4-problems-with-php7/#post-10641035)
 * Status: resolved