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-- dl() fails when trying to load full path to module --CREDITS-- Tom Van Herreweghe..

Decoded Output download

--TEST--
dl() fails when trying to load full path to module
--CREDITS--
Tom Van Herreweghe <[email protected]>
User Group: PHP-WVL & PHPGent #PHPTestFest
--SKIPIF--
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
    die('skip dl() is not enabled for ' . php_sapi_name());
}
if (getenv('SKIP_ASAN')) die('skip dl() crashes LSan');
?>
--INI--
enable_dl=1
--FILE--
<?php
var_dump(dl('/path/to/module'));
?>
--EXPECTF--

Warning: dl(): Temporary module name should contain only filename in %s on line %d
bool(false)

Did this file decode correctly?

Original Code

--TEST--
dl() fails when trying to load full path to module
--CREDITS--
Tom Van Herreweghe <[email protected]>
User Group: PHP-WVL & PHPGent #PHPTestFest
--SKIPIF--
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
    die('skip dl() is not enabled for ' . php_sapi_name());
}
if (getenv('SKIP_ASAN')) die('skip dl() crashes LSan');
?>
--INI--
enable_dl=1
--FILE--
<?php
var_dump(dl('/path/to/module'));
?>
--EXPECTF--

Warning: dl(): Temporary module name should contain only filename in %s on line %d
bool(false)

Function Calls

php_sapi_name 1

Variables

$enabled_sapi [{'key': 0, 'value': 'cgi-fcgi'}, {'key': 1, 'value': 'cli'}, {'key': 2, 'value': 'embed'}, {'key': 3, 'value': 'fpm'}]

Stats

MD5 0bbb3353f17fd9bbce7f62256e2c47ae
Eval Count 0
Decode Time 73 ms