Date: 07/06/00
- Next message: J C Lawrence: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Previous message: J C Lawrence: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- In reply to: J C Lawrence: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Next in thread: waldschrott: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Reply: waldschrott: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hmm, that means adding another option to here-docs.
I'm not sure, if/how we want to do this.
Andi
At 04:31 PM 7/6/00 -0700, J C Lawrence wrote:
>On 7 Jul 2000 23:16:40 -0000
>Bug Database <php-dev <email protected>> wrote:
>
> > ID: 5448 Updated by: andi Reported By: claw <email protected> Status:
> > Closed Bug Type: Scripting Engine problem Assigned To: Comments:
>
> > You need to escape backslahes in here-docs (\\)
>
>Whoa! Why? That seems backwards. If PHP is going to interpret
>here files you need to provide an option that allows them to be read
>as-is. In many cases we don't have control over the contents of a
>here file (I don't in this case), just its placement within the PHP
>file. Ergo, if that here file happens to contain backslashes you're
>screwed.
>
>Bash takes a useful approach that you may wish to emulate. Quoting
>from the manpage:
>
>--<cut>--
>The format of here-documents is as follows:
>
> <<[-]word
> here-document
> delimiter
>
>No parameter expansion, command substitution, arithmetic
>expansion, or pathname expansion is performed on word. If
>any characters in word are quoted, the delimiter is the
>result of quote removal on word, and the lines in the
>here-document are not expanded. If word is unquoted, all
>lines of the here-document are subjected to parameter
>expansion, command substitution, and arithmetic expansion.
>In the latter case, the character sequence \<newline> is
>ignored, and \ must be used to quote the characters \, $,
>and `.
>
>If the redirection operator is <<-, then all leading tab
>characters are stripped from input lines and the line
>containing delimiter. This allows here-documents within
>shell scripts to be indented in a natural fashion.
>--<cut>--
>
>--
>"Finally coming home" Home: claw <email protected>
>J C Lawrence Other: coder <email protected>
>----------(*) Keys etc: finger claw <email protected>
>--=| A man is as sane as he is dangerous to his environment |=--
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
>For additional commands, e-mail: php-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: J C Lawrence: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Previous message: J C Lawrence: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- In reply to: J C Lawrence: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Next in thread: waldschrott: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Reply: waldschrott: "Re: [PHP-DEV] PHP 4.0 Bug #5448 Updated: Backslashes in here files not happy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

