1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-11 08:59:46 +01:00
PHP-Parser/test/code/parser/scalar/constantString.test

60 lines
931 B
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(
0: Scalar_String(
value:
)
1: Scalar_String(
value:
)
2: Scalar_String(
value:
)
3: Scalar_String(
value:
)
4: Scalar_String(
value: Hi
)
5: Scalar_String(
value: Hi
)
6: Scalar_String(
value: Hi
)
7: Scalar_String(
value: Hi
)
8: Scalar_String(
2016-04-02 14:15:49 +02:00
value: Hi
2011-11-26 17:10:18 +01:00
)
9: Scalar_String(
2016-04-02 14:15:49 +02:00
value: Hi
)
10: Scalar_String(
value: !'!\!\a!
)
11: Scalar_String(
2011-11-26 17:10:18 +01:00
value: !"!\!$!
2016-04-05 03:17:30 +02:00
!@@{ "\r" }@@!@@{ "\t" }@@!@@{ "\f" }@@!@@{ "\v" }@@!@@{ chr(27) /* "\e" */ }@@!\a
2011-11-26 17:10:18 +01:00
)
2016-04-02 14:15:49 +02:00
12: Scalar_String(
2011-11-26 17:10:18 +01:00
value: !@@{ chr(255) }@@!@@{ chr(255) }@@!@@{ chr(0) }@@!@@{ chr(0) }@@!
)
)