- var_dump: documentation ( source)
- debug_backtrace: documentation ( source)
- print_r: documentation ( source)
- var_export: documentation ( source)
- register_tick_function: documentation ( source)
<?php
declare(ticks=1);
function my_function() {
echo print_r(debug_backtrace(), 1) . '<br/>';
}
register_tick_function('my_function', true);
$t = false;
$ar = ['test1' => '111'];
var_dump('->' . __METHOD__ . ' on ' . __FILE__ . ':' . __LINE__);
foreach ($ar as $k => $e) {
$t = ($k === 'test2');
var_dump('$t==='. var_export($t, 1));
if ($t===false) {
continue;
}
var_dump('this line code is not executed (execute "continue")');
test2();
test3(); // this will handled or ..
// test4(); // uncomment this and this will handled (but function not exist)
}
var_dump('->' . __METHOD__ . ' on ' . __FILE__ . ':' . __LINE__);
function test2() {
// this never handled (why? =))
return 1;
}
function test3() {
var_dump('->' . __METHOD__ . ' on ' . __FILE__ . ':' . __LINE__);
}