Jump to content

Recommended Posts

Is there any command in PHP that will halt the execution process of an application?

 

I wish to implement a debug function thus this function will print out a debugging message and stop or continue the execution process based on an expression that is evaluated to true or false.

 

Would appreciate any help from all of you. =)

If you want to pause execution for a specific amount of time, you can use sleep(). If you want to halt execution, you can use exit.

 

 

http://php.net/sleep

http://php.net/exit

 

 

(Exit is a construct, so it can be used like 'exit;', but it's also valid to use something like exit('This message would be output right before script execution is halted.');)

Thanks. I need an idea on how to halt an entire application because exit only halt a particular execution process.

 

Basically my application invokes system() recursively within the scripts (i.e. system("php xxx.php",$retval); ) Thus if I invoke exit, it may only halt one particular execution process but not the entire application.

 

Any idea here? =)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.