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 https://github.com/scoutapp/scout-apm-php-ext/issues/93 - Should not segfault..

Decoded Output download

--TEST--
Bug https://github.com/scoutapp/scout-apm-php-ext/issues/93 - Should not segfault on static function usage
--SKIPIF--
<?php if (!extension_loaded("scoutapm")) die("skip scoutapm extension required."); ?>
--FILE--
<?php

scoutapm_enable_instrumentation(true);

(static function () {
    echo "Called 1.
";
})();

$declared = static function () {
    echo "Called 2.
";
};
$declared();

class A {
    static function thing() {
        echo "Called 3.
";
    }
}
A::thing();

?>
--EXPECTF--
Called 1.
Called 2.
Called 3.

Did this file decode correctly?

Original Code

--TEST--
Bug https://github.com/scoutapp/scout-apm-php-ext/issues/93 - Should not segfault on static function usage
--SKIPIF--
<?php if (!extension_loaded("scoutapm")) die("skip scoutapm extension required."); ?>
--FILE--
<?php

scoutapm_enable_instrumentation(true);

(static function () {
    echo "Called 1.\n";
})();

$declared = static function () {
    echo "Called 2.\n";
};
$declared();

class A {
    static function thing() {
        echo "Called 3.\n";
    }
}
A::thing();

?>
--EXPECTF--
Called 1.
Called 2.
Called 3.

Function Calls

None

Variables

None

Stats

MD5 e1e51cf1f13464cd7b79ec0c34eded83
Eval Count 0
Decode Time 91 ms