PHP构造无法正常工作?

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)