-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
31 lines (24 loc) · 783 Bytes
/
example.php
File metadata and controls
31 lines (24 loc) · 783 Bytes
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
<?php
function wrapperCall($a, $b) {
echo 'Wrapper: ' . $a . '+' . $b;
}
class TestClass {
public function __construct($c, $d) {
$this->c = $c;
$this->d = $d;
}
public function instanceCall($a, $b) {
echo 'Instance-Call: ' . $a . '+' . $b . '+' . $this->c . '+' . $this->d;
}
public static function staticCall($a, $b) {
echo 'Static-Call: ' . $a . '+' . $b;
}
}
$a = '0';
$b = '1';
$c = '2';
$d = '3';
ShutdownScheduler::getInstance()->registerClass('TestClass', 'instanceCall', array($a, $b), array($c, $d));
ShutdownScheduler::getInstance()->registerStaticClass('TestClass', 'staticCall', array($a, $b));
ShutdownScheduler::getInstance()->registerWrapper('wrapperCall', array($a, $b));
ShutdownScheduler::getInstance()->registerWrapper('session_write_close');