Created
December 21, 2015 10:55
-
-
Save inakivb/7ecec5fa13ff7e36601c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch(json_last_error()) { | |
case JSON_ERROR_NONE: | |
echo ' - Sin errores'; | |
break; | |
case JSON_ERROR_DEPTH: | |
echo ' - Excedido tamaño máximo de la pila'; | |
break; | |
case JSON_ERROR_STATE_MISMATCH: | |
echo ' - Desbordamiento de buffer o los modos no coinciden'; | |
break; | |
case JSON_ERROR_CTRL_CHAR: | |
echo ' - Encontrado carácter de control no esperado'; | |
break; | |
case JSON_ERROR_SYNTAX: | |
echo ' - Error de sintaxis, JSON mal formado'; | |
break; | |
case JSON_ERROR_UTF8: | |
echo ' - Caracteres UTF-8 malformados, posiblemente están mal codificados'; | |
break; | |
default: | |
echo ' - Error desconocido'; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment