How to call the static properties of the subclass in the PHP parent class? Oh, my god, if the interviewer asks this question , you will definitely say shit, fucky question. You will say that I rarely do this, and PHP is too casual about static operations. It is troublesome for PHP to call the static properties of the subclass in the parent class. We know that the subclass can use the form of self:: to call the static properties of the parent class. However, if the parent class calls the subclass using self::, it can only call the static properties of the parent class. So, what to do? Is it impossible to do this with php? The answer is of course no. In PHP, you can also use the method called in the parent class using the class name of the subclass.
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn