List Info

Thread: note 78382 added to function.gettype




note 78382 added to function.gettype
user name
2007-10-09 12:06:43
<?php
/*This is a javascript like typeof function that takes the
place of is_...*/
function typeof($x){$type = is_ binary($x)?'binary':is_
bool($x)?'bool':is_ buffer($x)?'buffer':is_
callable($x)?'callable':is_ double($x)?'double':is_
float($x)?'float':is_ int($x)?'int':is_
integer($x)?'integer':is_ long($x)?'long':is_
null($x)?'null':is_ numeric($x)?'numeric':is_
object($x)?'object':is_ real($x)?'real':is_
resource($x)?'resource':is_ scalar ($x)?'scalar':is_ string
($x)?'string':is_ unicode($x)?'unicode':false; return
$type;}

//i.e
$something = array();
echo typof($something);  //returns array

?>

written by Fortune Vieyra, WifiLinx Inc.
----
Server IP: 69.147.83.197
Probable Submitter: 76.193.143.244
----
Manual Page -- htt
p://www.php.net/manual/en/function.gettype.php
Edit        -- https://master
.php.net/note/edit/78382
Del: integrated  -- h
ttps://master.php.net/note/delete/78382/integrated
Del: useless     -- http
s://master.php.net/note/delete/78382/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78382/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78382/spam
Del: non-english -- 
https://master.php.net/note/delete/78382/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78382/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78382
Reject      -- https://mast
er.php.net/note/reject/78382
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


note 78382 deleted from function.gettype by nlopess
user name
2007-10-09 16:25:57
Note Submitter: support at wifilinx dot com 

----

<?php
/*This is a javascript like typeof function that takes the
place of is_...*/
function typeof($x){$type = is_ binary($x)?'binary':is_
bool($x)?'bool':is_ buffer($x)?'buffer':is_
callable($x)?'callable':is_ double($x)?'double':is_
float($x)?'float':is_ int($x)?'int':is_
integer($x)?'integer':is_ long($x)?'long':is_
null($x)?'null':is_ numeric($x)?'numeric':is_
object($x)?'object':is_ real($x)?'real':is_
resource($x)?'resource':is_ scalar ($x)?'scalar':is_ string
($x)?'string':is_ unicode($x)?'unicode':false; return
$type;}

//i.e
$something = array();
echo typof($something);  //returns array

?>

written by Fortune Vieyra, WifiLinx Inc.

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )