标签: php oop
为什么要调用类Cars的构造,因为我没有为Cars类创建对象?
<?php class Cars{ function __construct(){ echo "i am cars"; } } class SmallCars extends Cars{ } $car = new SmallCars(); ?>