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 #66251 (Constants get statically bound at compile time when Optimized) --INI-..

Decoded Output download

--TEST--
Bug #66251 (Constants get statically bound at compile time when Optimized)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--EXTENSIONS--
opcache
--FILE--
<?php
printf ("A=%s
", getA());
const A="hello";
function getA() {return A;}
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant "A" in %s:%d
Stack trace:
#0 %s(%d): getA()
#1 {main}
  thrown in %s on line %d

Did this file decode correctly?

Original Code

--TEST--
Bug #66251 (Constants get statically bound at compile time when Optimized)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--EXTENSIONS--
opcache
--FILE--
<?php
printf ("A=%s\n", getA());
const A="hello";
function getA() {return A;}
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant "A" in %s:%d
Stack trace:
#0 %s(%d): getA()
#1 {main}
  thrown in %s on line %d

Function Calls

getA 1

Variables

None

Stats

MD5 2bd4bae02923eb859f345f5afbeb884a
Eval Count 0
Decode Time 81 ms