summaryrefslogtreecommitdiff
path: root/Zend/tests/this_as_static.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/this_as_static.phpt')
-rw-r--r--Zend/tests/this_as_static.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/tests/this_as_static.phpt b/Zend/tests/this_as_static.phpt
new file mode 100644
index 0000000000..f094449c12
--- /dev/null
+++ b/Zend/tests/this_as_static.phpt
@@ -0,0 +1,12 @@
+--TEST--
+$this as static variable
+--FILE--
+<?php
+function foo() {
+ static $this;
+ var_dump($this);
+}
+foo();
+?>
+--EXPECTF--
+Fatal error: Cannot use $this as static variable in %sthis_as_static.php on line 3