Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F34132898
memcached-excimer.php
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
tstarling
Mar 3 2021, 2:56 AM
2021-03-03 02:56:38 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
memcached-excimer.php
View Options
<?php
header
(
'Content-Type: text/plain; charset=utf-8'
);
set_error_handler
(
'handle_error'
);
$t
=
microtime
(
true
);
while
(
microtime
(
true
)
-
$t
<
10
)
{
$timer
=
new
ExcimerTimer
;
$timer
->
setPeriod
(
0.01
);
$timer
->
setCallback
(
function
()
{
throw
new
RuntimeException
;
}
);
$timer
->
start
();
while
(
microtime
(
true
)
-
$t
<
10
)
{
try
{
while
(
microtime
(
true
)
-
$t
<
10
)
{
try
{
$memcached
=
new
Memcached
;
}
catch
(
RuntimeException
$e
)
{
echo
"Caught exception from constructor
\n
"
;
}
if
(
!
$memcached
)
{
continue
;
}
try
{
$memcached
->
addServer
(
'localhost'
,
11211
);
}
catch
(
RuntimeException
$e
)
{
echo
"Caught exception from addServer
\n
"
;
}
try
{
$memcached
->
get
(
'test'
);
}
catch
(
RuntimeException
$e
)
{
echo
"Caught exception from get
\n
"
;
}
try
{
$memcached
=
null
;
}
catch
(
RuntimeException
$e
)
{
echo
"Caught exception from destructor
\n
"
;
var_dump
(
$memcached
);
$memcached
->
get
(
'test'
);
}
}
}
catch
(
RuntimeException
$e
)
{
echo
"Caught exception from somewhere else
\n
"
;
}
}
}
echo
"Done
\n
"
;
function
handle_error
(
$errno
,
$errstr
,
$errfile
,
$errline
,
$errcontext
)
{
echo
"Got error: $errstr
\n
"
;
print
(
new
Exception
)->
getTraceAsString
();
exit
;
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8907284
Default Alt Text
memcached-excimer.php (1 KB)
Attached To
Mode
P14574 memcached-excimer.php
Attached
Detach File
Event Timeline
Log In to Comment