PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
class foo {
function __construct() {
// do important stuff
}
function __destruct() {
// do other important stuff
}
// other functions
}
<?
require_once("foo.php");
bar = new foo;
?>
<!-- HTML goes here using powers of foo -->
since that "page" requires the class foo to work, will the instance of foo on the page (named bar) be "destructed" when the user navigates away from the page? When the php code is parsed? When?