⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bug37816.phpt

📁 PHP v6.0 For Linux 运行环境:Win9X/ WinME/ WinNT/ Win2K/ WinXP
💻 PHPT
字号:
--TEST--Bug #37816 (ReflectionProperty does not throw exception when accessing protected attribute)--FILE--<?phpclass TestClass{	protected $p = 2;}$o = new TestClass;$r = new ReflectionProperty($o, 'p');try{	$x = $r->getValue($o);}catch (Exception $e){	echo 'Caught: ' . $e->getMessage() . "\n";}?>===DONE===--EXPECTF--Caught: Cannot access non-public member TestClass::p===DONE===

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -