add $variable instanceof \ArrayAccess