File: gh99.phpt

package info (click to toggle)
php-uopz 7.1.1%2B%2B-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 688 kB
  • sloc: ansic: 2,137; xml: 335; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 372 bytes parent folder | download
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
--TEST--
get hook not case insensitive
--EXTENSIONS--
uopz
--INI--
uopz.disable=0
--FILE--
<?php

declare(strict_types=1);

function Stub() {
    return 123;
}

uopz_set_hook('Stub', function () {
    var_dump('hook called');
});

$a = uopz_get_hook('Stub');

var_dump(Stub());

var_dump($a);
?>
--EXPECTF--
string(11) "hook called"
int(123)
object(Closure)#1 (%d) {%A
}