Answers for "how to create object variable in php"

PHP
4

php define object

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

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 create object variable in php"

Browse Popular Code Answers by Language