You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A possible rather simple solution to issues like #111 and #115.
My initial thought was to scan the op_array for opcodes like NEW, INIT_FCALL etc to find dependencies. However, these opcodes all have different operand layouts, making it particularly inconvenient to retrieve dependencies.
A simpler option, though a bit uglier, is to just scan op_array->literals for IS_STRING zvals and then check if there are any functions or classes in the current file with the same name. This might end up copying some irrelevant stuff in some cases (if a user string happens to have the same name as a function declared in the current file), but would probably be much more robust and require less maintenance.
The text was updated successfully, but these errors were encountered:
A possible rather simple solution to issues like #111 and #115.
My initial thought was to scan the op_array for opcodes like NEW, INIT_FCALL etc to find dependencies. However, these opcodes all have different operand layouts, making it particularly inconvenient to retrieve dependencies.
A simpler option, though a bit uglier, is to just scan op_array->literals for IS_STRING zvals and then check if there are any functions or classes in the current file with the same name. This might end up copying some irrelevant stuff in some cases (if a user string happens to have the same name as a function declared in the current file), but would probably be much more robust and require less maintenance.
The text was updated successfully, but these errors were encountered: