With the following code::
<?php
unset($_GET);
unset($_FILES);
unset($_POST);
unset($_SERVER);
unset($_COOKIE);
unset($argv);
unset($argc);
function test() {
$a = "test";
meminfo_dump(fopen('php://stdout', 'w'));
}
test();
When executed with the PHP 7 version of the extension provides the following result:
{
"items": {
"0x7f347ea57180" : {
"type" : "unknown",
"size" : "16",
"symbol_name" : "argv",
"is_root" : true,
"frame" : "test()"
},
"0x7f347ea571a0" : {
"type" : "unknown",
"size" : "16",
"symbol_name" : "argc",
"is_root" : true,
"frame" : "test()"
}
}
The a variable is not present and the argv and argc variables are defined at the wrong frame.
Comparing to the execution with the PHP 5 version of the extension:
{
"items": {
"0x7fc6ca961158" : {
"type" : "string",
"size" : "28",
"symbol_name" : "a",
"is_root" : true,
"frame" : "test()"
}
}
With the following code::
When executed with the PHP 7 version of the extension provides the following result:
{ "items": { "0x7f347ea57180" : { "type" : "unknown", "size" : "16", "symbol_name" : "argv", "is_root" : true, "frame" : "test()" }, "0x7f347ea571a0" : { "type" : "unknown", "size" : "16", "symbol_name" : "argc", "is_root" : true, "frame" : "test()" } }The
avariable is not present and theargvandargcvariables are defined at the wrong frame.Comparing to the execution with the PHP 5 version of the extension:
{ "items": { "0x7fc6ca961158" : { "type" : "string", "size" : "28", "symbol_name" : "a", "is_root" : true, "frame" : "test()" } }