Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F406284
Command-Line Input
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Authored By
avivey
Nov 24 2023, 17:09
2023-11-24 17:09:16 (UTC+0)
Size
608 B
Referenced Files
None
Subscribers
None
Command-Line Input
View Options
#!/usr/bin/env php
<?php
require_once
'scripts/__init_script__.php'
;
function
handler1
(
$event
,
$value
,
array
$metadata
)
{
echo
pht
(
'Handler 1 - event is `%s`'
.
"\n"
,
$event
)
;
}
function
handler2
(
$event
,
$value
,
array
$metadata
)
{
echo
pht
(
'Handler 2 - event is `%s`'
.
"\n"
,
$event
)
;
}
echo
"First error - no handler registered:\n"
;
strlen
(
null
)
;
echo
"\n"
;
PhutilErrorHandler
::
setErrorListener
(
"handler1"
)
;
echo
"Registered one handler, error again:\n"
;
strlen
(
null
)
;
echo
"\n"
;
PhutilErrorHandler
::
setErrorListener
(
"handler2"
)
;
echo
"Registered 2 handlers, error again:\n"
;
strlen
(
null
)
;
echo
"\n"
;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
284550
Default Alt Text
Command-Line Input (608 B)
Attached To
Mode
P26 test-logs-multilistener.php
Attached
Detach File
Event Timeline
Log In to Comment