freeCodeCamp/guide/portuguese/php/functions/die-and-exit/index.md

591 B

title localeTitle
Die and Exit Morrer e sair

Morrer e sair

As funções die() e exit() são idênticas. Cada um deles recebe um argumento (uma string) contendo uma mensagem de erro. Ao serem executados, eles emitem a mensagem e interrompem imediatamente a execução do script.

<?php 
 die('Die() function was run'); 
<?php 
 exit('Exit() function was run'); 

Mais Informações: