Jump to content

PHP variables - where did it come from?


josephhh

Recommended Posts

Hi guys,

 

I've a developer for a pretty large website and forum, the database is exploding in size and we are now seeing a grow in the slow log. We want to be able to fix this by optimizing query's but the site is so big, we can't locate the query's themselfs as they are dynamically generated.

 

I want to be able to tail onto the end of the query a comment containing where a function was last called. In the example below, I want the file name and line-number of where add_together() was called.

 

Here is an example for index.php:

 

$a = 1;
$b = 2;

$c = add_together($a, $b);

function add_together($a, $b)
{
    return $a + $b;
}

 

Look forward to your assistance with this!

 

Joe

Link to comment
https://forums.phpfreaks.com/topic/255825-php-variables-where-did-it-come-from/
Share on other sites

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.