Problem
My PHP Stack Trace is abbreviated:
Stack trace:
#0 /www/html/table/app/create.php(128): SoapClient->__call('call', Array)
#1 /www/html/table/app/create.php(128): SoapClient->call('5e81ad4c12668ec...', 'table.ad...', Array)
Expected Outcome
I want to see the part that is hidden by the ... when running php from the command line. How do I make php show the full message?
You can surround it in a try ... catch
and then do a var_dump
on the exception.
try {
// the code that throws an exception
} catch ( Exception $e ) {
var_dump( $e->getTrace() );
}
Had the same issue; apparently PHP by default limits the parameters in a stack trace to 15 bytes. In 8.0 PHP added a new .ini setting zend.exception_string_param_max_len
to expand beyond that default. Add the following to your php.ini and you should get rid of the ellipses:
zend.exception_string_param_max_len=4096
Note that there is an option zend.exception_ignore_args=false
that will hide all these args, so make sure that isn't enabled. See this article for full details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With