ArrayAccess::offsetExistsWhether an offset exists Description
abstract public boolean ArrayAccess::offsetExists
( mixed
$offset
)Whether or not an offset exists. This method is executed when using isset or empty on objects implementing ArrayAccess.
Parameters
Return Values
Returns
Examples
Example #1 ArrayAccess::offsetExists example
<?php The above example will output something similar to: Runs obj::offsetExists() string(17) "obj::offsetExists" bool(true) Runs obj::offsetExists() and obj::offsetGet() string(17) "obj::offsetExists" string(14) "obj::offsetGet" bool(false) Runs obj::offsetExists(), *not* obj:offsetGet() as there is nothing to get string(17) "obj::offsetExists" bool(true) |