Talk:PHP

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by AlReece45 (talk | contribs) at 20:45, 17 August 2006 (→‎Criticism section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Functional programming in PHP

PHP4+ has some support for functional programming: almost-closures (uncomfortable, outer variables are inherited as values), variable functions (you can bind, receive and/or return named or anonymous functions as variables), and well-known high-order array functions like array_map, array_walk, array_filter or array_reduce which are in the standard library.

If we're saying Python supports functional programming, I think we could say PHP does too, and add it to the language comparison article.

PHP as an alternative to ASP.NET?

"The PHP model can be seen as an alternative to Microsoft's ASP.NET/C#/VB.NET"

Don't you think that this should be removed, as PHP is just a second league when comparing ASP.NET features? Please, be objective and unbiased.

Well, by leaving out Macromedia's ColdFusion system, Sun Microsystems' JSP/Java system, the Zope/Python system, the Mod perl/Perl system, and the Ruby on Rails framework, you are implying that ASP.NET/C#/VB.NET is superior to all of these. Is that really the case? And, is it really about which is better, or is it more a question of what is better suited for a specific task.
I don't agree that is should be removed - Jerazol 13:49, 11 May 2006 (UTC)[reply]
"Objective and unbiased" is what it is. "can be seen" is fairly neutral in terms of POV, unlike, er, for example, "just a second league when compared ...."
"Can be seen" at least informs us that it's an opinion, not a fact. If it were changed or removed, then your POV would *become* the "fact", and there is therefore no reason to make the change. Renaissongsman 22:59, 6 June 2006 (UTC)[reply]
PHP is not second rate compared to the Microsoft technology stack. It is a popular, high performance, open source alternative which is just a ubiquitous as Microsoft on the web. In fact, a more informative statement is: PHP is one of the two dominant technologies for implementing websites (Microsoft's .NET is the other). --PHPedia 21:10, 11 June 2006 (UTC)[reply]
There's just one problem with ASP - it's a Microsoft product. 'nuff said. — Preceding unsigned comment added by 67.41.164.192 (talkcontribs)

The mess that is this article

The middle third at least is probably not suitable for this article. You're not reading an encyclopedia to learn how to program. The issue is where to put it. As for the huge list of modules at the end, I'm just going to delete that I think. Chris Cunningham 15:04, 18 May 2006 (UTC)[reply]

I couldn't agree more. I think that the learning how to program bit is more suited to Wikibooks. Rob.daemon 03:45, 19 May 2006 (UTC)[reply]

PHP6

I'm just wondering if this is the place where we can put information about PHP6, as quite a bit of progress has been made in it's development. --TheHeadSage 14:19, 6 June 2006 (UTC)[reply]

A "development" section would be better than sprinkling it all over the article I think. Chris Cunningham 16:51, 19 June 2006 (UTC)[reply]
Even another article called php6, referred to from this article? --Draicone 23:05, 28 June 2006 (UTC)[reply]
No because the information would get lost especially the parts that answer the criticisms such as: Removed: magic quotes, register globals, safe mode. Added: unicode support and namespaces.

Criticism

Imo there are a couple of passages in the criticism section that should be removed, as they are incorrect/not verifiable, or simply silly

 The many settings in the PHP interpreter's configuration file (php.ini) mean that code 
 that works with one installation of PHP  might not work with another. For example, 
 if code is written to work with register_globals turned on, it won't work on another 
 system that has register_globals turned off. This makes writing portable code more 
 difficult as the only way to ensure compatibility is to assume that features will be 
 unavailable.

register_globals is a silly example to use here, since it's a question about backwards compatibility. Code developed after 4.1.2 should anyway use the superglobals, and not rely on register_globals, and should then work under any circumstances. Other showstoppers are f.ex safe mode etc. I don't agree that this is a valid criticism though.

Method / function overloading is not allowed (Obsolete since PHP5).

Listing every programming concept which isn't supported in PHP is silly and pointless. There's many other OO concepts that also are not supported in PHP4, less so in PHP5 Jerazol 13:01, 23 June 2006 (UTC)[reply]

Very true, and very few languages have all the OO concepts. php was meant for powerful web development, not C++-like flexibility. --Draicone 00:20, 30 June 2006 (UTC)[reply]
I've now removed these two passages in the article. I'm sure even more could be pruned, as the criticism section seems to be populated by issues gathered by ppl who don't like PHP, rather than valid criticisms directed at PHP specifically. Jerazol 08:36, 30 June 2006 (UTC)[reply]
I noticed you removed a couple of my additions. I'm not objecting, in fact I'm very new and probably missed some documentation regarding quality control, but could you tell me if there's a different way to write those two additions that would be acceptable? I'm referring to [1] and [2].
Well, the statement about PHP being used mainly for OSS is incorrect. PHP is widely used in the comercial web development industry. The other part was simply a bit to technical. It's implementation details which imo isn't really appropriate for this article.

Critism Continued

If 'register_globals' is enabled in PHP's configuration file, PHP automatically puts the values of Post, Get, Cookie and Session Parameters into standard variables, which can be a significant security risk for scripts that assume those variables are undefined. Other languages, such as ASP.NET, include functionality to detect and clean harmful cross-site scripting or other malicious code automatically, whereas PHP does not.

First of all this article is not named "PHP vs. ASP".

Secondly, this is quite ridiculous. The thought that the fact that register_globals is optional makes PHP a lesser language is not a valid point. PHP is a more fine-tuned language and is not as heavy as ASP for the same reason. I cannot see this as a weak point, or in fact a point at all.

It also appears that ASP is the prefered language in the article, making the article subjective proposing PHP is a side-line language. Kakugo 12:19, 11 July 2006 (UTC)[reply]

Editors opinions (on PHP) don't matter. Not mine, not yours. What matters is quoting valid sources. I have found a source that repeats this criticism: http://www.technosailor.com/lessons-in-web-security-php-and-registerglobals/. "let’s look at one of the weaknesses of a common scripting language, PHP. This exploit is actually old and has been closed by default in every PHP release for the past few years." This does seem a good citation, and a valid item to include under criticisms. However, I don't know PHP well enough to draft a paragraph with sufficient accuracy. Please don't be defensive. It is the job of this article to repeat criticisms, provided they have suitable sources. Furthermore it is the job of editors to make sure that in the article their opinion cannot be deduced! Notinasnaid 12:33, 11 July 2006 (UTC)[reply]
P.S. Reading that, it sounds a bit combative. Sorry, it wasn't supposed to be; just emphasising it's an editors duty to repeat criticisms that are well sourced even if we, personally, believe them to be nonsense. Notinasnaid 13:01, 11 July 2006 (UTC)[reply]
No, actually, it sounds extremely ignorant and cuntish. Good day? Kakugo 11:02, 1 August 2006 (UTC)[reply]

Apology

I seem to have accidentally made a raft of changes to the article, under the guise of "copy editing". Not entirely sure how I did this, but I guess I must have used an out of date original, because the history shows many more changes than I actually typed. Sorry for any extra work I generated. There was one bit I would like to propose for reworking and inclusion. In usage: "PHP generally runs on a web server, taking PHP code and (optionally) user choices (typically from a form) as its input and creating Web pages as output." The part in italics is new. I feel that as originally written, it isn't clear how a PHP program could be used as part of an interactive system, since the PHP code itself is fixed, and fixed input would give (usually) fixed output. The resulting language was indeed clumsy. Notinasnaid 09:25, 5 July 2006 (UTC)[reply]

It seems obvious that a language which supports variables supports some method of input. It might be valuable to mention the link between forms and variables somewhere in the article, but a set of parentheses in an otherwise clear introductory sentence is not the right place. Chris Cunningham 09:52, 5 July 2006 (UTC)[reply]

coderwiki

I have posted a link to coderwiki.com twice and twice it has been removed with no more explanation than spam. coderwiki is a wiki thats looking to document all languages. we're starting up and need other programmers to help write articles. our users and i are investing time and money to bring this service to people free. if there is a better place to inform programmers of the site, or perhaps a better way to address it, i would like to know. thx

--da404LewZer 07:20, 15 July 2006 (UTC)[reply]

Wikipedia is not a promotional device. Your effort sounds useful, but links to nascent sources, especially those that don't currently extend the content of the subject, are almost always removed rather quickly. —  Stevie is the man!  Talk | Work 18:29, 15 July 2006 (UTC)[reply]

allright, thats fair, anyone who would like to help tho, feel free :P --da404LewZer 19:30, 15 July 2006 (UTC)[reply]

Criticism section

The criticism section is not an appropriate place for fans of the language to make promises about future corrections. Write a well-sourced "future developments" section or wait until PHP 6 is actually released. I've done a fair amount of reduction of the crits section already without having to resort to clapping my hands for the future. Chris Cunningham 22:07, 2 August 2006 (UTC)[reply]

Ronabop's point is a sourced fact that is concise and corresponds to the criticism. I have no issue with keeping it. It doesn't require a fan to point out that there are verified plans by PHP's developers to correct something that is criticized. — Stevie is the man! TalkWork 22:24, 2 August 2006 (UTC)[reply]
A new section should be made for future development activities. The criticisms section is not an appropriate place to state future intentions. It reads like a lame attempt to disclaim current flaws. Chris Cunningham 00:30, 3 August 2006 (UTC)[reply]
Agreed to a new section, but the concise addition to the criticisms section on the verified response by the PHP developers that addresses the criticism is all right, and I will agree to that if Ronabop wants to reinstate it. Thank you. — Stevie is the man! TalkWork 01:52, 3 August 2006 (UTC)[reply]

Okay, I might have missed it, but as far as I can see, PHP is the only one out of all the languages mentioned in this article ("Microsoft's ASP.NET system, ColdFusion, Sun Microsystems' JSP, Zope, mod_perl and the Ruby on Rails framework.") that has a Critism Section? Is that to lead us to believe that the other languages don't have any critism? To really keep it fair would require that a critism section be added to more of them OR crtisim not be in the PHP Article. You might be even able to get away with it like the ASP.net article did. The criticism section is basically "Comparison to other platforms" but in reality, there aren't any comparisons made. AlReece45

Recent edits

Please don't include statements like "amongst thousands of others" in lists of software, it never reads well. PHP is hardly the first language to operate as a filter, and isn't the "de facto standard" for Web development at all. I've reverted the whole lot because I couldn't find any part which made the article read better or more informative without seeming like an advert. Chris Cunningham 09:56, 14 August 2006 (UTC)[reply]