Create function for retrieving and casting internal function variables. Added to FILE object, should be used in other types (like MYSQL) aswell.D