php - return NULL; vs. return; -


this question has answer here:

i wonder if there differences in php. lets assume have following function(s)

public function myfunc() {     // logic here     return; } 

and here:

public function myfunc2() {      // more logic here      return null; } 

i understand, returning "" (an empty string) different null. var_dump() on each of these functions returns null. internally (bitwise or comparison) somehow handled differently?

does affect parsing-time? practice write return null or more convention?

i didn't studied source code of php, developer i'm using return null when function should return value (by design) , simple return when need leave function not returning value.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -