Topic: Which scripts need to be closed with ?>

This morning a number of my PHP based sites are having major issues.
Mostly 'Fatal error: Cannot redeclare class **** in..'

My hosts are hinting that they've just upgraded to php 4.4.6 so that could be related.
What seems to be helping fix some scripts is that they didn't have ?> at the end.

Looking through PunBB code I see that lots aren't closed with ?>
Can anyone please explain to me what the rules are about adding ?>

Is it not necessary on code that is included/required into others?
That doesn't quite make sense as many (e.g. include/dblayer/mysql.php) start with <?php but don't end with ?>

I am confused.

--Alan

Re: Which scripts need to be closed with ?>

It isn't necessary to end a file with ?>
<?php signifies the end of an HTML block and the start of a PHP block. ?> signifies the end of a PHP block and the start of an HTML block. There's no reason to end a file with ?> for that reason