“php get variable type” Code Answer

Loading

check type in php

gettype ( mixed $var ) : string

Source: www.php.net

php get variable type

<?php

  $a = 3;
echo gettype($a) . "<br>";

$b = 3.2;
echo 
  gettype($b) . "<br>";

  
$c = "Hello";
echo gettype($c) . "<br>";

$d = array();
echo 
  gettype($d) . "<br>";

$e = array("red", "green", "blue");
echo 
  gettype($e) 
  . "<br>";

$f = NULL;
echo gettype($f) . "<br>";

  
$g = false;
echo gettype($g) . "<br>";
?>
 

Source: www.w3schools.com

find type in php

gettype($u)
Share This
0Shares

0
See also  “php get url parameter” Code Answer

Leave a Reply

Back to top of page

Register / Login

Message from SUPEDIUM


Welcome to SUPEDIUM, to ensure you have seamless experience when browsing our website, we encourage all users to register or login. It only takes less than 2 minutes to register an account :)

Register / Login with Email

Register / Login with Google

This will close in 30 seconds

Sign in

rotate_right

Send Message

image

My favorites

image