Files
freeCodeCamp/guide/spanish/php/functions/die-and-exit/index.md
2018-10-16 21:32:40 +05:30

572 B

title, localeTitle
title localeTitle
Die and Exit Morir y salir

Morir y salir

Las funciones die() y exit() son idénticas. Cada uno toma un argumento (una cadena) que contiene un mensaje de error. Al ejecutarse, emiten el mensaje y detienen inmediatamente la ejecución del script.

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

Más información: