Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Debug messages in php (Read 1493 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Debug messages in php
16.01.15 at 11:05:39
 
Debug php code
 
To allow debug messages to be printed when an error in PhP occurs the following lines can be, temporarily, set in the code:
 
error_reporting(-1);
ini_set('display_errors', 'On');
 
To find the class name use:  
class_name($this);
 
To find the calling method use:  
debug_backtrace()[1]['function']
 
The last 3 functions called with class, function and line number information:  
var_dump(debug_backtrace()[0]['class'].".".debug_backtrace()[0]['function'].".".debug_backtrace()[0]['line']);
var_dump(debug_backtrace()[1]['class'].".".debug_backtrace()[1]['function'].".".debug_backtrace()[1]['line']);
var_dump(debug_backtrace()[2]['class'].".".debug_backtrace()[2]['function'].".".debug_backtrace()[2]['line']);
Back to top
 
« Last Edit: 14.11.16 at 10:15:21 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1