Jump to content

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 87.194.118.148 (talk) at 20:41, 19 December 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WikiProject iconComputing B‑class High‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
BThis article has been rated as B-class on Wikipedia's content assessment scale.
HighThis article has been rated as High-importance on the project's importance scale.

Number of functions in Criticism

ballllllllllllllllllllllllllllls The criticism section states that PHP has some 5,000 functions. I agree that this can be an issue, but I don't understand the following sentence, "This is primarily due to the lack of namespaces support." Even if PHP had namespace support, there would still be 5,000 funcitons; they would just be in different namespaces. Also, how can functions be "due to a lack of namspace support?" Just because you have namespaces doesn't mean you will have less functions. Gutworth 02:36, 4 May 2007 (UTC)[reply]

5000+ in the global namespace. I have reworded it. Cburnett 02:51, 4 May 2007 (UTC)[reply]
No such number really exists, I recommend not specifying a number and simply stick to namespaces in general. The quickref that is referred to lists all PECL functions that are documented whereas there are hundreds more PECL extensions that are not documented. Also, most of these 5000+ are not installed by default. In theory this number could just as easily be 1,000,000 and have the same meaning. Philipolson 18:16, 1 July 2007 (UTC)[reply]

Recent changes

Both of these edits have been discussed before. It is commonplace that articles on programming languages become swamped with:

  1. huge listings of code;
  2. huge lists of criticism.

See the archives. On the comment that it isn't a tutorial, the use of second-person and the handy pointers for use would appear to indicate otherwise. On the comment that criticism is best presented in a list format, I can only say that this is obviously a stylistically poor choice for any criticism worth noting (i.e. any with any substance, as opposed to the two jotted notes referenced with blog articles that I removed).

I'm planning on reverting these again; this article has a depressing tendency to slide back into consisting of arbitrary unsourced lists, and all programming articles seem to pick up two-page long code tutorials at some point. Chris Cunningham 18:40, 10 May 2007 (UTC)[reply]

I whole heartedly disagree that things are improved by deleting the items you speak of.
  • Code sections can be trimmed and elaborated upon with respect to how the structure, etc. compares to other languages. The syntax and semantics of a programming language are subject of an encyclopedia.
  • Criticisms are criticisms. Your evaluation of the merit of the criticisms is POV. If a language has a long list of criticisms then why should that list be trimmed for the sake of being trimmed. And don't play the slippery slope card. The criticisms list has been stable (in the sense of a slippery slope not happening) for a while.
