為什么這個輸出錯誤呢
<?php
class Car {
? ? //增加構造函數與析構函數
? ? function __constuct(){
? ? ? ? print "構造函數被調用 \n";
? ? }
? ? function __destruct(){
? ? ? ? print "析構函數被調用 \n";
? ? }
}
$car = new Car();
unset($car);
<?php
class Car {
? ? //增加構造函數與析構函數
? ? function __constuct(){
? ? ? ? print "構造函數被調用 \n";
? ? }
? ? function __destruct(){
? ? ? ? print "析構函數被調用 \n";
? ? }
}
$car = new Car();
unset($car);
2019-07-01
舉報
2019-07-01
第四行 construct? 少打了r