📜  如何在 php 代码示例中创建对象

📅  最后修改于: 2022-03-11 14:54:06.750000             🧑  作者: Mango

代码示例5
//define a class
class MyClass{
  //create properties, constructor or methods
}

//create object using "new" keyword
$object = new MyClass();
 
//or wihtout parenthesis
$object = new MyClass;