PHP » PYTHON |
login |
register |
about
|
isinstance(var, int) # Sample function: def is_array(degisken,tip): return isinstance(degisken,tip) # How to use top function php = "sample" print is_array(php,int) -> False print is_array(php,str) -> True sozluk = {"123":"ints","aısjdas":"strs"} print is_array(sozluk,list) -> False print is_array(sozluk,dict) -> True is_int(PHP 4, PHP 5) is_int — Find whether the type of a variable is integer DescriptionFinds whether the type of the given variable is integer.
Parameters
Return ValuesReturns TRUE if var is an integer, FALSE otherwise. Examples
Example #1 is_int() example
<?php The above example will output: is integer bool(true) bool(false) bool(false) bool(false)
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|