return diference
#1

hi I wanna know wath is the diffrence betwen

PHP код:
if( fexist(fname)) return Slot++; 
AND
PHP код:
if( fexist(fname)) Slot++; 
wath is better
Sorry for bad english;
Reply
#2

If you use 'return' the script will stop at that line of that function, if you don't, the script will continue.
Reply
#3

When it's return a 'value' or something else(ex: function, etc.) in a command, the command will stop if it reads return.
Reply
#4

Ok thx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)