rit*_*tch -4 php oop constructor class
我有以下代码:
<?php
class Human()
{
function __construct()
{
echo "A human was born";
}
}
$Person1 = new Human();
?>
Run Code Online (Sandbox Code Playgroud)
我试图打印出"人类出生",但它只是没有它!
Roc*_*mat 10
删除()后class Human.
<?php
class Human
{
function __construct()
{
echo "A human was born";
}
}
$Person1 = new Human();
?>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1104 次 |
| 最近记录: |