You are here: Re: 'Parse error' problem in "isset" and "empty" « PHP Programming Language « IT news, forums, messages
Re: 'Parse error' problem in "isset" and "empty"

Posted by Hero Wanders on 08/22/05 18:43

Hello!

> Well, that's the beauty of writing your own isEmpty()...you can have it
> do whatever you want. You could simulate PHP's empty() behavior pretty
> easily:
>
> function isEmpty($value) {
> return (strlen($value) == 0 || is_null($value) || $value == 0);
> }

If you want to emulate PHP empty()'s behaviour completely (and only
then) you should use

function isEmpty($value) {
return empty($value);
}

I assume this is faster than doing the checks yourself.

Greetings,
Hero

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация