This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
php-upgrade-cheatsheet [2018/01/04 06:07] serbizadmin [Cheatsheet for Upgrading PHP Sites] |
php-upgrade-cheatsheet [2018/01/04 06:19] malvin |
||
---|---|---|---|
Line 5: | Line 5: | ||
Not that many organizations are prepared to deal with the change. So the [[https:// | Not that many organizations are prepared to deal with the change. So the [[https:// | ||
===== PHP 5.x to 7 ===== | ===== PHP 5.x to 7 ===== | ||
+ | Deprecated functions in php5 | ||
+ | **Sample** | ||
+ | |||
+ | < | ||
+ | |||
+ | class Sample { | ||
+ | |||
+ | | ||
+ | |||
+ | echo 'Hello World'; | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | ?></ | ||
+ | |||
+ | **Fix for php7** | ||
+ | |||
+ | if your class has a constructor having the same name as your class name, then it is now deprecated in PHP 7. Change constructor to < | ||
+ | |||
+ | Sample | ||
+ | |||
+ | < | ||
+ | |||
+ | class Sample{ | ||
+ | |||
+ | | ||
+ | |||
+ | echo 'Hello World!'; | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | ?></ | ||
===== See Also===== | ===== See Also===== | ||
* [[http:// | * [[http:// |