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-- CLI long options --SKIPIF-- <?php include "skipif.inc"; if (substr(PHP_OS, 0, 3) ..

Decoded Output download

--TEST--
CLI long options
--SKIPIF--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
    die ("skip not for Windows");
}
?>
--FILE--
<?php

$php = getenv('TEST_PHP_EXECUTABLE');


echo `"$php" -n --version | grep built:`;
echo `echo "<?php print_r(\\$argv);" | "$php" -n -- foo bar baz`, "
";
echo `"$php" -n --version foo bar baz | grep built:`;
echo `"$php" -n --notexisting foo bar baz 2>&1 | grep Usage:`;

echo "Done
";
?>
--EXPECTF--
PHP %d.%d.%d%s(cli) (built: %s)%s
Array
(
    [0] => Standard input code
    [1] => foo
    [2] => bar
    [3] => baz
)

PHP %d.%d.%d%s(cli) (built: %s)%s
Usage: %s [options] [-f] <file> [--] [args...]
Done

Did this file decode correctly?

Original Code

--TEST--
CLI long options
--SKIPIF--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
    die ("skip not for Windows");
}
?>
--FILE--
<?php

$php = getenv('TEST_PHP_EXECUTABLE');


echo `"$php" -n --version | grep built:`;
echo `echo "<?php print_r(\\\$argv);" | "$php" -n -- foo bar baz`, "\n";
echo `"$php" -n --version foo bar baz | grep built:`;
echo `"$php" -n --notexisting foo bar baz 2>&1 | grep Usage:`;

echo "Done\n";
?>
--EXPECTF--
PHP %d.%d.%d%s(cli) (built: %s)%s
Array
(
    [0] => Standard input code
    [1] => foo
    [2] => bar
    [3] => baz
)

PHP %d.%d.%d%s(cli) (built: %s)%s
Usage: %s [options] [-f] <file> [--] [args...]
Done

Function Calls

None

Variables

None

Stats

MD5 7bd9a4b7d33c01c157789a6b424d6e42
Eval Count 0
Decode Time 70 ms