← CodePrimer
PHP
Beginner
Debugging
Debug with var_dump
How do I inspect a variable’s type?
var_dump().
<?php
$user = ['name' => 'Ada', 'year' => 1];
var_dump($user);
Notes
Remove debug dumps before production.
Keywords: var_dump · debug · type
Related
PHP
Embed PHP inside HTML
How do I mix PHP and HTML?
PHP
PHP comments
How do I write comments in PHP?
PHP
PHP variable rules
What are the rules for PHP variables?
PHP
echo vs print
Should I use echo or print?
PHP
PHP scalar data types
What data types does PHP have?
PHP
Common PHP string functions
How do I count, reverse, or replace text?