Is there a way in PHP to accept undefined variables or at the very least, an array referencing undefined keys, without triggering a warning? For example, like the empty
or isset
functions, as there’s often a need for a function that’s somewhere in the middle of those two in terms of functionality/testing.
I know it’s possible to suppress when calling the function using @ in front of the passed variable, but I’d prefer to have the function do the work without this requirement. Is the only way to create my own PHP extension?