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-- Testing ftell() on std streams --SKIPIF-- <?php if (getenv("SKIP_IO_CAPTURE_TESTS..
Decoded Output download
--TEST--
Testing ftell() on std streams
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
STDOUT
--FILE--
<?php
// These have proc_open pipes attached
var_dump(ftell(STDIN));
var_dump(ftell(STDERR));
var_dump(ftell(fopen("php://stdin", "r")));
var_dump(ftell(fopen("php://stderr", "w")));
// These have a tty attached
var_dump(ftell(STDOUT));
var_dump(ftell(fopen("php://stdout", "w")));
?>
--EXPECT--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
Did this file decode correctly?
Original Code
--TEST--
Testing ftell() on std streams
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
STDOUT
--FILE--
<?php
// These have proc_open pipes attached
var_dump(ftell(STDIN));
var_dump(ftell(STDERR));
var_dump(ftell(fopen("php://stdin", "r")));
var_dump(ftell(fopen("php://stderr", "w")));
// These have a tty attached
var_dump(ftell(STDOUT));
var_dump(ftell(fopen("php://stdout", "w")));
?>
--EXPECT--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
Function Calls
getenv | 1 |
Stats
MD5 | 5145934efc9fb477fe258a7d69999321 |
Eval Count | 0 |
Decode Time | 94 ms |