<?php
// 1
$pessoas = new stdClass;
$pessoas->nome = 'Papa Charlie';
$pessoas = (array) $pessoas;
echo "\n" . $pessoas['nome'] . "\n";
// 2
$pessoas = array( 'nome' => 'Papa Charlie' ); $pessoas = (object) $pessoas;
echo "\n" . $pessoas-> nome;
PD9waHAKCgkvLyAxCgogICAgJHBlc3NvYXMgPSBuZXcgc3RkQ2xhc3M7CiAgICAkcGVzc29hcy0+bm9tZSA9ICdQYXBhIENoYXJsaWUnOwogICAgJHBlc3NvYXMgPSAoYXJyYXkpICRwZXNzb2FzOwoKICAgIHByaW50X3IoICRwZXNzb2FzICk7CgllY2hvICJcbiIgLiAkcGVzc29hc1snbm9tZSddIC4gIlxuIjsKCgoJLy8gMgoKICAgICRwZXNzb2FzID0gYXJyYXkoICdub21lJyA9PiAnUGFwYSBDaGFybGllJyApOwogICAgJHBlc3NvYXMgPSAob2JqZWN0KSAkcGVzc29hczsKICAgIHByaW50X3IoICRwZXNzb2FzICk7CgllY2hvICJcbiIgLiAkcGVzc29hcy0+IG5vbWU7Cg==