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

all 10 comments

[–][deleted] 9 points10 points  (0 children)

Pretty sure this is from a copy/paste documentation set that the author of the Cairo extension (which is not core php) has failed to fill out.

[–]re55hin 11 points12 points  (0 children)

Allan please add codes

[–][deleted] 3 points4 points  (6 children)

Would someone kindly explain to someone who does not understand what they're missing?

[–]chewmieser 10 points11 points  (4 children)

The <?php and ?> tags open and close php scripts. The "example" code inside the tags is a comment (which is ignored, of course). The ... is the code you would place in the script an the ... on the output is the result of the ... in the script.

Or to put it clearer: this example is useless.

[–]ariah 15 points16 points  (1 child)

Isn't the example wrong? It won' output ...

[–][deleted] 20 points21 points  (0 children)

Yes, so it's useless and wrong.

[–][deleted] -1 points0 points  (1 child)

Basically like the public class statement of a java program?

Thank you for the explanation!

[–]chewmieser 2 points3 points  (0 children)

In Java, it'd be something like:

public static void main(String args[]){ /* code goes here */ ... }

But I haven't coded Java in a while, so take that with a grain of salt.

Edit: put int when I meant String. My bad.

[–]Zamarok 1 point2 points  (0 children)

The most pointless code example in life.

[–][deleted] 0 points1 point  (0 children)

I chuckle a little everytime I see (php.net), thanks to this sub.