Halt file include

Halt the inclusion of an include() inside the included file itself - but is it still parsed? ie. If we had already included a file that defined a class and later try to include the same file, but abort at the top when we realise it had already been included (by way of a constant that is already defined) - do we get a duplicate class definition error?

This isn't necessarily the way it should be done - I think preventing the file from being included in the first place is the best method.

TEST...

include('includes/myapp_loader.php');
include('includes/myapp.php');
BEGIN: /home/w3dx/@subdomains/alpha/public_html/php/includes/myapp_loader.php
BEGIN: /home/w3dx/@subdomains/alpha/public_html/php/includes/myapp.php
Class 'myapp' already exists - ABORT!
ACONST is already defined
About to define class 'myapp'...
END: /home/w3dx/@subdomains/alpha/public_html/php/includes/myapp.php
END: /home/w3dx/@subdomains/alpha/public_html/php/includes/myapp_loader.php
BEGIN: /home/w3dx/@subdomains/alpha/public_html/php/includes/myapp.php
Class 'myapp' already exists - ABORT!
ACONST is already defined
About to define class 'myapp'...

Fatal error: Cannot redeclare class myapp in /home/w3dx/@subdomains/alpha/public_html/php/includes/myapp.php on line 23