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-- Eos\DataStructures\Struct get handler --SKIPIF-- <?php include __DIR__ . '/../../..
Decoded Output download
--TEST--
Eos\DataStructures\Struct get handler
--SKIPIF--
<?php
include __DIR__ . '/../../skipif.inc';
?>
--FILE--
<?php
use Eos\DataStructures\Struct;
class Fruit extends Struct {
public $apple;
protected $banana;
private $pear;
}
$fruit = new Fruit(['banana' => 2,
'apple' => 1,
'pear' => 3
]);
echo $fruit->pear, PHP_EOL;
// haha, immutable, you cannot write!
try {
$fruit->pear = 2;
} catch (Error $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
3
Cannot access private property Fruit::$pear
Did this file decode correctly?
Original Code
--TEST--
Eos\DataStructures\Struct get handler
--SKIPIF--
<?php
include __DIR__ . '/../../skipif.inc';
?>
--FILE--
<?php
use Eos\DataStructures\Struct;
class Fruit extends Struct {
public $apple;
protected $banana;
private $pear;
}
$fruit = new Fruit(['banana' => 2,
'apple' => 1,
'pear' => 3
]);
echo $fruit->pear, PHP_EOL;
// haha, immutable, you cannot write!
try {
$fruit->pear = 2;
} catch (Error $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECT--
3
Cannot access private property Fruit::$pear
Function Calls
None |
Stats
MD5 | dfb862d732a87be7f58757b18fedd96a |
Eval Count | 0 |
Decode Time | 113 ms |