I'm not experienced in PHP and I'm, using:
error_log("big array:" . print_r($bigArray, true));
to look at what's inside a big array but it looks like the output is cut off before I get to the interesting stuff in the output like so:
...
[4] => Array
(
[id] => 100039235
[start] => 11:00
[end] => 19:00
[punches] => Array
(
[0] => Array
(
[id] => 6319
[comment] =>
Is this expected? Are there other ways or workarounds to get more of the array logged out?
If you check the error INI options in PHP you'll notice there's a log_errors_max_len
option:
Set the maximum length of
log_errors
in bytes. Inerror_log
information about the source is added. The default is 1024 and 0 allows to not apply any maximum length at all. This length is applied to logged errors, displayed errors and also to$php_errormsg
.When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used.
Hence, if you want to use error_log
to output these huge messages, make sure you change log_errors_max_len
to a large number (or 0
for unlimited length).
// Append to the start of your script
ini_set('log_errors_max_len', '0');
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