PHP Duck Sample - Head First - Design Patterns - Chapter One

后端 未结 4 1202
春和景丽
春和景丽 2021-01-16 16:03

This is the first question I ask from many others to come.

Someone here might call me crazy because I\'m following the mentioned book in the question\'s Title using

4条回答
  •  被撕碎了的回忆
    2021-01-16 16:32

    It is because when you have the class with the same name of the method, the PHP consider it as a constructor. This is already deprecated in php 7 and it will be discontinued soon. You can see it on the online documentation: http://php.net/manual/en/migration70.deprecated.php

提交回复
热议问题