How to access a PHP resource -
i using third party php module returns php resource:
resource(1, abcresult)
while manual describes how use returned object, not sure how access object?
code this:
$resource = get_new_resource_based_on('this-information');
var_dump($resource)
outputs:
resource(1, abcresult)
the manual states follows:
the method checks username , password of account holder.
the method returns instance of abcresult class.
methods of returned abcresult class instances: success returns true if there user username , password, otherwise – false
an error text if there no user username/password pair.
it returns id if user found same username , password
a resource opaque blob has no inherent meaning. typically represents external resource external library allocated; meaning example if you're editing image gd library, gd library allocates memory somewhere hold image. external resource not "in php", it's not class or object. code still needs way refer external resource; that's resource is.
the resource useful extension/function allocated it. "access" or "do" need use functions can work it. , entirely specific resource , you're supposed it.
Comments
Post a Comment