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-- User streams and incrrectly typed context --FILE-- <?php class Wrapper { publ..

Decoded Output download

--TEST--
User streams and incrrectly typed context
--FILE--
<?php
class Wrapper {
    public Foo $context;
}
if (stream_wrapper_register('foo', Wrapper::class)) dir('foo://');
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Cannot assign resource to property Wrapper::$context of type Foo in %suser_streams_context_001.php:5
Stack trace:
#0 %suser_streams_context_001.php(5): dir('foo://')
#1 {main}
  thrown in %suser_streams_context_001.php on line 5

Did this file decode correctly?

Original Code

--TEST--
User streams and incrrectly typed context
--FILE--
<?php
class Wrapper {
    public Foo $context;
}
if (stream_wrapper_register('foo', Wrapper::class)) dir('foo://');
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Cannot assign resource to property Wrapper::$context of type Foo in %suser_streams_context_001.php:5
Stack trace:
#0 %suser_streams_context_001.php(5): dir('foo://')
#1 {main}
  thrown in %suser_streams_context_001.php on line 5

Function Calls

None

Variables

None

Stats

MD5 d3ff7dce6f62ec574052e31db6ef6229
Eval Count 0
Decode Time 90 ms