mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
43 lines
442 B
PHP
43 lines
442 B
PHP
--TEST--
|
|
Testing heredoc (double quotes) with escape sequences
|
|
--FILE--
|
|
<?php
|
|
|
|
$test = <<<"TEST"
|
|
TEST;
|
|
|
|
var_dump(strlen($test) == 0);
|
|
|
|
$test = <<<"TEST"
|
|
\
|
|
TEST;
|
|
|
|
var_dump(strlen($test) == 1);
|
|
|
|
$test = <<<"TEST"
|
|
\0
|
|
TEST;
|
|
|
|
var_dump(strlen($test) == 1);
|
|
|
|
$test = <<<"TEST"
|
|
\n
|
|
TEST;
|
|
|
|
var_dump(strlen($test) == 1);
|
|
|
|
$test = <<<"TEST"
|
|
\\'
|
|
TEST;
|
|
|
|
var_dump(strlen($test) == 2);
|
|
|
|
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|