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-- Bug #62328 (cast_object takes precedence over __toString) --CREDITS-- leight at g..

Decoded Output download

--TEST--
Bug #62328 (cast_object takes precedence over __toString)
--CREDITS--
leight at gmail dot com
--FILE--
<?php

class SplFileInfo62328 extends SplFileInfo
{
    public function __toString()
    {
        return '__toString';
    }
}

$fi = new SplFileInfo62328(__FILE__);

echo (string)$fi . PHP_EOL;
echo (string)$fi->__toString() . PHP_EOL;

?>
--EXPECT--
__toString
__toString

Did this file decode correctly?

Original Code

--TEST--
Bug #62328 (cast_object takes precedence over __toString)
--CREDITS--
leight at gmail dot com
--FILE--
<?php

class SplFileInfo62328 extends SplFileInfo
{
    public function __toString()
    {
        return '__toString';
    }
}

$fi = new SplFileInfo62328(__FILE__);

echo (string)$fi . PHP_EOL;
echo (string)$fi->__toString() . PHP_EOL;

?>
--EXPECT--
__toString
__toString

Function Calls

None

Variables

None

Stats

MD5 c776d91583fe238a9726a99883699e4f
Eval Count 0
Decode Time 81 ms