NYCPHP Meetup

NYPHP.org

[nycphp-talk] 'In and out' of php

jon baer jonbaer at jonbaer.net
Sat Jan 24 14:17:37 EST 2004


This is probably the best read I have found on optimization:

http://phplens.com/lens/php-book/optimizing-debugging-php.php

If you read the bottom about "useless optimizations":

c. 'var='.$var is faster than "var=$var"
This used to be true in PHP 4.2 and earlier. This was fixed in PHP 4.3.

- jon

----- Original Message -----
From: "Mark Armendariz" <nyphp at enobrev.com>
To: "'NYPHP Talk'" <talk at lists.nyphp.org>
Sent: Saturday, January 24, 2004 1:53 PM
Subject: RE: [nycphp-talk] 'In and out' of php


>
> > <td><a href="index.php?page=<?= $_GET['page'] ?>&sort=id">ID</a></td>
> >
> > needs to be interpreted into something like this:
> >
> > echo('<td><a href="index.php?page=');
> > echo($_GET['page']);
> > echo('&sort=id">ID</a></td>');
> >
> > so there isn't really any "going in and out" of php.
>
> Ok, would...
>
> echo "<td><a href=\"index.php?page=$_GET['page']&sort=id\">ID</a>";
>
> ...and...
>
> echo '<td><a href="index.php?page=' . $_GET['page'] . '&sort=id">ID</a>';
>
> ...be interpreted the same?
> Are any of the above interpreted faster, or are they all seen as the exact
> same thing by php?
>
>
>
> Thanks for the input
>
> Mark
>
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>




More information about the talk mailing list