Cburnett 19:37, 10 May 2007 (UTC)[reply]
I totally agree on these points, and personally I find code examples totally uninteresting. The syntax of a programming language is best learned elsewhere, and imo should not be the focus of programming language articles on WP.
The criticisms that was removed are more a matter of quirks in the language and implementation specific details rather than actual criticisms.
Jerazol 19:39, 10 May 2007 (UTC)[reply]
Absence of late static binding isn't a quirk. And please don't revert without explaining why. It's rude and not appreciated.Cburnett 19:41, 10 May 2007 (UTC)[reply]
Sorry for not writing an explanation for the reverting. I'm a bit unfamiliar with this popups thing still, and was expecting to get the oportunity to :write an explanation before it was reverted. :-)
To avoid an revert war, we should probably agree on wether to keep, rewrite or delete the disputed sections here on the talk page instead.
Jerazol 19:43, 10 May 2007 (UTC)[reply]
Agreed. As I said above. I think syntax and semantics merit inclusion in an encyclopedia. I support trimming them down and adding in more analysis/comparison to other languages. Outright deleting them is not the right answer.
As for the criticisms. Do you have any criteria other than (my paraphrasing) "it's insignificant and it's posted on a blog" ? I think late static binding definitely should stay (it's not a minor issue by any means and I've seen many bug reports asking for it). Cburnett 19:49, 10 May 2007 (UTC)[reply]
You want to avoid a revert war so you go ahead and revert anyway? Cburnett 19:57, 10 May 2007 (UTC)[reply]
Fair enough with the late static binding criticism, which is actually a major flaw in the OO-implementation, but the note about 32bit vs 64bit integers etc sounds more like a bug, and should imo not be included here.
I think the code examples that have been added is the wrong way to go for adding a discussion on syntax and semantics, and I think it's better to start over fresh rather than elaborate on something which seems fairly arbitrary and specific.
Jerazol 19:58, 10 May 2007 (UTC)[reply]
Code sections do not help one to compare programming languages to one another when presented without comments. I'd argue that they don't help at all when said comments are in place anyway. We shouldn't have two pages of code which is essentially useless in its current form just to encourage people to improve it.
As for the criticisms, if there are better sources then please go ahead and rewrite said crits in a more fluid manner incorporating more reliable sources. I'm sceptical about their importance precisely because of their recent inclusion; most of the other criticisms have been argued over (and reworded) extensively over at least the last year.
But yeah. I'm trying to avoid edit wars in general (call it a late new years' resolution, call it an attempt to improve my community standing) so I'm happy to keep discussing this for now. Chris Cunningham 20:02, 10 May 2007 (UTC)[reply]
The issue with late static binding seems fairly accepted, and is recognised by the team developing PHP. A simple google search turns up a large amount of relevant hits, and it's possible that one could find a better reference among one of these?
Jerazol 20:24, 10 May 2007 (UTC)[reply]
The criticisms section is fairly weak. The list is a poor format and some of the references in this section are not actually criticism at all, making the points seem like OR. There also seems too little on security, which from my experience is the most widespread criticism (valid or not). Also, if things like late static binding are going to stay, it needs at least a few sentences explaining what it is (or a linked to a WP article) and why lack of it is a criticism, and preferably a reference to an actual criticism of PHP for lacking it, not a blog post explaining a patch to add it. NicM 20:20, 10 May 2007 (UTC).[reply]
Lack of late static binding essentially means that you can't override static variables or methods when extending classes. Verifying this is as simple as running the code examples presented on the reference page.
Jerazol 20:46, 10 May 2007 (UTC)[reply]
Yes, I know. My understanding and the fact that PHP doesn't include it is not the issue. The article needs to explain the term and its consequences and it needs a cite that mentions it as a criticism of PHP. NicM 22:29, 10 May 2007 (UTC).[reply]
The point is, we can't criticise PHP for lacking it, we can only say that others have, and for criticisms we really need a good cite. And since it is a relatively esoteric term it needs explanation, although other parts of the article could orobably do with that too. NicM 22:35, 10 May 2007 (UTC).[reply]
Looking again, all of the criticism cites are cites of facts (X added/removed/changed, "here's a patch to do X") or seem fairly unrelated. This section badly needs a cite for each entry justifying it as actual criticism, or it needs to go. NicM 22:43, 10 May 2007 (UTC).[reply]
Are any of these adequate as a reference then: http://www.php.net/~derick/meeting-notes.html#late-static-binding-using-this-without-or-perhaps-with-a-different-name , http://www.zend.com/lists/php-dev/200603/msg00026.html (For the late static binding thing).
As for the other criticisms, I once upon a time tried to prune down the list, but it was quickly reverted. The criticisms has been discussed on this talk page numerous times before, and there seems to have been reached a consensus on what should remain. You're welcome to try to remove it, but I'm guessing there will be other editors in here reverting any such attempts fairly quickly.
Jerazol 06:28, 11 May 2007 (UTC)[reply]
With proper wording and explanation, I think the three URLs could work to justify claiming it is a criticism. As far as the other items are concerned, consensus on what should and shouldn't appear does not justify the lack of cites. None of these claims of criticism are currently verifiable from the article. For now I'll settle for just tagging it. NicM 13:05, 11 May 2007 (UTC).[reply]
Don't let me hold you back. Feel free to do your worst with it, you won't hear any complaints from me :-) Jerazol 13:39, 11 May 2007 (UTC)[reply]
As the deleter-in-chief for a reasonable portion of this article's history, I say be bold and go for it. Removing unsourced staccato prose is fine just on policy grounds; anything notable should be easy to source, and rewriting in complete sentences isn't that difficult. Chris Cunningham 07:47, 11 May 2007 (UTC)[reply]

