3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* @link https://stackoverflow.com/a/79573960/367456 */ $xxx = null; echo '$xxx: '; var_dump($xxx); # echoes: $xxx: NULL echo gettype($xxx), ': ', var_export($xxx, true), "\n"; # echoes: NULL: NULL echo get_debug_type($xxx), "\n"; # echoes: null $xxx = false; echo '$xxx: '; var_dump($xxx); # echoes: $xxx: bool(false) echo gettype($xxx), ': ', var_export($xxx, true), "\n"; # echoes: boolean: false echo get_debug_type($xxx), "\n"; # echoes: bool $xxx = ''; echo '$xxx: '; var_dump($xxx); # echoes: $xxx: string(0) "" echo gettype($xxx), ': ', var_export($xxx, true), "\n"; # echoes: string: '' echo get_debug_type($xxx), "\n"; # echoes: string

preferences:
28.06 ms | 406 KiB | 5 Q