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-- SPL: ArrayObject with overridden count() --FILE-- <?php $obj = new ArrayObject(ar..
Decoded Output download
--TEST--
SPL: ArrayObject with overridden count()
--FILE--
<?php
$obj = new ArrayObject(array(1,2));
var_dump(count($obj));
class ArrayObject2 extends ArrayObject {
public function count(): int {
return -parent::count();
}
}
$obj = new ArrayObject2(array(1,2));
var_dump(count($obj));
?>
--EXPECT--
int(2)
int(-2)
Did this file decode correctly?
Original Code
--TEST--
SPL: ArrayObject with overridden count()
--FILE--
<?php
$obj = new ArrayObject(array(1,2));
var_dump(count($obj));
class ArrayObject2 extends ArrayObject {
public function count(): int {
return -parent::count();
}
}
$obj = new ArrayObject2(array(1,2));
var_dump(count($obj));
?>
--EXPECT--
int(2)
int(-2)
Function Calls
None |
Stats
MD5 | 38953fc6d5657646c0001d8ef4f9fc05 |
Eval Count | 0 |
Decode Time | 119 ms |