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-- Bug #69198 (Compact function generate array with length but no content) --FILE-- ..

Decoded Output download

--TEST--
Bug #69198 (Compact function generate array with length but no content)
--FILE--
<?php
if (false) {
        $willNeverBeDefined = true;
}
$result = compact('willNeverBeDefined');
var_dump($result, empty($result), $result === array(), empty($willNeverBeDefined));
?>
--EXPECTF--
Warning: compact(): Undefined variable $willNeverBeDefined in %s on line %d
array(0) {
}
bool(true)
bool(true)
bool(true)

Did this file decode correctly?

Original Code

--TEST--
Bug #69198 (Compact function generate array with length but no content)
--FILE--
<?php
if (false) {
        $willNeverBeDefined = true;
}
$result = compact('willNeverBeDefined');
var_dump($result, empty($result), $result === array(), empty($willNeverBeDefined));
?>
--EXPECTF--
Warning: compact(): Undefined variable $willNeverBeDefined in %s on line %d
array(0) {
}
bool(true)
bool(true)
bool(true)

Function Calls

compact 1

Variables

None

Stats

MD5 f9bd9ff06bc7e3300d16639736b33bec
Eval Count 0
Decode Time 96 ms