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 #38624 (Strange warning when incrementing an object property and exception is..
Decoded Output download
--TEST--
Bug #38624 (Strange warning when incrementing an object property and exception is thrown from __get method)
--FILE--
<?php
class impl
{
public function __construct()
{
$this->counter++;
}
public function __set( $name, $value )
{
throw new Exception( "doesn't work" );
}
public function __get( $name )
{
throw new Exception( "doesn't work" );
}
}
$impl = new impl();
echo "Done
";
?>
--EXPECTF--
Fatal error: Uncaught Exception: doesn't work in %s:%d
Stack trace:
#0 %s(%d): impl->__get('counter')
#1 %s(%d): impl->__construct()
#2 {main}
thrown in %s on line %d
Did this file decode correctly?
Original Code
--TEST--
Bug #38624 (Strange warning when incrementing an object property and exception is thrown from __get method)
--FILE--
<?php
class impl
{
public function __construct()
{
$this->counter++;
}
public function __set( $name, $value )
{
throw new Exception( "doesn't work" );
}
public function __get( $name )
{
throw new Exception( "doesn't work" );
}
}
$impl = new impl();
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught Exception: doesn't work in %s:%d
Stack trace:
#0 %s(%d): impl->__get('counter')
#1 %s(%d): impl->__construct()
#2 {main}
thrown in %s on line %d
Function Calls
None |
Stats
MD5 | 8fe4dd030795ac90741b808fb002de74 |
Eval Count | 0 |
Decode Time | 103 ms |