Skip to content

implement__call in TypedArray, or make a trait with it, or base class, to catch calling $arr->array_* functions #1

@kpion

Description

@kpion

Somewhere, trait or base class, or TypedArray itself:

Must be rewritten but something like this maybe:

public function _call($func, $argv)
{
if (!is_callable($func) || substr($func, 0, 6) !== 'array
')
{
throw new \BadMethodCallException(CLASS.'->'.$func);
}
return call_user_func_array($func, array_merge(array($this->getArrayCopy()), $argv));
}

https://3v4l.org/FPKJP

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions