Title: Errors and warnings from &#8220;PHP Compatibility&#8221; scan
Last modified: December 4, 2016

---

# Errors and warnings from “PHP Compatibility” scan

 *  [mallard66](https://wordpress.org/support/users/mallard66/)
 * (@mallard66)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/errors-and-warnings-from-php-compatibility-scan/)
 * Hi Mark,
 * I’m starting to plan for PHP 7 migration and ran the “PHP Compatibility” plugin
   on my site. It reported a few warnings and errors:
 *     ```
       Name: MSTW Schedules & Scoreboards
   
       FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-cdt-widget.php
       -----------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       -----------------------------------------------------------------------------------------------------------------------------
        31 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
       -----------------------------------------------------------------------------------------------------------------------------
   
       FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-csv-import-class.php
       ----------------------------------------------------------------------------------------------------------------------------------------
       FOUND 2 ERRORS AFFECTING 2 LINES
       ----------------------------------------------------------------------------------------------------------------------------------------
        565 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
        566 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
       ----------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-globals.php
       ---------------------------------------------------------------------------------------------------------------------------------------
       FOUND 2 ERRORS AFFECTING 2 LINES
       ---------------------------------------------------------------------------------------------------------------------------------------
        24 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
        25 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
       ---------------------------------------------------------------------------------------------------------------------------------------
   
       FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-schedule-widget.php
       ----------------------------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       ----------------------------------------------------------------------------------------------------------------------------------
        28 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
       ----------------------------------------------------------------------------------------------------------------------------------
       ```
   
 * The errors show up also when scanning for PHP 5.5 and 5.6; the warning only shows
   up for PHP 7. Just wanted to make you aware. I’ll not migrate before March 2017
   so no hurry!
 * _**-mallard66**_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mark O’Donnell](https://wordpress.org/support/users/markodonnell/)
 * (@markodonnell)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/errors-and-warnings-from-php-compatibility-scan/#post-8513701)
 * Hallo Anders,
    Wie geht’s dir? I am aware of the class constructor issue – the
   WordPress world has been warning us for some time. I am weeding them out, slowly.
 * I don’t quite understand the __DIR__ warning. This ‘magic constant’ was introduced
   in version 5.3. I’ve encountered issues with it in earlier versions of PHP, but
   it’s supported since 5.3. Maybe have a typo … __dir__ vs. __DIR__. I’ll take 
   a look.
 * Thank you.
    -Mark

Viewing 1 replies (of 1 total)

The topic ‘Errors and warnings from “PHP Compatibility” scan’ is closed to new replies.

 * ![](https://ps.w.org/mstw-schedules-scoreboards/assets/icon-128x128.png?rev=1087789)
 * [MSTW Schedules & Scoreboards](https://wordpress.org/plugins/mstw-schedules-scoreboards/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mstw-schedules-scoreboards/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mstw-schedules-scoreboards/)
 * [Active Topics](https://wordpress.org/support/plugin/mstw-schedules-scoreboards/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mstw-schedules-scoreboards/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mstw-schedules-scoreboards/reviews/)

## Tags

 * [php-7](https://wordpress.org/support/topic-tag/php-7/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mark O’Donnell](https://wordpress.org/support/users/markodonnell/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/errors-and-warnings-from-php-compatibility-scan/#post-8513701)
 * Status: not a support question