3v4l.org

run code in 300+ PHP versions simultaneously
<?php $null = null; echo 'var_export(): ' . var_export($null, true); echo "\n"; echo 'var_dump(): ' . (function($v){ ob_start(); var_dump($v); return ob_get_clean(); })($null); //echo "\n"; echo 'print_r(): ' . print_r($null, true); echo "\n"; echo 'json_encode(): ' . json_encode($null); echo "\n"; echo 'serialize(): ' . serialize($null); echo "\n"; echo 'strval(): ' . strval($null); echo "\n"; echo 'gettype(): ' . gettype($null); echo "\n"; echo 'null coalesce: ' . ($null ?? 'null'); echo "\n"; echo 'ternary: ' . ($null === null ? 'null' : $null); echo "\n"; echo 'condition: ' . (function($v) { if ($v === null) { return 'null'; }})($null);
Output for git.master, git.master_jit, rfc.property-hooks
var_export(): NULL var_dump(): NULL print_r(): json_encode(): null serialize(): N; strval(): gettype(): NULL null coalesce: null ternary: null condition: null

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
101.34 ms | 405 KiB | 5 Q