This is a discussion on Advantages and disadvantages of PHP? within the PHP Language forums, part of the PHP Programming Forums category; Jonathan Sachs wrote: > I didn't know it was possible to load PHP pages that do not have the &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Jonathan Sachs wrote:
> I didn't know it was possible to load PHP pages that do not have the > .php extension. (I did not see the extension on any of the Yahoo or > Wikipedia pages I looked at. Facebook has them.) An "extension" is a Windows filesystem concept. Although most web servers by *default* map URLs to files on the server of the same name, most can be configured differently. Strictly speaking, a web server could be written that didn't even understand the concept of a "file". (Of course, it would have to be running on an OS which was similarly file-free.) -- Toby A Inkster BSc (Hons) ARCS [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux] [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 21 days, 22:00.] Bottled Water http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/ |
|
|||
|
Toby A Inkster wrote:
> Jonathan Sachs wrote: > >> Speaking technically, it seems to me that PHP is likely to be a poor >> choice for large-scale services where hundreds or thousands of users >> will be hitting the web site at the same time. > > It seems to have worked well enough for Yahoo, Facebook and Wikipedia. > You know, I keep hearing that argument, but I've never seen any substantial evidence to back it up. |
|
|||
|
Tony wrote:
> Toby A Inkster wrote: >> Jonathan Sachs wrote: >> >>> Speaking technically, it seems to me that PHP is likely to be a poor >>> choice for large-scale services where hundreds or thousands of users >>> will be hitting the web site at the same time. >> >> It seems to have worked well enough for Yahoo, Facebook and Wikipedia. >> > > You know, I keep hearing that argument, but I've never seen any > substantial evidence to back it up. I just realized that my post could be read wrong - the argument that I haven't seen substantial supporting evidence for is the argument that PHP is not good for high-traffic sites. |
|
|||
|
Tony wrote:
> Tony wrote: >> Toby A Inkster wrote: >>> Jonathan Sachs wrote: >>> >>>> Speaking technically, it seems to me that PHP is likely to be a poor >>>> choice for large-scale services where hundreds or thousands of users >>>> will be hitting the web site at the same time. >>> >>> It seems to have worked well enough for Yahoo, Facebook and Wikipedia. >>> >> >> You know, I keep hearing that argument, but I've never seen any >> substantial evidence to back it up. > > I just realized that my post could be read wrong - the argument that I > haven't seen substantial supporting evidence for is the argument that > PHP is not good for high-traffic sites. That confuses me even more! Anyway when you go to high traffic volume in any software, you run into a bottleneck at some point. It's never the same bottleneck twice in my experience. In one case, we replaced apache with Zeus. Suddenly memory use was way down. speed was way up. Great. In another case appropriate indexing on SQL tables resulted in massive speed increases. In a third increasing memory and retuning the server for more disk cache made an enormous difference (in the days when you had to do this: its largely automatic these days) Sometimes an algorithm change is all it takes, Sometimes its a question of recoding a time critical bit in a different language. I used to mingle a lot of assembler in my C at one point for that reason.. An interpreted language lile PHP is always likely to be slower than a complied on like C, but if that isn't the bottleneck, its not relevant. With a highly loaded server, memory is more likely to be an issue: that and bandwidth. Only if CPU is getting shagged would you start to look at the software and try and see why... Finally, recoding 'slow' bits into another language is no big deal if the applications is so commercially successful that it needs it. I regard PHP as a lightweight shim between my MySql databae, the disk operating system and the apache web server. Frankly it doesn't DO much other that run MysQL queries and format them for the browser. Thats not exactly a computationally intensive exercise. If for example I wanted to analyse 10,000 points and do a least squares fit and draw a graph..I'd probably say, "bugger PHP, this is one for some C" and have the PHP point to a C program that would do that jOb and output an image. For example. PHP is a good fast prototyping language for rapid web development. Its popular, its well documented, and its free. It interfaces well to MySql, and has reasonable graphics support. Its not perfect, but what is? It has some OOP stuff, but this is not mandated. I like that. It hacks well, which is useful if you are in a hurry. I'd say use it till it proves to be inadequate, rather than trying to find a perfect language from scratch. You an always recode into something else, once the program logic is established. Should it be necessary. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|