kendi sorumu kendim cevaplayayim. aşkım php de olmaz olur mu :P

<?php
function deneme(){
    echo "script bitti";
}
register_shutdown_function("deneme");
?>