Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / prettyPrinter / expr / variables.test
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test
new file mode 100644 (file)
index 0000000..4e0fa2e
--- /dev/null
@@ -0,0 +1,73 @@
+Variables
+-----
+<?php
+
+$a;
+$$a;
+${$a};
+$a->b;
+$a->b();
+$a->b($c);
+$a->$b();
+$a->{$b}();
+$a->$b[$c]();
+$$a->b;
+$a[$b];
+$a[$b]();
+$$a[$b];
+$a::B;
+$a::$b;
+$a::b();
+$a::b($c);
+$a::$b();
+$a::$b[$c];
+$a::$b[$c]($d);
+$a::{$b[$c]}($d);
+$a::{$b->c}();
+A::$$b[$c]();
+a();
+$a();
+$a()[$b];
+$a->b()[$c];
+$a::$b()[$c];
+(new A)->b;
+(new A())->b();
+(new $$a)[$b];
+(new $a->b)->c;
+
+global $a, $$a, $$a[$b], $$a->b;
+-----
+!!php5
+$a;
+${$a};
+${$a};
+$a->b;
+$a->b();
+$a->b($c);
+$a->{$b}();
+$a->{$b}();
+$a->{$b[$c]}();
+${$a}->b;
+$a[$b];
+$a[$b]();
+${$a[$b]};
+$a::B;
+$a::$b;
+$a::b();
+$a::b($c);
+$a::$b();
+$a::$b[$c];
+$a::{$b[$c]}($d);
+$a::{$b[$c]}($d);
+$a::{$b->c}();
+A::${$b[$c]}();
+a();
+$a();
+$a()[$b];
+$a->b()[$c];
+$a::$b()[$c];
+(new A())->b;
+(new A())->b();
+(new ${$a}())[$b];
+(new $a->b())->c;
+global $a, ${$a}, ${$a[$b]}, ${$a->b};