Jump to content

initializing variables


xploita

Recommended Posts

I would use isset/empty, unless it is a boolean then you could use if($varname), and for the NULL var, your could do if(is_null($varname))

 

here are some good ways to return true/false values:

 

isset()

is_bool()

is_numeric()

is_float()

is_int()

is_string()

is_object()

is_array()

that's for checking if the variables were initialized or not.

 

still u didn't confirm about initializing them(in the begining of the script)

correct me if i'm wrong.

 

$string ='';

$boolean = true/false;

$array=array();

$int/$double=NULL;

 

what about objects?

 

regards

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.