Re: PHP code optimization
| From: | Kevin Stone | Date: | Tue, 09 Jul 2002 19:57:11 +0000 |
| Subject: | Re: PHP code optimization | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106528@lists.php.net to get a copy of this message | ||
I'm just guessing but I would think there would be no difference. The only
way I think there would be a differnce is if you did many many echo
statements as opposed to one echo or one ?>output block<? becuase it would
have to parse that many more instances of the function. Again.. just a
guess.
-Kevin
----- Original Message -----
From: "Peter Thoenen" <eol1@yahoo.com>
To: <php-general@lists.php.net>
Sent: Tuesday, July 09, 2002 1:32 PM
Subject: [PHP] PHP code optimization
> Question on optimizing code for quicker runtimes.
> Which is quicker (this is on a webpage also..NOT
> commandline)?
>
> <?php if ($a){ echo 'abc'; } ?>
>
> OR
>
> <?php if ($a) { ?> abc <?php } ?>
>
> Both do the same thing and are legit but wondering
> which is better from an optimization standpoint (NOT
> interested in readability or *proper* code here)
>
> -Peter
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>