Re: A PHP intro @ ibm.com/linux
| From: | php3 at developersdesk dot com | Date: | Thu, 21 Dec 2000 05:01:39 +0000 |
| Subject: | Re: A PHP intro @ ibm.com/linux | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31357@lists.php.net to get a copy of this message | ||
Addressed to: teo@digiro.net
php-general@lists.php.net
** Reply to note from Teodor Cimpoesu <teo@digiro.net> Wed, 20 Dec 2000 21:43:58 +0200
>
> http://www-106.ibm.com/developerworks/library/l-php.html?n-l-12140
Not bad, but I found quite a few holes in it. This is the feedback I
sent:
Overall this is a good article, and I'm glad to see PHP mentioned.
There are a few things that I don't think are quite right...
"It has been picking up steam ever since and is now at version 4.0.3
with numerous improvements and refinements over the original release."
4.0.4 just hit the street today... PHP development is on a very
agressive schedule with substantial upgrades every month or two.
"<?php echo "Hello, World!";?>"
Since PHP4 came out, that is even easier thanks to a construct borrowed
from ASP:
<?="Hello, World!"?>
Also, in the first example the trailing semicolon is optional, and I
usually try to keep embedded php used this way as short as possible.
The semicolon at the end of statements is only required when there is
more than one in a <? ?> block.
"Regular HTML tags within the <?php and ?> will be processed normally.
Note that the simple script above contains a <br> line-break tag. PHP
wouldn't be very useful if you couldn't include HTML formatting as
well."
This seems to imply that HTML is allowed anywhere inside <? and ?>,
which is not true. It is only allowed in echo, print or printf.
Outside of functions that send data to the web browser PHP is quite
picky about what is allowed in parsed sections of the page.
"If you include a standard <!-- comment --> within the <?php and ?>
tags, it is likely to cause an error when parsed by the server."
Again, unless this is in an output statement it is ALWAYS an error
inside PHP parsed code.
"Finally, note that each PHP function is enclosed in parentheses and
ends with a semicolon, which will seem familiar to fans of C or Perl.
"
I would say that the function _parameters_ are enclosed in (), the
function body is enclosed by { }.
Thanks for helping spread the word on PHP! If you have any questions,
or would like a reality check on the information on future articles,
feel free to contact me at php@RickWidmer.com, or on the php-general
mailing list at lists.php.net.
Rick Widmer
rwidmer@developersdesk.com
Internet Marketing Specialists
http://www.developersdesk.com
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com