Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- shm_detach() tests --EXTENSIONS-- sysvshm --SKIPIF-- <?php if (!function_exists(..

Decoded Output download

--TEST--
shm_detach() tests
--EXTENSIONS--
sysvshm
--SKIPIF--
<?php

if (!function_exists('ftok')){ print 'skip'; }
?>
--FILE--
<?php

$key = ftok(__DIR__."/003.phpt", 'q');

$s = shm_attach($key);

var_dump(shm_detach($s));
try {
    shm_detach($s);
} catch (Error $exception) {
    echo $exception->getMessage() . "
";
}

try {
    shm_remove($s);
} catch (Error $exception) {
    echo $exception->getMessage() . "
";
}

echo "Done
";
?>
--CLEAN--
<?php

$key = ftok(__DIR__."/003.phpt", 'q');
$s = shm_attach($key);
shm_remove($s);

?>
--EXPECT--
bool(true)
Shared memory block has already been destroyed
Shared memory block has already been destroyed
Done

Did this file decode correctly?

Original Code

--TEST--
shm_detach() tests
--EXTENSIONS--
sysvshm
--SKIPIF--
<?php

if (!function_exists('ftok')){ print 'skip'; }
?>
--FILE--
<?php

$key = ftok(__DIR__."/003.phpt", 'q');

$s = shm_attach($key);

var_dump(shm_detach($s));
try {
    shm_detach($s);
} catch (Error $exception) {
    echo $exception->getMessage() . "\n";
}

try {
    shm_remove($s);
} catch (Error $exception) {
    echo $exception->getMessage() . "\n";
}

echo "Done\n";
?>
--CLEAN--
<?php

$key = ftok(__DIR__."/003.phpt", 'q');
$s = shm_attach($key);
shm_remove($s);

?>
--EXPECT--
bool(true)
Shared memory block has already been destroyed
Shared memory block has already been destroyed
Done

Function Calls

function_exists 1

Variables

None

Stats

MD5 7a1fb6c4d844a015333fe45ecceedb30
Eval Count 0
Decode Time 85 ms