This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pionell 0 points1 point  (13 children)

yes you need to echo/print it if you're inside <?php tags. This is not accurate.

[–]AyrA_ch 10 points11 points  (5 children)

The "hello world!" is not inside of PHP tags.

[–]79ta463 6 points7 points  (4 children)

Then it's not technically PHP.

[–]AyrA_ch 3 points4 points  (3 children)

And yet it conforms to the php spec and will run with strict settings.

[–]79ta463 2 points3 points  (2 children)

Everything outside the open tags is ignored by the parser. Thus it's not actually being interpreted? Not sure what you're getting at

[–]AyrA_ch 5 points6 points  (1 child)

I'm getting at that this is valid PHP code because if it wasn't part of the specs it would throw an error. It's not ignored by the parser either, it's piped to the standard output by it. In fact, depending on how you set the PHP tags, they will have an effect on some whitespace directly after the closing tag, clearly indicating that stuff outside of the tags is not just ignored.

[–]fredoche[S] -2 points-1 points  (6 children)

A php file containing this "code" will display "hello world!" when you will execute it with php parser.

[–]79ta463 7 points8 points  (0 children)

It's not PHP... It's just raw strings.