We have a function that is being defined on a host but not locally which is causing a name collision. The function is go() and it's in Kirby and somewhere else. When we deploy to Vercel we get an error saying go() is already defined. This is not an issue locally or on other hosts (we tried Dreamhost as an example).
We tried this to find where the original is called:
$reflFunc = new ReflectionFunction('function_name');
print $reflFunc->getFileName() . ':' . $reflFunc->getStartLine();
But we get literally: :
As if it's not defined. If we wrap the function in if (!function_exists('go')) it does break for other reasons but the redeclaration error is alleviated so we know the function exists but we can't find it.
In JavaScript you can do like console.log(someFunction) and it'll output the function in string form. Example:
Can we do this in PHP? This would allow us to try to at least search for the code signature in the project or on the web to find what code is colliding.

I thought the go function was in an extension so your way to do it with ReflectionFunction was not found. The ReflectionFunction class has lots of get functions to get information about the function, you can call all of them to see more information and maybe luckily smile at you.
I tried a function
mysqli_queryin the mysql extension and it didn't find filename or fileline either but it gave me the function list when I called$ref->getExtension();