Category «PHP»

Append a string into a string

just use ‘.=’ operator Example

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP

PHP 5 allows developers to declare constructor methods for classes. Classes which have a constructor method call this method on each newly-created object, so it is suitable for any initialization that the object may need before it is used.

change to