<?php
$var1=2 ;
echo ("the variable is ".gettype($var1)) ;
$var2=settype($var1,boolean) ;
echo ("the variable is ".gettype($var2)) ;
?>
error
the variable is integer
Notice: Use of undefined constant boolean - assumed 'boolean' in I:\wamp\www\phpdatatype.php on line 7
the variable is boolean.
Also if use boolean Typecast i get error for undefined function .
Whats the reason ?
$var1=2 ;
echo ("the variable is ".gettype($var1)) ;
$var2=settype($var1,boolean) ;
echo ("the variable is ".gettype($var2)) ;
?>
error
the variable is integer
Notice: Use of undefined constant boolean - assumed 'boolean' in I:\wamp\www\phpdatatype.php on line 7
the variable is boolean.
Also if use boolean Typecast i get error for undefined function .
Whats the reason ?