PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Tom Schaefer  >  QTracer  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample
Class: QTracer
Get information about the current execution script
Author: By
Last change: change tick value for for hidden trace function operations
Date: 13 years ago
Size: 843 bytes


Class file image Download

include_once 'QConfig.class.php';

QConfig::set("use_trace", true);

bit shift commands 1=on, 0 = off
0 filename
1 traced command
2 start time
3 local run time
4 start code line
5 end code line
6 local memory usage
8 total run-time
9 total memory usage
10 peak memory usage

// on windows you have to run the script from the console
// otherwise apache crashes due to an unsolved php bug.
// uncomment lines below if you know what you are doing

$object = new Test();
$object->getComposite()->add(array("my"=>"value", "second"=> true));

$fp = fopen("trace.txt","w");
fwrite($fp, print_r(QTracer::get(),true));

For more information send a message to info at phpclasses dot org.