Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create an empty StdClass object
<?php
$person = (object) array_fill_keys(array('firstname', 'lastname', 'email', 'photo'), '');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment