Revision as of 12:28, 5 January 2024 editLowercase sigmabot III (talk | contribs)Bots, Template editors2,295,443 editsm Archiving 1 discussion(s) to Talk:PHP/Archive 8) (bot← Previous edit | Revision as of 08:24, 2 February 2024 edit undoSohom Datta (talk | contribs)Edit filter managers, Autopatrolled, Interface administrators, Administrators8,069 edits Nominating for good article reassessment (GAR-helper)Next edit → | ||
Line 1: | Line 1: | ||
{{GAR/link|08:24, 2 February 2024 (UTC)|page=1|GARpage=1|status= |shortdesc=Scripting language created in 1994}} | |||
{{Skip to talk}} | {{Skip to talk}} | ||
{{Talk header|noarchive=yes|search=no}} | {{Talk header|noarchive=yes|search=no}} | ||
Line 130: | Line 131: | ||
The example of the <code>throws</code> keyword does not include the <code>throws</code> keyword in it. Is this even a real keyword? The docs at php.net have nothing about it. ] (]) 18:33, 4 January 2024 (UTC) | The example of the <code>throws</code> keyword does not include the <code>throws</code> keyword in it. Is this even a real keyword? The docs at php.net have nothing about it. ] (]) 18:33, 4 January 2024 (UTC) | ||
==GA Reassessment== | |||
{{Misplaced Pages:Good article reassessment/PHP/1}} |
Revision as of 08:24, 2 February 2024
The good article status of this article is being reassessed by the community to determine whether the article meets the good article criteria. Please add comments to the reassessment page.
|
Skip to table of contents |
This is the talk page for discussing improvements to the PHP article. This is not a forum for general discussion of the article's subject. |
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
PHP has been listed as one of the Engineering and technology good articles under the good article criteria. If you can improve it further, please do so. If it no longer meets these criteria, you can reassess it. | ||||||||||||||||||||||
|
This level-5 vital article is rated GA-class on Misplaced Pages's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The contents of the Visibility of PHP properties and methods page were merged into PHP on 08:41, July 28, 2010. For the contribution history and old versions of the redirected page, please see its history; for the discussion at that location, see its talk page. |
The contents of the PHP Data Objects page were merged into PHP on July 15, 2014. For the contribution history and old versions of the redirected page, please see its history; for the discussion at that location, see its talk page. |
Archives | ||||||||
|
||||||||
This page has archives. Sections older than 100 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Using Type Declaration instead of Type Hints
As my change has been reverted it seems appropriate to discuss the matter.
The PHP documentations refers to them as Type declaration, see: https://www.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration, and the original RFC introducing scalar types, uses the word "declaration", see: https://wiki.php.net/rfc/scalar_type_hints_v5 Although it is true that the PHP 5 documentation referred to them as "hints", and that the "Object Typehint" RFC is named as such but for all intent and purposes it is a type declaration.
Moreover, the word "declaration" is used in other places correctly instead of "hint", see:
PHP 7 also included new language features. Most notably, it introduces return type declarations for functions which complement the existing parameter type declarations, and support for the scalar types (integer, float, string, and boolean) in parameter and return type declarations.
Unusually for a dynamically typed language, PHP supports type declarations on function parameters, which are enforced at runtime. This has been supported for classes and interfaces since PHP 5.0, for arrays since PHP 5.1, for "callables" since PHP 5.4, and scalar (integer, float, string and boolean) types since PHP 7.0. PHP 7.0 also has type declarations for function return types, expressed by placing the type name after the list of parameters, preceded by a colon. For example, the getAdder function from the earlier example could be annotated with types like so in PHP 7:
By default, scalar type declarations follow weak typing principles.
(Emphasis mine)
As I'm new to contributing to Misplaced Pages, I don't know what to do about the following comment from the revert commit
"typehint" is the commonly used term in the community.
As sure it is referred to that but it is not accurate, and my understanding is that Misplaced Pages articles should be accurate.
Can someone more experienced clarify?
SampleCode replaces Screenshot in this type of Infobox
@Ancarda: Hi, SampleCode argument is new and it should be used is instead of the past argument "screenshot". See, SampleCode has an abstract description of the total programming style. It conveys important information about remaining parts of this Infobox. So we should use this argument as the second rendering item, to successfully convey an overview of PHP language. Thanks, Hooman Mallahzadeh (talk) 12:22, 3 February 2022 (UTC)
- Dear @Peterl: Please read the above paragraph. By the same reason, perhaps we should apply that for Java and Javascript. If you disagree, please discuss that here. Thanks, Hooman Mallahzadeh (talk) 17:55, 3 February 2022 (UTC)
@Hooman Mallahzadeh:. Interesting, it seems some languages have sample code in a screenshot, I wasn't aware of that. I had a look through the Wayback Machine and it seems the PHP article never did. Nevertheless, the article has many code snippets, e.g. https://en.wikipedia.org/PHP#Example demonstrates OOP, string concatenation, list usage (,
foreach
), closures & functional programming (array_walk
), string interpolation, and one style of comments (//
).
I appreciate the infobox might support a snippet to give a feel of the language, but just having hello world there doesn't seem useful to me. Perhaps it's useful to other people, I'm not sure. I especially feel this as https://en.wikipedia.org/PHP#Syntax gives two different ways to accomplish hello world. I honestly think a screenshot is fine -- is that deprecated for accessibility reasons? It seems like you'd have to put a lot of text there to make it useful (which you can't fit into the infobox), or somehow make it expand (like an image does today when you click on it).
Do a lot of other languages have this? I will admit I reverted your edit because I had seen previous similar edits reverted too, e.g. https://en.wikipedia.org/search/?title=JavaScript&diff=next&oldid=1069635829&diffmode=source Ancarda (talk) 05:47, 5 February 2022 (UTC)
- @Ancarda: I have a question: What comes at the first glance in your mind when you hear the word "PHP"? For myself at the first glance is a small program like "Hello world", that is a typical instance of the total concept of programming language PHP. What about you? Hooman Mallahzadeh (talk) 06:34, 5 February 2022 (UTC)
- @Ancarda: Or a better guestion: How you would explain the concept of PHP language to a bachelor student at his first term? Perhaps you would use a simple example, and not explain items like "Paradigm", "type discipline", and others. OK? Here we use "Hello World" program at Infobox to introduce PHP for a person who does not have any skill in programming. Hooman Mallahzadeh (talk) 06:40, 5 February 2022 (UTC)
- @Ancarda: I have a question: What comes at the first glance in your mind when you hear the word "PHP"? For myself at the first glance is a small program like "Hello world", that is a typical instance of the total concept of programming language PHP. What about you? Hooman Mallahzadeh (talk) 06:34, 5 February 2022 (UTC)
For myself at the first glance is a small program like "Hello world", that is a typical instance of the total concept of programming language PHP
I'm not sure what you mean by total concept. Printing something to the console doesn't seem to demonstrate enough differences between programming languages. Just from hello world, what differences can you see between these two languages:
print("hello world")
main = putStrLn "hello world"
It looks like you can just substitute some function calls print -> putStrLn
and change the syntax slightly (i.e. drop parens) to translate Python into Haskell... but you can't. These snippets miss a very important fact that print
has side-effects and putStrLn
actually returns an IO ()
, i.e. it's monadic. It also misses the fact Python is primarily a scripting language, and so many programs will use __name__
so the programs functions can be included without executing. PHP works this way too; code outside functions will execute immediately.
If we want to give a "feel" for what these languages are like, we could expand the example, which will surface many of the differences:
import sys def main(): print("Type something to have it printed back") for line in sys.stdin: print(line, end = "") if __name__ == "__main__": main()
vs.
printInput :: IO () printInput = getLine >>= (\x -> putStrLn x) >> printInput main :: IO () main = putStrLn "Type something to have it printed back" >> printInput
Do you see how different the languages look just by doing something slightly more complicated than printing a fixed string to standard out? The issue I have is these snippets are now too large to put in the infobox -- again, my question is why we're replacing the screenshot with a snippet. It seems like a step back to me. If it was discussed and established somewhere, then please let me know (i.e. link me to the decision). If not (i.e. this is your proposal), I really don't see the value. Sorry.
Here we use "Hello World" program at Infobox to introduce PHP for a person who does not have any skill in programming
I've always had the impression Misplaced Pages is a reference for people who already know quite a bit about the topic they are reading up on, i.e. Misplaced Pages is not the place to go for an introduction to a topic. Perhaps I'm mistaken. Ancarda (talk) 11:37, 5 February 2022 (UTC)
Security
Graphics processing is a rapidly developing field, so what was 'current' even only recently could be outdated very quickly. Additionally, describing GPU capability by monetary cost isn't particularly descriptive, even if one assumes USD pricing. — Preceding unsigned comment added by 27.96.195.4 (talk) 04:19, 27 March 2023 (UTC)
throws keyword
The example of the throws
keyword does not include the throws
keyword in it. Is this even a real keyword? The docs at php.net have nothing about it. 131.200.248.40 (talk) 18:33, 4 January 2024 (UTC)
GA Reassessment
PHP
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
- Article (edit | visual edit | history) · Article talk (edit | history) · Watch • Watch article reassessment page • GAN review not found
- Result: Delisted. Hog Farm Talk 22:40, 12 February 2024 (UTC)
Multiple issues. The article is peppered with {{cn}} tags, and is largely based on primary sources (with not enough weight being given to third party sources). There is a one line section covering the PHP Foundation which should probably eithier be integrated into "History" (or removed completely). Additionally there are multiple dubious statements and promotional SEAOFBLUEs in the "Use" section while the "Security" section offers uncited WP:NOTGUIDE advice on security matters Sohom (talk) 08:24, 2 February 2024 (UTC)
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion. Categories:- Good article reassessment nominees
- Misplaced Pages good articles
- Engineering and technology good articles
- Old requests for peer review
- GA-Class level-5 vital articles
- Misplaced Pages level-5 vital articles in Technology
- GA-Class vital articles in Technology
- GA-Class Computing articles
- High-importance Computing articles
- GA-Class software articles
- Unknown-importance software articles
- GA-Class software articles of Unknown-importance
- All Software articles
- GA-Class Free and open-source software articles
- High-importance Free and open-source software articles
- GA-Class Free and open-source software articles of High-importance
- All Free and open-source software articles
- All Computing articles
- GA-Class Computer science articles
- High-importance Computer science articles
- WikiProject Computer science articles
- GA-Class Internet articles
- High-importance Internet articles
- WikiProject Internet articles
- Mid-importance software articles
- GA-Class software articles of Mid-importance
- Unknown-importance Computing articles