diff options
author | Johannes Schlüter <johannes@php.net> | 2007-08-02 21:55:23 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2007-08-02 21:55:23 +0000 |
commit | b3c6a9dffcc3cea84b51da9acd0f0487a2aec871 (patch) | |
tree | acd0be25a1b114868a853c8d865dac7355d64365 /tests/lang/041.phpt | |
parent | 48d5519378cb4d724ba86c2f90a7d391ff4d3e15 (diff) | |
download | php-git-b3c6a9dffcc3cea84b51da9acd0f0487a2aec871.tar.gz |
- Add possibility to call static class members using variables (Etienne Kneuss)
Diffstat (limited to 'tests/lang/041.phpt')
-rw-r--r-- | tests/lang/041.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lang/041.phpt b/tests/lang/041.phpt new file mode 100644 index 0000000000..930e912f6d --- /dev/null +++ b/tests/lang/041.phpt @@ -0,0 +1,20 @@ +--TEST-- +Dynamic access of static members +--FILE-- +<?php +class A { + public static $b = 'foo'; +} + +$classname = 'A'; +$wrongClassname = 'B'; + +echo $classname::$b."\n"; +echo $wrongClassname::$b."\n"; + +?> +===DONE=== +--EXPECTF-- +foo + +Fatal error: Class 'B' not found in %s041.php on line %d |