Lost in the Code
While reading up on schema-less databases I ran across this example code:
$jack = Dbo::findOne('LostPerson', array('name' => 'Jack'));
$jack->{"skills.surgery"} = 8;
$jack->{"skills.leadership"} = 3;
echo "Jack is a " . $jack->{"skills.surgery"} .
" at surgery...\n";
echo "... but a " . $jack->skills['leadership'] .
" at leadership.\n";
If my code were more like that, maybe some people would actually read the 'boring' posts.
Comments