class.php代码:
<?php
class test{
public $test;
function _construct(){
$this->test=25;
}
function test(){
echo"test()方法被调用了";
}
}
?>
test.php代码:
<?php
require 'class.php';
$test=new test();
?>
运行test.php:
test()方法被调用了
我的疑问,我并没有调用test()方法,为何他执行了?