// autoload require dirname(dirname(dirname(__FILE__))) . '/vendor/autoload.php'; // setup $telltale = new Telltale(); $telltale->pushAgent(new MemoryPeakAgent()); $telltale->pushAgent(new CriticalPathAgent()); $telltale->pushAgent(new SlowestCallsAgent()); $telltale->pushAgent(new MemoryUsageCallsAgent()); $telltale->start(); // ----- some functions function ret_ord($c) { return ord($c); } foreach (str_split('Telltale') as $char) { ret_ord($char); } // ----- recursive calls function factorial($x) { if (0 == $x) { return 1; } return $x * factorial($x - 1); } factorial(10); // ----- high memory usage function highMemory() { str_repeat('elatlleT', rand(1111, 99999)); str_repeat('Telltale', rand(1111, 99999));
<?php //Xdebug_start_trace() $str = "Xdebug"; function ret_ord($c) { return ord($c); } foreach (str_split($str) as $char) { echo $char, ": ", ret_ord($char), "\n"; } //Xdebug_stop_trace();