top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How heredoc works in PHP?

0 votes
338 views
How heredoc works in PHP?
posted Jun 27, 2014 by Amanpreet Kaur

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Heredoc is the way to delimit strings . syntax: <<<. After this operator, an identifier is provided, then a newline. The string itself follows, and then the same identifier again to close the quotation.

The closing identifier must begin in the first column of the line. Also, the identifier must follow the same naming rules as any other label in PHP: it must contain only alphanumeric characters and underscores, and must start with a non-digit character or underscore.

answer Jun 30, 2014 by Rahul Mahajan
...