tags:

views:

105

answers:

3
substr($obj_strptime,index($strptime,"sub")+6,0) = <<'ESQ';
 shift; # package
 ....
 ....
ESQ

What is this ESQ and what is it doing here. Please help me understand these statements;

+7  A: 

It marks the end of a here-doc section.

EOF is more traditional than ESQ though.

David Dorward
I think you mean EOD?
ysth
I often use `EOF`.
Ether
I commonly see many variations matching `/^EO[A-Z]+$/`, End Of File and End Of Data, do seem most common, but it's also nice to provide a bit more help as to what it is that your ending.
Ven'Tatsu
I like `END` or `END_DESCRIPTIVE_NAME` where `_DESCRIPTIVE_NAME` is something descriptive of the content. For example, `END_HTML` if I have an html fragment or `END_ICON` if I am embedding an encoded icon in a gui.
daotoad
+2  A: 

Here is a nice tutorial about HEREDOC.

gnab
A: 

Also note that the here-doc is assigned to the indicated position (index($strptime,"sub")+6) in $obj_strptime.

Berserk