mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
ea3c541640
* Added missing global cases to test * Update gh13142
40 lines
828 B
PHP
40 lines
828 B
PHP
--TEST--
|
|
GH-13142 (Undefined variable name is shortened when contains \0)
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = "test\0test";
|
|
$$a;
|
|
$a = "\0test";
|
|
$$a;
|
|
$a = "test\0";
|
|
$$a;
|
|
|
|
$GLOBALS["test\0test"];
|
|
$GLOBALS["\0test"];
|
|
$GLOBALS["test\0"];
|
|
|
|
compact("a\0b");
|
|
compact("\0ab");
|
|
compact("ab\0");
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined variable $test%0test in %s on line %d
|
|
|
|
Warning: Undefined variable $%0test in %s on line %d
|
|
|
|
Warning: Undefined variable $test%0 in %s on line %d
|
|
|
|
Warning: Undefined global variable $test%0test in %s on line %d
|
|
|
|
Warning: Undefined global variable $%0test in %s on line %d
|
|
|
|
Warning: Undefined global variable $test%0 in %s on line %d
|
|
|
|
Warning: compact(): Undefined variable $a%0b in %s on line %d
|
|
|
|
Warning: compact(): Undefined variable $%0ab in %s on line %d
|
|
|
|
Warning: compact(): Undefined variable $ab%0 in %s on line %d
|