You are here: Re: is_null very slow « PHP Programming Language « IT news, forums, messages
Re: is_null very slow

Posted by Andy Hassall on 06/09/05 00:21

On Wed, 8 Jun 2005 22:11:55 +0100, "Peter Croft"
<peter_croft@textandvideo.co.uk> wrote:

>I am a newcomer to php; I recently loaded a binary copy (5.0.3) onto my PC
>running win2k and Apache 2.0.52.
>It seems to work fine except that it is very slow running the function
>is_null e.g. the dummy program below -
><?php
>for($i=0; $i<1000; $i++) {
> if(is_null($x)) $y=0;
> }
>echo 'done'
>?>
>This takes around 30 seconds to run and the disk is accessed continuously.
>A friend ran it under both win2k and Linux and it finished in under a
>second. Have I set up something wrong? As I say everything else seems fine.

That would produce 1000 warnings under a sensible error_reporting
configuration.

Perhaps your copy is logging warnings to a file, whereas your friend's has
error reporting disabled entirely.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

 

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

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