error_log: Output an Array/Object Value in PHP

,

Code to error_log an array or object value:

error_log( print_r( $VALUE, true ) );

$VALUE in the above code is the variable with array or object value.

Loading spinner

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.