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-- SPL: SplObjectStorage null coalescing operator memory leak --FILE-- <?php // In z..

Decoded Output download

--TEST--
SPL: SplObjectStorage null coalescing operator memory leak
--FILE--
<?php
// In zts mode, this should no longer detect memory leaks for the objects
$a = new stdClass();
$b = new stdClass();
$map = new SplObjectStorage();
$map[$a] = 'foo';
var_dump($map[$b] ?? null);
var_dump($map[$a] ?? null);
?>
--EXPECT--
NULL
string(3) "foo"

Did this file decode correctly?

Original Code

--TEST--
SPL: SplObjectStorage null coalescing operator memory leak
--FILE--
<?php
// In zts mode, this should no longer detect memory leaks for the objects
$a = new stdClass();
$b = new stdClass();
$map = new SplObjectStorage();
$map[$a] = 'foo';
var_dump($map[$b] ?? null);
var_dump($map[$a] ?? null);
?>
--EXPECT--
NULL
string(3) "foo"

Function Calls

None

Variables

None

Stats

MD5 145086a9d81669b66d419636962e98fe
Eval Count 0
Decode Time 114 ms