====== PHP - Tips y Datos Utiles ====== ==== Contar Líneas de Código ==== cat `find . *.php` | egrep “;” | wc -l wc -l `find . -iname "*.php"` ==== Validar Email ==== return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
cat `find . *.php` | egrep “;” | wc -l wc -l `find . -iname "*.php"`
return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;