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

📄 008.phpt

📁 PHP v6.0 For Linux 运行环境:Win9X/ WinME/ WinNT/ Win2K/ WinXP
💻 PHPT
字号:
--TEST--ReflectionProperty::getDefaultValue()--SKIPIF--<?php extension_loaded('reflection') or die('skip'); ?>--FILE--<?phpclass root{	public    $rPub = "rPub";	public    $xPub = "xPub";	protected $rPro = "rPro";	protected $xPro = "xPub";	private   $rPri = "rPri";	private   $xPri = "xPri";		static public $stat = "rStat";}class derived extends root{	public    $dPub = "dPub";	public    $xPub = "nPub";	protected $dPro = "dPro";	protected $xPro = "nPub";	private   $dPri = "dPri";	private   $xPri = "nPri";	}function show_prop($p){	echo "{$p->class}::{$p->name} = " . $p->getDefaultValue() . "\n";}function show_class($c){	echo "===$c===\n";	$r = new ReflectionClass($c);	foreach($r->getProperties() as $p)	{		show_prop($p);	}}show_class("root");show_class("derived");?>===DONE===<?php exit(0); ?>--EXPECTF--===root===root::rPub = rPubroot::xPub = xPubroot::rPro = rProroot::xPro = xPubroot::rPri = rPriroot::xPri = xPriroot::stat = rStat===derived===derived::dPub = dPubderived::xPub = nPubderived::dPro = dProderived::xPro = nPubderived::dPri = dPriderived::xPri = nPriderived::rPub = rPubderived::rPro = rProderived::stat = rStat===DONE===

⌨️ 快捷键说明

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