codegurukool.com · Free coding tutorials & online compiler

Home › PHP Tutorial › PHP data types

PHP data types

Strings, integers, floats, booleans, arrays and null.

var_dump shows both the type and the value of anything, which makes it the best debugging tool in PHP.

Example code

<?php
var_dump("text");
var_dump(42);
var_dump(3.14);
var_dump(true);
var_dump([1, 2]);
var_dump(null);
?>

Run this code in the online editor

← PHP echo and printPHP strings →