1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
<?php /** * Test tokens that appeared in PHP 5 * T_ABSTRACT * T_CATCH * T_FINAL * T_INSTANCEOF * T_PRIVATE * T_PROTECTED * T_PUBLIC * T_THROW * T_TRY * T_CLONE * T_INTERFACE * T_IMPLEMENTS * * PHP versions 4 and 5 * * @category PHP * @package PHP_CompatInfo * @author Laurent Laville <pear@laurent-laville.org> * @license http://www.opensource.org/licenses/bsd-license.php BSD * @version CVS: $Id: tokens.php5,v 1.2 2008/07/22 20:27:11 farell Exp $ * @link http://pear.php.net/package/PHP_CompatInfo * @ignore */
require_once 'PHP/CompatInfo.php';
/** * @ignore */ abstract class AbstractClass { abstract protected function getValue(); } /** * @ignore */ interface ITemplate { public function setVariable($name, $var); public function getHtml($template); } /** * @ignore */ class Template implements ITemplate { private $vars = array();
public function setVariable($name, $var) { $this->vars[$name] = $var; }
public function getHtml($template) { foreach ($this->vars as $name => $value) { $template = str_replace('{' . $name . '}', $value, $template); } return $template; } } /** * @ignore */ class BaseClass { public $objet1; public $objet2;
public function __construct() { }
public function __clone() { $this->object1 = clone($this->object1); }
private function foo() { }
protected function bar() { if ($this->object1 instanceof BaseClass) { return; }
try { $error = 'my error'; throw new Exception($error);
} catch(Exception $__bar_exception) {
} }
final public function moreTesting() { echo "BaseClass::moreTesting() called \n"; } } ?>
|