summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-11-18 21:41:10 +0100
committerNikita Popov <nikic@php.net>2016-11-18 21:41:43 +0100
commit8bb39572704a480c929a9f4d52aa4bfd26fed1b2 (patch)
treefd83fd91b63e0b30da8464e0f2824249cb27053f /ext
parent828f866e47808749e1033a76d99fa6ecb2d87a65 (diff)
downloadphp-git-8bb39572704a480c929a9f4d52aa4bfd26fed1b2.tar.gz
Fixed bug #73303
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/tests/assert/bug73303.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/standard/tests/assert/bug73303.phpt b/ext/standard/tests/assert/bug73303.phpt
new file mode 100644
index 0000000000..57990aba60
--- /dev/null
+++ b/ext/standard/tests/assert/bug73303.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #73303: Scope not inherited by eval in assert()
+--FILE--
+<?php
+
+class Test {
+ public $prop;
+
+ public function main(){
+ assert('self::checkCacheKey(get_object_vars($this))');
+ echo 'Success';
+ }
+ private static function checkCacheKey($obj_properties){
+ return count($obj_properties) == 1;
+ }
+}
+
+$obj = new Test();
+$obj->main();
+
+?>
+--EXPECT--
+Success