Variable Dumping Post Requests in PHP

PHP Logo
PHP manual on var_dump

This is a brilliant way to dump variables to a webserver’s error log in The source of this code snippet is here. This is especially helpful when experimenting with POST requests in barebone environments.

<?php
ob_start();
var_dump($this);
error_log(ob_get_clean());

Updated 30 April 2019
View Source