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-- Tests locking and unlocking within a single file --FILE-- <?php require_once '../..
Decoded Output download
--TEST--
Tests locking and unlocking within a single file
--FILE--
<?php
require_once '../includes/runner.php';
$adapterName = 'PEAR2\Cache\SHM\Adapter\' . $adapter;
$object = new $adapterName('TEST');
assertSame(true, $object->lock('key'), __FILE__);
assertSame(false, $object->lock('key'), __FILE__);
assertSame(true, $object->unlock('key'), __FILE__);
assertSame(false, $object->unlock('key'), __FILE__);
assertSame(true, $object->lock('key'), __FILE__);
assertSame(false, $object->lock('key'), __FILE__);
assertSame(true, $object->unlock('key'), __FILE__);
assertSame(false, $object->unlock('key'), __FILE__);
?>
--EXPECT--
Did this file decode correctly?
Original Code
--TEST--
Tests locking and unlocking within a single file
--FILE--
<?php
require_once '../includes/runner.php';
$adapterName = 'PEAR2\Cache\SHM\Adapter\\' . $adapter;
$object = new $adapterName('TEST');
assertSame(true, $object->lock('key'), __FILE__);
assertSame(false, $object->lock('key'), __FILE__);
assertSame(true, $object->unlock('key'), __FILE__);
assertSame(false, $object->unlock('key'), __FILE__);
assertSame(true, $object->lock('key'), __FILE__);
assertSame(false, $object->lock('key'), __FILE__);
assertSame(true, $object->unlock('key'), __FILE__);
assertSame(false, $object->unlock('key'), __FILE__);
?>
--EXPECT--
Function Calls
None |
Stats
MD5 | 06f325fc2464a4cfaf70ec896852c469 |
Eval Count | 0 |
Decode Time | 77 ms |