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

📄 array_003.phpt

📁 PHP v6.0 For Linux 运行环境:Win9X/ WinME/ WinNT/ Win2K/ WinXP
💻 PHPT
字号:
--TEST--SPL: ArrayObject from object--SKIPIF--<?php if (!extension_loaded("spl")) print "skip"; ?>--FILE--<?php// This test also needs to exclude the protected and private variables // since they cannot be accessed from the external object which iterates // them.class test{	public    $pub = "public";	protected $pro = "protected";	private   $pri = "private";		function __construct()	{		$this->imp = "implicit";	}};$test = new test;$test->dyn = "dynamic";print_r($test);$object = new ArrayObject($test);print_r($object);foreach($test as $key => $val){	echo "$key => $val\n";}?>===DONE===<?php exit(0); ?>--EXPECTF--test Object(    [pub] => public    [pro:protected] => protected    [pri:test:private] => private    [imp] => implicit    [dyn] => dynamic)ArrayObject Object(    [pub] => public    [pro:protected] => protected    [pri:test:private] => private    [imp] => implicit    [dyn] => dynamic)pub => publicimp => implicitdyn => dynamic===DONE===

⌨️ 快捷键说明

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