-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex-test.php
47 lines (35 loc) · 998 Bytes
/
index-test.php
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
<?php
require 'vendor/autoload.php';
use Test\UserTest;
use ModernPHPException\ModernPHPException;
$config = __DIR__ . '/config.example.yaml';
//$config = "";
$exc = new ModernPHPException($config);
//$exc->enableOccurrences();
//$exc->ignoreErrors([E_USER_DEPRECATED, E_WARNING]);
$exc->start();
//http_response_code(404);
#echo '<pre>';
//throw new Exception("<script>alert('test from JS')</script>");
/* trigger_error("Test trigger", E_USER_DEPRECATED);
echo "After trigger function"; */
UserTest::staticCall();
/* function dividir($x, $y) {
if ($y == 0) {
throw new \Exception('é uma divisão por zero.');
}
$resultado = $x / $y;
return $resultado;
};
try {
echo dividir(5,3);
echo get_debug_backtrace();
} catch (\Exception $e) {
$exc->exceptionHandler($e);
//echo $e->getMessage();
} */
/* $a = (new UserTest())->secondCall();
var_dump_debug($a, true); */
//echo $a;
//$a = new FakeClass(); //FATAL ERROR
//(new UserTest())->triggerTest();