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 #77664 (Segmentation fault when using undefined constant in custom wrapper) -..

Decoded Output download

--TEST--
BUG #77664 (Segmentation fault when using undefined constant in custom wrapper)
--FILE--
<?php
class ErrorWrapper {
    public $context;
    public $var = self::INVALID;
}
stream_wrapper_register('error',ErrorWrapper::class);
file_get_contents('error://test');
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant self::INVALID in %s:%d
Stack trace:
#0 %sbug77664.php(%d): file_get_contents('error://test')
#1 {main}
  thrown in %sbug77664.php on line %d

Did this file decode correctly?

Original Code

--TEST--
BUG #77664 (Segmentation fault when using undefined constant in custom wrapper)
--FILE--
<?php
class ErrorWrapper {
    public $context;
    public $var = self::INVALID;
}
stream_wrapper_register('error',ErrorWrapper::class);
file_get_contents('error://test');
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant self::INVALID in %s:%d
Stack trace:
#0 %sbug77664.php(%d): file_get_contents('error://test')
#1 {main}
  thrown in %sbug77664.php on line %d

Function Calls

None

Variables

None

Stats

MD5 30fcc9b589dd698c21c8987719782302
Eval Count 0
Decode Time 77 ms