Skip to content

Commit

Permalink
Support 'b' prefix in front of string literals for forward compatibility
Browse files Browse the repository at this point in the history
with PHP 6.
  • Loading branch information
Andrei Zmievski committed Dec 19, 2006
1 parent 078fda3 commit 16ea2ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Zend/zend_language_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -1707,13 +1707,13 @@ NEWLINE ("\r"|"\n"|"\r\n")
}


<ST_IN_SCRIPTING>["] {
<ST_IN_SCRIPTING>b?["] {
BEGIN(ST_DOUBLE_QUOTES);
return '\"';
}
<ST_IN_SCRIPTING>"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} {
<ST_IN_SCRIPTING>b?"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} {
char *s;
CG(zend_lineno)++;
CG(heredoc_len) = yyleng-3-1-(yytext[yyleng-2]=='\r'?1:0);
Expand All @@ -1734,7 +1734,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>['] {
<ST_IN_SCRIPTING>b?['] {
BEGIN(ST_SINGLE_QUOTE);
return '\'';
}
Expand Down

0 comments on commit 16ea2ee

Please sign in to comment.