PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.0.1
Defender Security – Malware Scanner, Login Security & Firewall v6.0.1
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / vendor / thecodingmachine / safe / generated / funchand.php

funchand.php in Defender Security – Malware Scanner, Login Security & Firewall 6.0.1, at vendor/thecodingmachine/safe/generated/funchand.php

48 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Safe;
4
5 use Safe\Exceptions\FunchandException;
6
7 /**
8 * Creates an anonymous function from the parameters passed, and
9 * returns a unique name for it.
10 *
11 * @param string $args The function arguments.
12 * @param string $code The function code.
13 * @return string Returns a unique function name as a string.
14 * @throws FunchandException
15 *
16 */
17 function create_function(string $args, string $code): string
18 {
19 error_clear_last();
20 $result = \create_function($args, $code);
21 if ($result === false) {
22 throw FunchandException::createFromPhpError();
23 }
24 return $result;
25 }
26
27
28 /**
29 *
30 *
31 * @param callable(): void $function The function to register.
32 * @param mixed $params
33 * @throws FunchandException
34 *
35 */
36 function register_tick_function(callable $function, ...$params): void
37 {
38 error_clear_last();
39 if ($params !== []) {
40 $result = \register_tick_function($function, ...$params);
41 } else {
42 $result = \register_tick_function($function);
43 }
44 if ($result === false) {
45 throw FunchandException::createFromPhpError();
46 }
47 }
48