PHP does not need to explain late static binding, that is what late static binding is for. It may be time to create that article. Absence of late static binding is a larger issue than just overriding static functions. :) Cburnett 16:20, 11 May 2007 (UTC)[reply]

Better to redirect it to name binding and extend that article if necessary. And PHP still needs to explain the term in the context of PHP and particularly wrt to criticism of PHP. NicM 16:51, 11 May 2007 (UTC).[reply]

Web is a name, and as such, it should be captitalised

Web is a short version of the name World Wide Web, and as such, it should be capitalised. "webserver" should be "Web server" just as you would write WWW server, HTTP server, SMTP server, NNTP server, mail server, DNS server, etc. —The preceding unsigned comment was added by 220.152.112.44 (talkcontribs).

Your change broke a lot of links. If you're going to make this change then it has to be more systematic. Cburnett 04:05, 18 May 2007 (UTC)[reply]

Holy war on "spam links"

I feel that the practice of what is and isn't allowed in the external links section is very arbitrary. I may have been incorrect in removing the link to w3schools, but as for the links to the online books, I feel they both add value to the article, but keeping one and removing one on some arbitrary measure of notability is imo wrong. Jerazol¨

WP:EL makes it pretty clear that where there's doubt the prudent course of action is to remove the lot. I'm disinclined to have any tutorials on here at all because it always encourages people to add their own personal favourites; Wikipedia is not a portal site and its purpose is not to teach people how to program. We've got a wikibooks link and AFAIK wikibooks doesn't have the same attitude towards extlinks as wikipedia, so moving them all to the wikibooks article seems like the best course of action all round. Chris Cunningham 19:46, 12 June 2007 (UTC)[reply]
(edit conflict)How do you not know the difference (and added value over the other) of linking to an actual book (added online) by an accredited author with no adsense links and to one that is a non-notable wiki site with a bunch of adsense links and facts taken from other sites? I understand the book site contains a link to the author’s wiki which also contains links to his book but comparing the two as similar is ridiculous. I dont think we need to add a list of wikibooks, but if you are going to add them, add the ones created by notable editors that are actually books instead of ones own wiki. I have my own PHP wiki, can I add mine too? No. I'll either expand on our wikibook here or add notable books by notable editors. Also, http://hudzilla.org/phpwiki/index.php?title=Main_Page is not http://hudzilla.org/php/. But I can see how one can use either link to their advantage when talking spam links. -- I already forgot  talk  19:52, 12 June 2007 (UTC)[reply]
some arbitrary measure of notability... You are kidding right? -- I already forgot  talk  19:59, 12 June 2007 (UTC)[reply]

Security

It's really depressing how many of the Secunia security advisories are related to PHP code not properly sanitising text before it is sent to the database. --203.173.153.34 00:56, 3 July 2007 (UTC)[reply]

Do you have a point? :) Cburnett 03:59, 3 July 2007 (UTC)[reply]
I wonder if this is due to some lacking in the PHP architecture that could be noted in the article - or maybe there are just more PHP applications out there than anything else, and that's why there're more advisories for PHP :). --Thenickdude 12:47, 4 July 2007 (UTC)[reply]
The magic quotes section of Criticism is meant to address this. Chris Cunningham 13:10, 4 July 2007 (UTC)[reply]

"Multi-paradigm language"

Posted anonymously here stated an advantage of PHP as being a "multi-paradigm[ed] language". I removed this because it doesn't make sense to me. Especially since python has list comprehensions and functions are first-class objects. I guess I'm just confused, so if someone cares to explain then I'm all ears. Cburnett 22:43, 24 July 2007 (UTC)[reply]

I agree -- I've removed "Functional" from the paradigms section in the infobox. It may have been put there by someone who has confused functional programming with procedural programming -- I get the impression that many PHP developers aren't aware of the difference and erroneously use the two terms interchangeably. — jammycakes (t)(c) 21:41, 9 August 2007 (UTC)[reply]

Code outside delimiters sent to output

