Skip to content

Instantly share code, notes, and snippets.

@alganet
Last active December 14, 2015 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alganet/5052929 to your computer and use it in GitHub Desktop.
Save alganet/5052929 to your computer and use it in GitHub Desktop.
class Person {
public $name;
public $job;
public $year;
}
$person = new Person;
$person->name = 'Alexandre';
$person->job = 'Batedor de código fonte';
$person->year = new DateTime('2013');
$personArray = (array) $person;
var_dump($personArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment