Asked 3 years ago
20 Jul 2021
Views 519
Leon

Leon posted

How to use PHP stdClass ?

I read about the PHP stdClass , but dont know how to use it ? can anyone help me ?
jaydeep

jaydeep
answered Jul 21 '21 00:00

PHP stdClass is used to create empty class and you can create the property and assign the value dynamically

$phpclass = new stdClass ;
$phpclass->version = 7 ;


we just created new empty class for phpclass and assign property with value for version

Post Answer