Bug #70586 [Com]: When i try ${'_'.'POST'} i get: Notice: Undefined variable: _POST in

[email protected] ("[email protected]")
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=70586&edit=1

 ID:                 70586
 Comment by:         [email protected]
 Reported by:        DAVIDhaker at yandex dot ru
 Summary:            When i try ${'_'.'POST'} i get: Notice: Undefined
                     variable: _POST in
 Status:             Open
 Type:               Bug
 Package:            Variables related
 Operating System:   Windows 10 Pro x64
 PHP Version:        5.6.14RC1
 Block user comment: N
 Private report:     N

 New Comment:

Looks like it's fixed in PHP 7: https://3v4l.org/u5Snj

Also seems to indeed be specific to `__call` within a class. I don't get this for just var_dump() at top-level.


Previous Comments:
------------------------------------------------------------------------
[2015-09-25 20:46:04] DAVIDhaker at yandex dot ru

Description:
------------
When i try ${'_'.'POST'} in object __call i get: Notice: Undefined variable: _POST in ...

Test script:
---------------
<?php
	class A {
		public function __call($method, $args){
			var_dump($_POST, ${'_POST'}, ${'_'.'POST'}, '_POST' == '_'.'POST', $_POST == ${'_POST'});
		}
	}
	$class = new A();
	$class->test();

Expected result:
----------------
array(0) { } array(0) { } NULL bool(true) bool(true)



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70586&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.