Posted By

stancox on 07/15/10


Tagged

empty


Versions (?)

Javascript для PHP функции: empty


 / Published in: JavaScript
 

URL: http://javascript.ru/php/empty

  1. function empty( mixed_var ) {
  2. return ( mixed_var === "" || mixed_var === 0 || mixed_var === "0" || mixed_var === null || mixed_var === false || ( is_array(mixed_var) && mixed_var.length === 0 ) );
  3. }

Report this snippet  

You need to login to post a comment.