note 46985 deleted from function.settype by didou
| From: | didou@php.net | Date: | Fri, 29 Oct 2004 15:25:49 +0000 |
| Subject: | note 46985 deleted from function.settype by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79316@lists.php.net to get a copy of this message | ||
Note Submitter:
----
<html>
<head>
<title>Listing 4.2 Changing the type of Variable with settype()</title>
</head>
<body>
<?php
$undecided = 3.14;
echo gettype($undecided); // double
echo " is $undecided<br>"; //3.14
settype($Undecided,"string");
echo gettype ($undecided); //string
echo " is $undecided<br>"; //3.14
settype($Undecided,'integer');
echo gettype ($undecided); //integer
echo " is $undecided<br>"; //3
settype($Undecided,'double');
echo gettype ($undecided); //double
echo " is $undecided<br>"; //3
settype($Undecided,'boolean');
echo gettype ($undecided); //boolean
echo " is $undecided<br>"; //1
?>
</body>
</html>
came up as
double is 3.14
double is 3.14
double is 3.14
double is 3.14
double is 3.14
----
Reason: useless example