I'm developing an application using php 5.4 and CodeIgniter 2.1 (but I think this is strictly a php questions). I am expecting a pointer to a stdClass to be returned, but instead I receive a null value.
$this->myLittleTest($myLittlePointer);
// displays "NULL"
echo(gettype($myLittlePointer));
...
function myLittleTest(&$myPtr){
$myPtr = &$this->myLittleClass->myLittleArrayOfStdClasses[0];
// displays "object"
echo(gettype($myPtr));
}
Is there a scope issue causing the pointer to return null? Thanks for your help.