mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +08:00
2f1f34952e
I'm removing the argument entirely here, but we might want to change this to passing null or and empty array instead, if the impact of dropping it entirely turns out to be too large. This was deprecated as part of https://wiki.php.net/rfc/deprecations_php_7_2 as a doc-only deprecation.
75 lines
843 B
PHP
75 lines
843 B
PHP
--TEST--
|
|
Test nowdoc and line numbering
|
|
--FILE--
|
|
<?php
|
|
function error_handler($num, $msg, $file, $line) {
|
|
echo $line,"\n";
|
|
}
|
|
set_error_handler('error_handler');
|
|
trigger_error("line", E_USER_ERROR);
|
|
$x = <<<EOF
|
|
EOF;
|
|
var_dump($x);
|
|
trigger_error("line", E_USER_ERROR);
|
|
$x = <<<'EOF'
|
|
EOF;
|
|
var_dump($x);
|
|
trigger_error("line", E_USER_ERROR);
|
|
$x = <<<EOF
|
|
test
|
|
EOF;
|
|
var_dump($x);
|
|
trigger_error("line", E_USER_ERROR);
|
|
$x = <<<'EOF'
|
|
test
|
|
EOF;
|
|
var_dump($x);
|
|
trigger_error("line", E_USER_ERROR);
|
|
$x = <<<EOF
|
|
test1
|
|
test2
|
|
|
|
test3
|
|
|
|
|
|
EOF;
|
|
var_dump($x);
|
|
trigger_error("line", E_USER_ERROR);
|
|
$x = <<<'EOF'
|
|
test1
|
|
test2
|
|
|
|
test3
|
|
|
|
|
|
EOF;
|
|
var_dump($x);
|
|
trigger_error("line", E_USER_ERROR);
|
|
echo "ok\n";
|
|
?>
|
|
--EXPECT--
|
|
6
|
|
string(0) ""
|
|
10
|
|
string(0) ""
|
|
14
|
|
string(4) "test"
|
|
19
|
|
string(4) "test"
|
|
24
|
|
string(20) "test1
|
|
test2
|
|
|
|
test3
|
|
|
|
"
|
|
34
|
|
string(20) "test1
|
|
test2
|
|
|
|
test3
|
|
|
|
"
|
|
44
|
|
ok
|