PHP- Simple query logging class is not returning size of array

后端 未结 1 1355
小蘑菇
小蘑菇 2021-01-26 15:59

I am using a simple class to log my sql queries and return the total amount of queries and time taken to execute.

class QueryLogger {

    public $queries = arra         


        
1条回答
  •  独厮守ぢ
    2021-01-26 16:19

    You just forgot the object reference ($this).

    $this->queries[] = microtime(true) - $start;
    

    0 讨论(0)
提交回复
热议问题