Memory Refresh
Php



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) */ stackoverflow.com/questions/1434368/how-to-define-an-empty-object-in-php