Faster web site questions

From: Bob Bedford (bedford1_at_YouKnowWhatToDohotmail.com)
Date: 01/29/04


Date: Thu, 29 Jan 2004 11:35:35 +0100

Q1 Wich is faster ???
a) echo
b) print
c) sprintf

Q2: (better an echo, print or sprintf (take the faster on question 1) or
stop the php code, put HTML code and then restart php code)
a)
....
echo("<td><tr><table>");
....
b)
....?>
<td><tr><table>
<?php...

Q3: Also, better have 1 big file with lot of code (560 lines of code
actually for my biggest file) or 3 files of 200 lines ??? for the same
result (I mean the big file call itself with different forms, instead of
calling every time an other file)

Q4: I've a lot of variables between pages (about 20 on the worst case). For
improving speed, should I use Session variables or hidden var between pages
(I don't mind on the code, anyway for taking the code between pages, the
only things that changes is that I don't have to "post" every time the same
variables if I use Sessions, as with hidden fields, every time I submit a
form, either with a user's click or a javascript submit, first I've to
affect hidden variables for the next page).

Thanks to the Guru that will help me.

BoB



Relevant Pages

  • Re: Session variables and IE7
    ... so I am looking at my PHP code first. ... Is there some error in my handling of session variables? ... Then you need to upgrade your version of SquirrelMail. ...
    (comp.lang.php)
  • Re: question about session variables
    ... // rest of the html and php code ... NOTE = in thankyou.php i display a thank you message by retrieving the ... session variables in the following way ...
    (comp.lang.php)
  • Re: commenting ?>
    ... current block of PHP code, whichever comes first. ... This means that HTML code ... Ah, but it isn't in a string, because it's in a comment. ...
    (comp.lang.php)
  • Re: Reading code from file/database and running it, a further question.
    ... The whole point is that evalneeds php code. ... use the "benjcarson at digitaljunkies dot ca" solution from ... > I am using evalto run some code that i get from the database. ... > That is to pass an HTML code with some php in it? ...
    (alt.php)
  • Re: Cant read my email messages in Entourage
    ... contains PHP code or that it's being sent by a PHP application? ... Entourage 2008 uses WebKit, which is the same HTML rendering engine Safari uses. ... Select the HTML code from beginning to end and copy/paste into a plain text TextEdit document. ... Entourage Help Blog ...
    (microsoft.public.mac.office.entourage)