Comments on: Writing to the PHP error_log with var_dump & print_r https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/?utm_source=rss&utm_medium=rss&utm_campaign=writing-to-the-php-error_log-with-var_dump-and-print_r Technology, Travel, and Pictures Tue, 22 Feb 2022 05:32:02 +0000 hourly 1 https://wordpress.org/?v=6.0.1 By: Pothi https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2727 Tue, 22 Feb 2022 05:32:02 +0000 http://justin.ag/?p=2697#comment-2727 Thanks so much. Wanted to output the response headers for the a WordPress function (wp_remote_get). Can’t find better way than this.

]]>
By: james https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2686 Thu, 21 Nov 2019 17:07:27 +0000 http://justin.ag/?p=2697#comment-2686 great stuff. this is a major help.

]]>
By: Dan Doran https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2584 Thu, 26 Jul 2018 20:50:44 +0000 http://justin.ag/?p=2697#comment-2584 Nice write-up! Perhaps another option for your readers: When I need the OOP-related detail of var_dump, then I tend to use:

error_log(var_export($message, true));

]]>
By: Roberto Allende https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2474 Thu, 23 Nov 2017 02:38:03 +0000 http://justin.ag/?p=2697#comment-2474 This is great stuff, thank you very much for sharing!

]]>
By: ravi https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2346 Thu, 11 May 2017 11:23:16 +0000 http://justin.ag/?p=2697#comment-2346 thanks for sharing your knowledge! cheers

]]>
By: Rafael https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2339 Tue, 28 Mar 2017 01:31:22 +0000 http://justin.ag/?p=2697#comment-2339 Nice! Saved on my favorites! thanks!

]]>
By: Justin Silver https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2121 Thu, 21 Apr 2016 16:57:49 +0000 http://justin.ag/?p=2697#comment-2121 In reply to Robert Alexander.

Hi Robert – this is a pretty good explanation of the differences: http://stackoverflow.com/questions/3406171/php-var-dump-vs-print-r

]]>
By: Robert Alexander https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-2120 Thu, 21 Apr 2016 16:04:01 +0000 http://justin.ag/?p=2697#comment-2120 This is a question that was brought up in my Programing Fundamentals class

when should you use a var_dump and when should you use a print_r
could someone help me understand it.

]]>
By: jestine_coats https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-1996 Sat, 19 Dec 2015 03:16:05 +0000 http://justin.ag/?p=2697#comment-1996 Hello! I’ve been following your blog for a long time
now and finally got the courage to go ahead and give you a shout
out from Atascocita Texas! Just wanted to mention keep up the good job!

]]>
By: Stoffo https://www.justinsilver.com/technology/writing-to-the-php-error_log-with-var_dump-and-print_r/#comment-1914 Fri, 05 Jun 2015 10:16:59 +0000 http://justin.ag/?p=2697#comment-1914 Hey man,
very cool and simple trick, helped me a lot recently 🙂

]]>