ExpertRefresh

Variables / New object  

Related Pages

Definition
Variable
Check
Type casting
Array to object
New object


0.0% 100%
 
 
0 pages 298 questions
1) How to create new object?







<?php // create new object $obj = (object) array(); // OR $obj = new stdClass(); $obj->key1 = "value1"; $obj->key2 = "value2"; var_dump($obj); /* object(stdClass)[1] public 'key1' => string 'value1' (length=6) public 'key2' => string 'value2' (length=6) */


References