suche nach in der

Introduction> <Comments
Last updated: Fri, 25 May 2012

view this page in



add a note add a note User Contributed Notes
Types
jonah_whalehosting_ca
12-Apr-2007 07:33
In reply to Philip, form data could also be an array.  so there are two types you can expect from $_REQUEST (and it's associates): string and array.
arjini at gmail dot com
06-Dec-2005 09:32
Note that you can chain type castng:

var_dump((string)(int)false); //string(1) "0"
shahnaz khan
18-Mar-2005 01:40
if we use gettype() before initializinf any variable it give NULL
for eg.

<?php
$foo
;
echo
gettype($foo);
?>

it will show

NULL
Trizor of www.freedom-uplink.org
30-Jun-2004 03:14
The differance of float and double dates back to a FORTRAN standard. In FORTRAN Variables aren't as loosly written as in PHP and you had to define variable types(OH NOES!). FLOAT or REAL*4 (For all you VAX people out there) defined the variable as a standard precision floating point, with 4 bytes of memory allocated to it. DOUBLE PRECISION or REAL*8 (Again for the VAX) was identical to FLOAT or REAL*4, but with an 8 byte allocation of memory instead of a 4 byte allocation.

In fact most modern variable types date back to FORTRAN, except a string was called a CHARACHTER*N and you had to specify the length, or CHARACHTER*(*) for a variable length string. Boolean was LOGICAL, and there weren't yet objects, and there was support for complex numbers(a+bi).

Of course, most people reading this are web programmers and could care less about the mathematical background of programming.

NOTE: Object support was added to FORTRAN in the FORTRAN90 spec, and expanded with the FORTRAN94 spec, but by then C was the powerful force on the block, and most people who still use FORTRAN use the FORTRAN77.
philip at cornado dot com
06-Jun-2001 09:02
To see if something is numeric (a number) then use is_numeric().  All form data is returned as strings so checking a form value as an integer will return false.

http://www.php.net/is_numeric

Introduction> <Comments
Last updated: Fri, 25 May 2012