3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = NULL; echo "print_r of x:\n"; print_r($x); echo "\n\nis_null of x:\n"; print_r(is_null($x)); echo "\n\nisset of x:\n"; print_r(isset($x)); echo "\n\nprint_r of y:\n"; print_r($y); echo "\n\nis_null of y:\n"; print_r(is_null($y)); echo "\n\nisset of y:\n"; print_r(isset($y));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
print_r of x: is_null of x: 1 isset of x: print_r of y: Warning: Undefined variable $y in /in/6cmAY on line 15 is_null of y: Warning: Undefined variable $y in /in/6cmAY on line 18 1 isset of y:
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 print_r of x: is_null of x: 1 isset of x: print_r of y: Warning: Undefined variable $y in /in/6cmAY on line 15 is_null of y: Warning: Undefined variable $y in /in/6cmAY on line 18 1 isset of y:
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.4 - 7.4.33
print_r of x: is_null of x: 1 isset of x: print_r of y: Notice: Undefined variable: y in /in/6cmAY on line 15 is_null of y: Notice: Undefined variable: y in /in/6cmAY on line 18 1 isset of y:
Output for 7.3.32 - 7.3.33
print_r of x: is_null of x: 1 isset of x: print_r of y: is_null of y: 1 isset of y:

preferences:
157.11 ms | 401 KiB | 135 Q