[RFC] Double quoted NOWDOC is HEREDOC

From: Date: Sat, 22 Mar 2008 20:17:27 +0000
Subject: [RFC] Double quoted NOWDOC is HEREDOC
Groups: php.internals 
Request: Send a blank email to internals+get-36335@lists.php.net to get a copy of this message
Hi, as we introduce NOWDOC in 5.3 it would be logical to allow a double quoted syntax sister of NOWDOC which acts as HEREDOC (same as for $var = "$var" vs $var = '$var'). Currently we have the following options: $var = "Hello world"; $str = <<<LABEL $var LABEL; $str = <<<'LABEL' $var LABEL; The first one is HEREDOC and $var would be evaluated. The second one is NOWDOC and $var would be used literally. The following patch adds a third version: $str = <<<"LABEL" $var LABEL; This acts as HEREDOC, therefore $var would be interpreted. Comments? cu, Lars

Attachment: [text/x-patch] double-quote-heredoc.diff
Attachment: [application/x-php] heredoc_012.phpt
Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc
« previous php.internals (#36335) next »