Skip to main content

Timeline for "Hello, World!"

Current License: CC BY-SA 4.0

18 events
when toggle format what by license comment
Oct 9, 2021 at 13:13 comment added Sam Watkins That looks more like a cat script to me!
Jul 2, 2020 at 16:56 comment added IMSoP Contrary to several comments here, there is no HTML in this answer, and no "HTML mode" in PHP. This is source code, executable by PHP, which is precisely equivalent to <?php echo 'Hello, World!'; ?>, because the language's author decided that it should be. From a compiler's point of view, it's just as accurate to say that <?php is an "end echoed string literal" marker as a "begin PHP code" marker, with ?> then being an "echo another string literal" marker.
S Mar 24, 2020 at 11:49 history suggested user90593 CC BY-SA 4.0
added link to php.net, added tio.run, formatted php code
Mar 24, 2020 at 10:18 review Suggested edits
S Mar 24, 2020 at 11:49
Aug 29, 2019 at 14:50 comment added hyde Well, it seems to work at least at ideone.com, outputting Hello, World! to stdout.
Aug 23, 2019 at 20:59 comment added Stan Strum @MilkyWay90 I vaguely remember the context of this (being about 2 years ago) but I had written a similar answer to a similar question and received a -1. Not on this question, being not a duplicate.
Aug 23, 2019 at 16:23 comment added MilkyWay90 @StanStrum Because then it would be a duplicate of this answer
Sep 2, 2017 at 17:37 comment added Stan Strum See, when I did this, I got a -1, not +173
Jun 4, 2017 at 6:45 comment added phil294 trying this out via CLI with php -r "Hello, World!" results in an error.
Mar 29, 2017 at 0:24 comment added Evan Carroll This is an html answer. it's lame to call it php. You'd get the same thing for the same reason in any template language. It's pugs/mason/template toolkit too!
Nov 14, 2016 at 12:51 comment added Marcel @georgeniux html is just markup. If you want a "program" to "run" html you could do alias html=cat and then it outputs to stdout.
Aug 29, 2015 at 11:43 comment added galexite @Nelson no, it doesn't. PHP doesn't necessarily have to be placed in to HTML. And plus, HTML doesn't print to the stdout
Aug 29, 2015 at 11:42 comment added Nelson That means this is just an HTML answer...
Aug 28, 2015 at 19:54 comment added lynn It works, of course, because there's no <?php in the code, causing it not to get interpreted by PHP at all :)
Aug 28, 2015 at 14:03 comment added Fatalize As usual with PHP, you always wonder how it can work
Aug 28, 2015 at 13:08 review Low quality posts
Aug 28, 2015 at 13:49
Aug 28, 2015 at 12:56 history edited galexite CC BY-SA 3.0
edited body
Aug 28, 2015 at 12:53 history answered galexite CC BY-SA 3.0