Choosing PHP for large projects

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I will be embarking on a large web project. I am still researching as to
which language use - PHP or Perl.

Can someone clear up some of the bad publicity with PHP in the links
below? They are very interestiing points. Are these points moot in PHP5? /


Re: Choosing PHP for large projects


Quoted text here. Click to load it

Yawn!  This smells so much like a troll, I can't barely bring myself to
give the poster the benefit of the doubt.  It's as if he showed up in a
Mac newsgroup and posted "MACS SUCK! PCs RULE".  If this were cross
posted in the perl groups, I can imagine their reaction.  Perl hackers
in those groups can be brutal.

The URLs you posted above are all nits mostly about the abstracts of
php's implementation.  So what?  The second link talks more about the
pitfalls of building a large site and is quite useful than php vs. perl
in general.  You could just as easily have inserted "Java/Tomcat" for
php in the 2nd URL's article.

Anyway, why not take a step back and not even think about the language
you're going to use at this point?  Why not just do a story board of the
site, document on the flow of information, and figure out what you're
trying to do first?

Find out what sort of machine you'll be running the site on (PC running
Windows/IIS or Linux/Apache or something else).  Is the system "all
yours" or will it be shared with other users and sites on an ISP?  Any
restrictions on what's allowed to be installed on the host (some ISPs
won't install software for you--you take what they offer or go

Now, if you had to design something from all this in a single day, which
language would you use?  Perl or php?  Which are you most comfortable

I personally like the huge perl CPAN repository which has many man-years
of experience behind it.  I like the ability to do step-by-step
debugging in the perl debugger.  php isn't quite there yet (yes, I know
about PEAR and ZEND's editor with built-in php debugger).  

Yet, I wouldn't want to recode my site using only perl.  php is just
enough to do individual pages on the shared machine.  For CGI scripts, I
use perl and CGIwrap.  These constraints are imposed by my ISP but I can
work with them.

DeeDee, don't press that button!  DeeDee!  NO!  Dee...

Re: Choosing PHP for large projects

Thanks for the answer. This is not a troll, by the way. Anyone have any
good perl vs php links?  Thanks

Michael Vilain wrote:
Quoted text here. Click to load it

Re: Choosing PHP for large projects

Quoted text here. Click to load it

Imho, languageX vs languageY comparisions suck!

Just choose the one that allows you to do the things you need to do the
easiest/fastest/cheapest. From that point of view it doesn't matter
which parts of a language suck, because you have to focus on the parts that
are good... And if those parts are really good, other languages will
pick that up... This way we end up with a positive and inspiring
discussion instead of the usual flamewars...

Met vriendelijke groeten,
Tim Van Wassenhove <

Re: Choosing PHP for large projects

Quoted text here. Click to load it

What if every part of a language sucks? LISP is what I have in mind :-)

Re: Choosing PHP for large projects

being the very first language I taught myself, Lisp is well loved.
granted not the most useful language for general usage

Junxter Ad Network

Chung Leong wrote:
Quoted text here. Click to load it

Re: Choosing PHP for large projects

Quoted text here. Click to load it
To the point and right on target. To many jump in coding like mad and then
expect someone else to dig them out of their own mess.

The rule of thumb that has worked for me is, "For every minute you spend
planning, you save ten writing the code."
Then there is the corollary, "The first 90% of the project takes 20% of the
time and the last 10% take 80%."

Thank you,
Al Kolff

Technical Services
Divine Shepherd Lutheran Church
9741 W Beloit Rd
Milwaukee, WI 53227

Web Site

Re: Choosing PHP for large projects

Deke wrote:
Quoted text here. Click to load it

Looks a little biased. From the points listed, the only thing that would
make a difference, with regards to the size of the project, is the lack
of namespace. If the project is written from scratch (i.e. not just
gathering up a bunch of prototypes or separate projects), you plan
ahead, and you are strict with your naming conventions (proper
prefixing), then it is less of a problem, if at all.

If you include more than one namespace, then you can still get name

If not included but explicitly stated, then you would perhaps write
"fooNS:fooFunc()" instead of "fooNS_fooFunc()". (whoop dee doo)

But apart from that, they can be nice to have. If you have some old code
that you want imported, you can just slap on a namespace, and there you
go. On the other hand, in awareness of the lack of namespace, people
usually prefix their functions and classes, if it is something worth

Quoted text here. Click to load it

Pretty much same as above, has a point in "3. Using a Team of
Developers". But developers aware of the possibility of namespace
pollution will act accordingly. I wouldn't consider it a real problem.

Quoted text here. Click to load it

Hmm, upset about a tutorial that requires register_globals, written
years ago by some random grrl, that they (Zend) don't remove from their
site. Ok. Disagreeing with some articles on the net. Ok. Concluding that
PHP is headed straight to hell. Uhm... what?

Perhaps you should peek in some (larger) opensource projects both for
php and perl, and judge what you are most comfortable with.


Re: Choosing PHP for large projects

Quoted text here. Click to load it

I think the namecase issue can be overcome in PHP by using classes. This
is what I do, not specifically for the namespace issue, but to sort of
organize and encapsulate my code. If I have something that is an "entity",
such as a "project activity" or such, I make a class, and put all
functions that have to do with project activities (assessing the database,
arranging things to create output HTML tables, or parts of tables, etc.)
in that class. Then the function is called by instantiating an object

$myobject = new myobjectclass

or a variable directly


or if instantiation is not needed (to just access a function)


In effect, one could create a class just to create a namespace for a group
of functions.

// SI

Re: Choosing PHP for large projects

coolsti wrote:
Quoted text here. Click to load it

Yea PHP is decent for large projects.  I would recommend you use PHP
MVC(model view controller).  Use Smarty to seperate the content from the
php and use classes to isolate your functionality/business logic.


Re: Choosing PHP for large projects


I used to do everything in Perl, then decided to learn PHP.

I like PHP as it is quite easy to learn and quick to develop web

For your BIG project, you may want to consider the following...

1) Testing
What I don't like about PHP is that it only runs in a web environment.
Perl can run stand alone, good for testing routines.

2) Processes
Also, Perl can spawn processes that you can control (child processes).
PHP is only ran when a user visits a page.

3) Alternative
Another thing you can consider is a combination of PHP and Perl.
This is what I chose for my BIG project /
The web sections are all PHP (and MySQL).
The networking sections are all in Perl.

Have fun!

Quoted text here. Click to load it

Re: Choosing PHP for large projects

RL wrote:
Quoted text here. Click to load it

PHP can run standalong just fine, also.  I have several cron jobs which
use PHP to access a MySQL database, for instance.

Quoted text here. Click to load it

PHP can spawn processes anytime, also.

Quoted text here. Click to load it

Actually, this can also be a good alternative.

Quoted text here. Click to load it

Please note - I'm not saying one is better than the other - and don't
want to get into a holy war here.  I'm just correcting some
mis-statements in your post.


To reply, delete the 'x' from my email
Jerry Stuckle,
JDS Computer Training Corp.
Member of Independent Computer Consultants Association -

Re: Choosing PHP for large projects

No harm, educational in fact.
I didn't know PHP could be run from command line :)

Quoted text here. Click to load it

Site Timeline