php-general Digest 5 Apr 2012 19:41:49 -0000 Issue 7762

Topics (messages 317459 through 317461):

Re: To ?> or not to ?>
        317459 by: Larry Garfield
        317460 by: Donovan Brooke

Re: learning resources for PHP
        317461 by: tamouse mailing lists

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
On 4/4/12 12:14 AM, Donovan Brooke wrote:
Robert Cummings wrote:
[snip]
Could using ob_start and ob_end_flush eliminate the ambiguity of whether
or not to use '?>'?

In the generally recommended case of don't use them at the end of your
file... where's the ambiguity?


http://www.php.net/manual/en/function.include.php

http://www.php.net/manual/en/language.basic-syntax.phpmode.php

Those seem to suggest to use them... thus the ambiguity.


Donovan

Most major projects at this point leave it off, and their coding standards say to as well. The official PHP docs are generally non-commital by design, but outside of those I think it's pretty well-established to just leave it off and be happy.

--Larry Garfield

--- End Message ---
--- Begin Message ---
Larry Garfield wrote:
[snip]
Donovan

Most major projects at this point leave it off, and their coding
standards say to as well. The official PHP docs are generally
non-commital by design, but outside of those I think it's pretty
well-established to just leave it off and be happy.

--Larry Garfield


Well, the preference doesn't really matter to me... my point of question
was the use of ob_start, etc..

The books I've read in PHP also call for ending '?>', so it's being
taught to PHP'ers whether the php list and major projects likes it or not. I was wondering about the lists opinion on the use of ob_start, ob_end_flush regarding this topic.

Donovan



--
D Brooke

--- End Message ---
--- Begin Message ---
On Wed, Apr 4, 2012 at 6:16 AM, Bastien <[email protected]> wrote:
>
>
> Bastien Koert
>
> On 2012-04-03, at 10:39 PM, Tim Dunphy <[email protected]> wrote:
>
>> Hello list,
>>
>>  I am quite sure that you've heard this question at least a few times
>> before. :) But I have been dabbling a bit in PHP for years and I've
>> decided that its' high time that became serious about getting a solid
>> grounding in it. Currently I work as a Sysadmin and have modest but
>> reliable skills in bash and perl. But I consider PHP more of an
>> artform and I really need to 'pick up a brush and start painting' so
>> to speak.
>>
>>  So what I was wondering what websites, and books you'd recommend to
>> someone who (for all intents and purpose) is just starting out.
>>
>>  On my hit list of things to learn are basic php / database
>> interaction (mysql mainly).. then how to accelerate php interraction
>> through memcache.. and eventually one I have all that down onto using
>> some of the NoSQLs (mongo/cassandra/membase, etc).
>>
>> Thanks!
>>
>> --
>> GPG me!!
>>
>> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> The manual is a great place
>
> Www.php.net
>
> Then there are tons of sites forum and otherwise to aid your learning.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

I'll second the manual -- quite a lot of info, and generally very well written.

When I started out learning PHP, I used the tutorials at
webmonkey.com. They're pretty well done, and definitely got me going
quickly. If you already have programming experience, and understand
data bases a bit, they should help you along.

If you have no programming or data base experience, PHP isn't
necessarily a bad first language, but it is very rich, and there are
many ways to make mistakes and create poorly formed programs. Writing
web apps is quite a bit different than writing admin scripts in shell
and perl, and there are various ways to go about it. While the php.net
manual is extensive in describing the workings and functions of PHP,
it is not a programming tutorial by any stretch.

Way back in the Jurassic of programming, I had a nifty little book
called "Programming Proverbs" that laid out quite succinctly some
rules of thumb for writing good code. Today, books like "Code
Complete" serve that purpose well, but with a lot more text and no
where near as much fun. Still, if you're are a beginner to writing
applications, it's good to look at such books.

--- End Message ---

Reply via email to