S
S
slfomin2020-08-04 16:21:29
PHP
slfomin, 2020-08-04 16:21:29

Is it possible to output php method code?

The files of the kernel and some modules of the system are encoded using ionCube, but when the debug mode is enabled, it is required to display the line and the function itself, where the error occurred, however, you cannot handle unencoded files in debug mode, because they are from a remote client.
Is it possible to get the code of a class function in PHP?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nokimaro, 2020-08-05
@slfomin

It all depends on the settings with which the script is encoded
in ioncube, there are separate parameters for controlling the behavior of Reflection.
If you encoded by default and didn’t bother with it, then the None parameter is set and you can’t get anything through Reflection
https://www.ioncube.com/sa/gui_docs/ settings_keys.html

S
Stalker_RED, 2020-08-04
@Stalker_RED

try

$func = new ReflectionFunction('myfunction');
$filename = $func->getFileName();
$start_line = $func->getStartLine();
but no idea what it will output in the case of ionCube

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question