PHP4-style constructors still work on PHP7, they are just been deprecated and they will trigger a Deprecated warning.
What you can do is define a __construct method, even an empty one, so that the php4-constructor method won’t be called on a newly-created instance of the class.
class foo{
function foo(){
// Constructor's functionality here, if you have any.
}
}
Change to:
class foo{
function __construct(){
// Constructor's functionality here, if you have any.
}
}
Revisions
- May 31, 2017 @ 06:19:15 [Current Revision] by PeterLugg
- May 31, 2017 @ 06:19:15 by PeterLugg
No comments yet.