Type casting

27/07/2011 at 4:15 pm Leave a comment


Type casting em PHP funciona praticamente como em C:

$a = 10; # $a é um inteiro

$b = (double) $a; # $b é um double

(int), (integer) Converte para inteiro

(real), (double), (float) Converte para double

(string) Converte para string

(array) Converte para array

(object) Converte para objeto

Entry filed under: MYSQL. Tags: , , , , , , , .

tipos de imagem Bacterioses

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed



%d bloggers like this: