1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

Merge branch 'PHP-7.1'

This commit is contained in:
Christoph M. Becker
2016-10-14 14:15:31 +02:00
5 changed files with 5122 additions and 5264 deletions
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #72918 (negative offset inside a quoted string leads to parse error)
--FILE--
<?php
$array = [-3 => 'foo'];
$string = 'abcde';
echo "$array[-3]\n";
echo "$string[-3]\n";
echo <<<EOT
$array[-3]
$string[-3]
EOT;
?>
===DONE===
--EXPECT--
foo
c
foo
c
===DONE===
+1
View File
@@ -1249,6 +1249,7 @@ encaps_var:
encaps_var_offset:
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| '-' T_NUM_STRING { $$ = zend_ast_create(ZEND_AST_UNARY_MINUS, $2); }
| T_VARIABLE { $$ = zend_ast_create(ZEND_AST_VAR, $1); }
;
+5097 -5262
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1877,7 +1877,7 @@ inline_char_handler:
}
<ST_VAR_OFFSET>{TOKENS}|[{}"`] {
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
/* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */
RETURN_TOKEN(yytext[0]);
}
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.16 */
/* Generated by re2c 0.13.5 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {