<?php
 
 
include_once 'QConfig.class.php';
 
include_once 'QTracer.class.php';
 
include_once 'Test.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
 
7 
 
8 total run-time
 
9 total memory usage
 
10 peak memory usage
 
*/
 
QConfig::set("trace_flags","111111111111");
 
 
// 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
 
/*
 
register_tick_function("trace");
 
declare(ticks=2);
 
*/
 
 
$object = new Test();
 
$object->getComposite()->add(array("my"=>"value", "second"=> true));
 
 
$fp = fopen("trace.txt","w");
 
fwrite($fp, print_r(QTracer::get(),true));
 
fclose($fp);
 
 |