Jump to content

Trace a function call


NotSureILikePHP

Recommended Posts

I'm assuming this is a function in php, though still not entirely sure what arrows are in coding. Here's the line:

 

if ($filters)
    $custs->filter($filters);
 

[/]

 

$Custs is an object of type customer. Other languages don't have -> but if I'm not mistaken it's a  function. I'm searching the entire project for "function filter" and I get 3 results but none of them are the right location. Only one of them accepts parameters and I know it's not the right code because it never reaches that function. Can someone tell me exactly what I should be looking for?

 

I'm trying to search for a specific customer. However it's searching on customer name = "whatever" rather than customer name like "whatever" and I can't seem to find where it's defined in the code.

Link to comment
https://forums.phpfreaks.com/topic/297409-trace-a-function-call/
Share on other sites

-> is the operator used to access class properties or methods. filter() in this case is a method in the object that $custs references.

 

You can find the full class name to the object $custs is referencing with echo get_class($custs); Then, find that class and you'll find your filter method.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.