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-- Factory::createStreamFromResource() with invalid argument --FILE-- <?php $factory..

Decoded Output download

--TEST--
Factory::createStreamFromResource() with invalid argument
--FILE--
<?php
$factory = new HttpMessage\Factory();

try {
    $factory->createStreamFromResource([]);
} catch (TypeError $e) {
    echo $e->getMessage(), "
";
}

?>
--EXPECT--
Expected parameter 1 to be a string or resource, array given

Did this file decode correctly?

Original Code

--TEST--
Factory::createStreamFromResource() with invalid argument
--FILE--
<?php
$factory = new HttpMessage\Factory();

try {
    $factory->createStreamFromResource([]);
} catch (TypeError $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Expected parameter 1 to be a string or resource, array given

Function Calls

None

Variables

None

Stats

MD5 85c6b18d5756af2f0b94283849f0d152
Eval Count 0
Decode Time 73 ms