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. This is especially helpful when experimenting with POST requests in barebone environments.

php
<?php
ob_start();
var_dump($this);
error_log(ob_get_clean());
30 April 2019 — Written
30 April 2019 — Updated
Thedro Neely — Creator
variable-dump-to-error-log.md — Article

More Content

Openring

On the Web

Comments