Online Shopping : Computers : Programming : Languages : PHP : kms : General

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 8 people (63%) answered Yes
Recently 1 of 4 people (25%) answered Yes

Entry

Does return in an include file stop the entire script?

Jan 25th, 2000 21:56
Nathan Wallace, Richard Lynch


In PHP3, if you use something like this:

    if (isset($some_more)) return;
    $some_more = 1;
    blahblahblah;
    .
    .
    .

The return, *NOT* inside {} brackets, will return from the include file.
But this will break in PHP4, so avoid it.

Instead:

    if (!isset($some_more)){
      $some_more = 1;
      blahbalhbalh;
    }