Answers for "how to declare objects in php"

PHP
7

php define object

$x = new stdClass();
Posted by: Guest on February-19-2020
0

how to create object in php

//define a class
class MyClass{
  //create properties, constructor or methods
}

//create object using "new" keyword
$object = new MyClass();
 
//or wihtout parenthesis
$object = new MyClass;
Posted by: Guest on April-25-2020

Code answers related to "how to declare objects in php"

Browse Popular Code Answers by Language