rfc:stack-frame-class
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:stack-frame-class [2020/07/07 20:46] – added example brzuchal | rfc:stack-frame-class [2020/07/21 09:53] – removed methods from the class API brzuchal | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: StackFrame class ====== | ====== PHP RFC: StackFrame class ====== | ||
- | * Version: | + | * Version: |
* Date: 2020-07-07 | * Date: 2020-07-07 | ||
- | * Author: Michał Brzuchalski, | + | * Author: Michał |
* Status: Under Discussion | * Status: Under Discussion | ||
* Target Version: PHP 8.0 | * Target Version: PHP 8.0 | ||
Line 12: | Line 12: | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | Introduce new '' | + | Introduce new '' |
There are two places where this could be a replacement for retrieving trace in array of arrays way and these are '' | There are two places where this could be a replacement for retrieving trace in array of arrays way and these are '' | ||
Line 18: | Line 18: | ||
==== StackFrame class ==== | ==== StackFrame class ==== | ||
- | '' | + | '' |
+ | |||
+ | There are additional properties and methods which expose additional information: | ||
+ | |||
+ | * property '' | ||
+ | * property '' | ||
<code php> | <code php> | ||
final class StackFrame implements ArrayAccess | final class StackFrame implements ArrayAccess | ||
{ | { | ||
- | public | + | public |
| | ||
- | public | + | public |
| | ||
- | public | + | public ?string $function; |
| | ||
- | public | + | public ?string $class; |
| | ||
- | public | + | public ?object $object; |
- | + | ||
- | public readonly array $args; | + | |
- | + | ||
- | public static function getTrace(): array {} | + | |
- | public | + | public |
- | public | + | public |
- | public | + | public ?\Closure $closure; |
- | + | ||
- | | + | public |
- | + | ||
- | public | + | public |
- | + | ||
- | | + | |
- | + | ||
- | public function | + | |
} | } | ||
</ | </ |
rfc/stack-frame-class.txt · Last modified: 2020/08/04 08:00 by brzuchal