I think this section is confusing:
"PHP only parses code within its delimiters, such as <?php ?>. Anything outside its delimiters is sent directly to the output and not parsed by PHP."
Consider the following code sample:

<?php
if( true )
{
    ?>
    this is true
    <?php
}
else
{
    ?>
    this is false
    <?php
}
?>

The output is "this is true", even though "this is false" is not between PHP delimiters. Therefore, I think it is untrue to say that anything outside the delimiters is sent directly to the output. Martin 01:55, 3 August 2007 (UTC)[reply]

Obvious question

I can't see anywhere in the article which says what the letters PHP do, or originally did, stand for? As someone new to the subject , surely this is the most obvious piece of information which is missing?

Rrose Selavy

Read the history section Jerazol 08:31, 4 August 2007 (UTC)[reply]

PHP Business implications

All of this technical and historical background is well and good. I would like to see a discussion of the breadth of dispersion of the language. Are there estimates on how widely it's used? What are its competitors (.NET/SQL Server vs. PHP/MySQL and what else)? How has PHP gained market share over time? What are its advantages and disadvantages, other than being free? In short, it would be good to see a discussion of the business implications of PHP.

72.82.227.56 18:58, 6 August 2007 (UTC)Clark Troy[reply]

PHP: Hypertext Preprocessor

I added a little blib about what PHP stands for and links for dynamic and weak typing. I hope no one minds. If you want a source: http://www.w3schools.com/php/php_intro.asp --DFRussia 07:33, 15 August 2007 (UTC)[reply]

Criticism sections are juvenile and laughable

I really don't see the need for "Criticism" sections in an encyclopedia. Criticisms are - by definition - opinions. Opinions don't belong to encyclopedias, facts belong to encyclopedias.

As for computer languages, every known language has critics and proponents. But Wikipedia oddly reports criticism only for some languages, and not for others.

Bias, holy wars and personal opinions: none of this stuff belongs to an encyclopedia.--88.149.232.69 13:24, 16 September 2007 (UTC)[reply]

You're saying that PHP not having late-static binding or namespaces is...not...fact?
And you need to read WP:NPOV. Policy is not absence of views but not giving any one view undue weight. Cburnett 15:34, 16 September 2007 (UTC)[reply]
If it's a fact, just report it as such. You don't need a "criticism" section for that. You don't need to say "some people[weasel words][Why should I care?] criticize X for Y". You just report "Y". Regardless of what WP:NPOV says, facts - not views - are what an encyclopedia is about.--88.149.232.69 16:45, 16 September 2007 (UTC)[reply]
Please read NPOV again: NPOV is "absolute and non-negotiable.". You're obviously new here. Some people consider the absence of namespaces a fault, some don't. Those are two separate views. Cburnett 17:04, 16 September 2007 (UTC)[reply]
If some people view it as a fault and some don't, that just goes to show how pointless a criticism section is. BTW I'm not new at all here, so try to keep your prejudices out of the discussion. The NPOV says you shouldn't give "undue weight" to one view over the others: in which way does this advocate the inclusion of "criticism" sections?--88.149.232.69 18:57, 16 September 2007 (UTC)[reply]
Criticism sections are generally best avoided; this article's one is a hangover from when the article was in a much worse state. There's too much backpush to try removing it again right now though. Chris Cunningham 10:51, 18 September 2007 (UTC)[reply]

Resources : Magazines

I think referencing some PHP magazines in the Resources section of the article would be useful :

What do you think ? --Goa103 17:13, 18 September 2007 (UTC)[reply]

This isn't a resource site. php|architect is aready used as a source in the article anyway. We should try to avoid treating the external links section as a way to promote things readers would like to read: it's intended to be a minimal section for links to sites directly applicable to the subject matter (preferably officially). Chris Cunningham 09:17, 19 September 2007 (UTC)[reply]

I just removed a dead link to http://www.corephp.co.uk/archives/19-Prepare-for-PHP-6.html from the "Future development" section (references). The one link left is to meeting notes from 2005. Does anyone else have any good links to more recent PHP 6 information? --Matt Schwartz (talk) 22:26, 7 December 2007 (UTC)[reply]