X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php80-pecl-xhprof-tideways_5.0.4-2.el8/tests
opt
/
alt
/
tests
/
alt-php80-pecl-xhprof-tideways_5.0.4-2.el8
/
tests
/
ðŸ“
..
📄
common.php
(1.56 KB)
📄
xhprof_001.phpt
(4.03 KB)
📄
xhprof_002.phpt
(1.87 KB)
📄
xhprof_003.phpt
(1.42 KB)
📄
xhprof_004.phpt
(567 B)
📄
xhprof_005.phpt
(199 B)
📄
xhprof_006.phpt
(896 B)
📄
xhprof_007.phpt
(1000 B)
📄
xhprof_008.inc
(97 B)
📄
xhprof_008.phpt
(577 B)
Editing: xhprof_003.phpt
--TEST-- Tideways: Test Class Methods, Constructors, Destructors. --FILE-- <?php include_once dirname(__FILE__).'/common.php'; class C { private static $_static_attr = "i am a class static"; private $_attr; function __construct($attr) { echo "In constructor...\n"; $this->_attr = $attr; } private static function inner_static() { return C::$_static_attr; } public static function outer_static() { return C::inner_static(); } public function get_attr() { return $this->_attr; } function __destruct() { echo "Destroying class {$this->_attr}\n"; } } tideways_xhprof_enable(); // static methods echo C::outer_static() . "\n"; // constructor $obj = new C("Hello World"); // instance methods $obj->get_attr(); // destructor $obj = null; $output = tideways_xhprof_disable(); echo "Profiler data for 'Class' tests:\n"; print_canonical($output); echo "\n"; ?> --EXPECT-- i am a class static In constructor... Destroying class Hello World Profiler data for 'Class' tests: C::outer_static==>C::inner_static : ct= 1; wt=*; main() : ct= 1; wt=*; main()==>C::__construct : ct= 1; wt=*; main()==>C::__destruct : ct= 1; wt=*; main()==>C::get_attr : ct= 1; wt=*; main()==>C::outer_static : ct= 1; wt=*; main()==>tideways_xhprof_disable : ct= 1; wt=*;
Upload File
Create Folder