Title: PHP 7 compatibility
Last modified: July 26, 2017

---

# PHP 7 compatibility

 *  Resolved [Adrian](https://wordpress.org/support/users/adriandw/)
 * (@adriandw)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-7-compatibility-194/)
 * I am planning to upgrade my site to PHP 7.
    The PHP compatibility checker reports
   this
 *     ```
       FILE: /wp-content/plugins/osm/osm.php
       -------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       -------------------------------------
        207 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
       -------------------------------------
       ```
   
 * Can you fix this?
    thanks

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

 *  Plugin Author [MiKa](https://wordpress.org/support/users/photoweblog/)
 * (@photoweblog)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-compatibility-194/#post-9722954)
 * Can you post the warning based on the latests WP OSM Plugin version?
 *  [jhaand](https://wordpress.org/support/users/jhaand/)
 * (@jhaand)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-compatibility-194/#post-9734799)
 * We see the following error.
 * Deprecated: Methods with the same name as their class will not be constructors
   in a future version of PHP; Osm has a deprecated constructor in /home/vhosts/
   caminostones.com/httpdocs/wordpress/wp-content/plugins/osm/osm.php on line 206
 * Change
 * > class Osm
   >  {
   >  function Osm() {
 * To
 * >  class Osm
   >  {
   >  function __construct() {
 * Also see the manual.
    [http://php.net/manual/en/language.oop5.decon.php](http://php.net/manual/en/language.oop5.decon.php)
 *  Plugin Author [MiKa](https://wordpress.org/support/users/photoweblog/)
 * (@photoweblog)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/php-7-compatibility-194/#post-9985155)
 * Thanks for the lines … was fixed in an previous versin.

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

The topic ‘PHP 7 compatibility’ is closed to new replies.

 * ![](https://ps.w.org/osm/assets/icon-256x256.png?rev=2087144)
 * [OSM - OpenStreetMap](https://wordpress.org/plugins/osm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/osm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/osm/)
 * [Active Topics](https://wordpress.org/support/plugin/osm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/osm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/osm/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [MiKa](https://wordpress.org/support/users/photoweblog/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/php-7-compatibility-194/#post-9985155)
 * Status: resolved