php-parser/test/code/parser/scalar/constantString.test

86 lines
1.5 KiB
Plaintext
Raw Normal View History

2011-11-26 17:10:18 +01:00
Constant string syntaxes
-----
<?php
2011-11-27 11:20:35 +01:00
2011-11-26 17:10:18 +01:00
'';
"";
b'';
b"";
'Hi';
b'Hi';
2016-04-02 14:15:49 +02:00
B'Hi';
2011-11-26 17:10:18 +01:00
"Hi";
b"Hi";
2016-04-02 14:15:49 +02:00
B"Hi";
2011-11-26 17:10:18 +01:00
'!\'!\\!\a!';
"!\"!\\!\$!\n!\r!\t!\f!\v!\e!\a";
2011-11-26 17:10:18 +01:00
"!\xFF!\377!\400!\0!";
-----
array(
2017-01-19 22:31:29 +01:00
0: Stmt_Expression(
expr: Scalar_String(
value:
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
1: Stmt_Expression(
expr: Scalar_String(
value:
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
2: Stmt_Expression(
expr: Scalar_String(
value:
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
3: Stmt_Expression(
expr: Scalar_String(
value:
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
4: Stmt_Expression(
expr: Scalar_String(
value: Hi
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
5: Stmt_Expression(
expr: Scalar_String(
value: Hi
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
6: Stmt_Expression(
expr: Scalar_String(
value: Hi
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
7: Stmt_Expression(
expr: Scalar_String(
value: Hi
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
8: Stmt_Expression(
expr: Scalar_String(
value: Hi
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
9: Stmt_Expression(
expr: Scalar_String(
value: Hi
)
2016-04-02 14:15:49 +02:00
)
2017-01-19 22:31:29 +01:00
10: Stmt_Expression(
expr: Scalar_String(
value: !'!\!\a!
)
2016-04-02 14:15:49 +02:00
)
2017-01-19 22:31:29 +01:00
11: Stmt_Expression(
expr: Scalar_String(
value: !"!\!$!
!@@{ "\r" }@@!@@{ "\t" }@@!@@{ "\f" }@@!@@{ "\v" }@@!@@{ chr(27) /* "\e" */ }@@!\a
)
2011-11-26 17:10:18 +01:00
)
2017-01-19 22:31:29 +01:00
12: Stmt_Expression(
expr: Scalar_String(
value: !@@{ chr(255) }@@!@@{ chr(255) }@@!@@{ chr(0) }@@!@@{ chr(0) }@@!
)
2011-11-26 17:10:18 +01:00
)
)