exit in function

From: Date: Fri, 18 May 2001 14:55:47 +0000
Subject: exit in function
Groups: php.general 
Request: Send a blank email to php-general+get-53428@lists.php.net to get a copy of this message
Hi I use PHP 4.0.5 and Apache 1.3.19 on Windows 2000, with PHP running as an Apache module. If I use the exit construct from within a function Apache crashes. I made a small test-page like this: <?php function foo() { echo "foo1"; exit; echo "foo2"; } foo(); echo "bar"; ?> I would expect it to print "foo1" and then nothing more. But instead Apache crashes. Why? Regards, Jakob Kruse PS: I know it isn't very nice to use exit that way, but I'm trying to run some PHP software that uses it extensively.

« previous php.general (#53428) next »