Im just shocked with this one ._.

On Wed, Oct 14, 2009 at 11:32, roberto german puentes diaz <
puentesd...@gmail.com> wrote:

> Hi to all, here i send you a script for compare isset vs strlen.
> Maybe symfony can gain something with this!
>
>     if (isset($username[5])) {
>         //That's OK!;
>     }
>
> is more faster than
>
>     if (strlen($username) == 5) {
>         //That's OK!;
>     }
>
> Sure, there are cases where ask or know the lenght, strlen will be better.
> Or we need know that 5 is the last position of the last caracter, etc
> But isset is a constructor of lenguage and that's why is very faster,
>
> execute a FOR of 1000 cicles
> (strlen) 2.3571428571429
>
> (isset) 0.42424242424242
>
>
>
> where symfony could use something like that
> sfCultureInfo.class.php
> sfDateFormat.class.php
> Inline.php
> etc
> it's something
>
> --
> Cr. Puentes Diaz
> MP 10.12726.9
> Córdoba - Argentina
>
> www.puentesdiaz.com.ar/blog/
> www.puentesdiaz.com.ar/blog/novedades
> www.twitter.com/puentesdiaz
> Linux User n° 441474
> Ubuntu/Symfony/Eclipse Rocks!
>
> Sign for Free License for Project Zero
> http://www.petitiononline.com/zerogpl/
>
> >
>


-- 
Sidney G B Ferreira
Desenvolvedor Web

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to