<?php
$i=10;
if(gettype($i)=="integer");
echo"$i is integer";
?>
<?php
$i=jyo;
if(is_integer($i))
echo("$i is an integer");
if(is_string($i))
echo("$i is an string");
if(is_double($i))
echo("$i is a double");
?>
10 is integer
Fatal error: Uncaught Error: Undefined constant "jyo" in /in/EKng5:7
Stack trace:
#0 {main}
thrown in /in/EKng5 on line 7
Process exited with code 255.
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
10 is integer
Fatal error: Uncaught Error: Undefined constant "jyo" in /in/EKng5:7
Stack trace:
#0 {main}
thrown in /in/EKng5 on line 7
Process exited with code 255.
10 is integer
Warning: Use of undefined constant jyo - assumed 'jyo' (this will throw an Error in a future version of PHP) in /in/EKng5 on line 7
jyo is an string