History log of /PHP-8.2/Zend/tests/function_arguments/sensitive_parameter_value.phpt (Results 1 – 3 of 3)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 25cb9cdb 21-Mar-2022 Marco Pivetta

Fix GH-8232 - always reference classes in `var_export()` via their FQCN

Closes GH-8233

This fix corrects a behavior of `var_export()` that was mostly "hidden" until PHP 8.1 introduc

Fix GH-8232 - always reference classes in `var_export()` via their FQCN

Closes GH-8233

This fix corrects a behavior of `var_export()` that was mostly "hidden" until PHP 8.1 introduced:

* properties with object initializers
* constants containing object references
* default values of class properties containing `enum`s

Since `var_export(..., true)` is mostly used in conjunction with code generation,
and we cannot make assumptions about the generated code being placed in the root
namespace, we must always provide the FQCN of a class in exported code.

For example:

```php
<?php

namespace MyNamespace { class Foo {} }

namespace { echo "<?php\n\nnamespace Example;\n\n" . var_export(new \MyNamespace\Foo(), true) . ';'; }
```

produces:

```php
<?php

namespace Example;

MyNamespace\Foo::__set_state(array(
));
```

This code snippet is invalid, because `Example\MyNamespace\Foo::__set_state()` (which
does not exist) is called.

With this patch applied, the code looks like following (valid):

```php
<?php

namespace Example;

\MyNamespace\Foo::__set_state(array(
));
```

Ref: https://github.com/php/php-src/issues/8232
Ref: https://github.com/Ocramius/ProxyManager/issues/754
Ref: https://externals.io/message/117466

show more ...

# dcd5e822 11-Apr-2022 Tim Düsterhus

Add `print_r()` to `function_arguments/sensitive_parameter_value.phpt` (#8340)

see 90851977348cbb8c65fce19a1670868422414fae
see #7921

# 90851977 21-Dec-2021 Tim Düsterhus

Implement the "Redacting parameters in back traces" RFC

https://wiki.php.net/rfc/redact_parameters_in_back_traces