extract2.phpt
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHPT 代码 · 共 60 行
PHPT
60 行
--TEST--Log: _extractMessage() [Zend Engine 2]--SKIPIF--<?php if (version_compare(zend_version(), "2.0.0", "<")) die('skip'); ?>--FILE--<?phprequire_once 'Log.php';$conf = array('lineFormat' => '%2$s [%3$s] %4$s');$logger = &Log::singleton('console', '', 'ident', $conf);/* Logging a regular string. */$logger->log('String');/* Logging a bare object. */class BareObject {}$logger->log(new BareObject());/* Logging an object with a getMessage() method. */class GetMessageObject { function getMessage() { return "getMessage"; } }$logger->log(new GetMessageObject());/* Logging an object with a toString() method. */class ToStringObject { function toString() { return "toString"; } }$logger->log(new ToStringObject());/* Logging an object with a __toString() method using casting. */class CastableObject { function __toString() { return "__toString"; } }$logger->log(new CastableObject());/* Logging a PEAR_Error object. */require_once 'PEAR.php';$logger->log(new PEAR_Error('PEAR_Error object', 100));/* Logging an array. */$logger->log(array(1, 2, 'three' => 3));/* Logging an array with a 'message' key. */$logger->log(array('message' => 'Message Key'));--EXPECT--ident [info] Stringident [info] BareObject Object()ident [info] getMessageident [info] toStringident [info] Object id #2ident [info] PEAR_Error objectident [info] Array( [0] => 1 [1] => 2 [three] => 3)ident [info] Message Key
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?