Re: [PHP] Type of a variable in PHP

[email protected] (Kevin Peterson)
Newsgroups php.general
Message-ID <CAMZ7rGk7YrmF=LJnY4qSCF+YZ0sbq0AaFKPqanj9SBfD2z5qFw@mail.gmail.com>
Thanks
Nora


On Fri, Mar 15, 2013 at 4:34 PM, Sebastian Krebs <[email protected]>wrote:

>
>
>
> 2013/3/15 Kevin Peterson <[email protected]>
>
>> Have two questions -
>> 1. How to find type of a variable in PHP.
>>
>
> gettype(), or one of the is_*()-functions. But for me more interesting for
> me: Why do you _need_ this?
>
>
>> 2. How to find the type of an array in PHP.
>>
>
> An array is of type array :) is_array() or again gettype().
>
>
> Can you maybe describe what you want to achieve? In a dynamically typed
> language it is rarely _required_, that you know the _concrete_ type.
>
>
>>
>> Please help.
>>
>>
>
>
> --
> github.com/KingCrunch
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.