com php-src: add missing test for class member access with deference relates to https://wiki.php.net/rfc/uniform_variable_ syntax:
Zend/tests/varSyntax/constClassMemberAccess.phpt

From: Date: Wed, 11 Feb 2015 14:23:20 +0000
Subject: com php-src: add missing test for class member access with deference relates to https://wiki.php.net/rfc/uniform_variable_ syntax:
Zend/tests/varSyntax/constClassMemberAccess.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84811@lists.php.net to get a copy of this message
Commit: 1849546ada5dff9d1de14c3834cfb2176f52a3b1 Author: Márcio Almada <marcio3w@gmail.com> Mon, 9 Feb 2015 13:10:33 -0300 Committer: Bob Weinand <bobwei9@hotmail.com> Wed, 11 Feb 2015 15:23:20 +0100 Parents: 28959127565d85024c88051ffbe4541f7eeca8c2 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1849546ada5dff9d1de14c3834cfb2176f52a3b1 Log: add missing test for class member access with deference relates to https://wiki.php.net/rfc/uniform_variable_syntax Changed paths: A Zend/tests/varSyntax/constClassMemberAccess.phpt Diff: diff --git a/Zend/tests/varSyntax/constClassMemberAccess.phpt b/Zend/tests/varSyntax/constClassMemberAccess.phpt new file mode 100644 index 0000000..41d871a --- /dev/null +++ b/Zend/tests/varSyntax/constClassMemberAccess.phpt @@ -0,0 +1,27 @@ +--TEST-- +Const class member access with deference +--FILE-- +<?php + +class A { + const A = ['a' => ['b' => 'c']]; +} + +var_dump(A::A); +var_dump(A::A['a']); +var_dump(A::A['a']['b']); + +?> +--EXPECT-- +array(1) { + ["a"]=> + array(1) { + ["b"]=> + string(1) "c" + } +} +array(1) { + ["b"]=> + string(1) "c" +} +string(1) "c" \ No newline at end of file

« previous php.cvs (#84811) next »