Skip to content

Instantly share code, notes, and snippets.

@brzuchal
Created July 9, 2020 04:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brzuchal/172d5c2dcc194b33686956f4232ca583 to your computer and use it in GitHub Desktop.
Save brzuchal/172d5c2dcc194b33686956f4232ca583 to your computer and use it in GitHub Desktop.
people.php.net/brzuchal

Passionate PHP Developer focused on microservices and PHP internals.

Current RFC's

StackFrame class

It's an alternative to debug_backtrace() with stack-trace frames as objects using less memory than arrays. Introduced class include two static methods which allows collecting frames from stacktrace:

  • StackFrame::getTrace(?int $limit = null, ?int $offset = null): array - collects all or portion of stacktrace
  • StackFrame::getFrame(int $index): StackFrame - retrieves a single frame from the stacktrace

The proposed class act as an array frame with the same API due to the implementation of ArrayAccess interface.

Link to RFC StackFrame class

Language Construct Syntax Changes

It's a proposal to unify two PHP statements, which looks odd in comparison to expressions in PHP and it's hard to distinct betweem them. In PHP there are two kinds of expressions. These are the ones which look like a function calls and then those that don't. For statements most of them don't look like a function so having these proposed declare and__halt_compiler allowed without parentheses would make them look more like statements.

These all present statements at a first look then:

declare strict_types = 1;
const FOO = true;
__halt_compiler;

Link to RFC Language Construct Syntax Changes

Change Terminology to ExcludeList

This proposal aim is to replace from terminology words which might be considered as offensive.

Link to RFC Change Terminology to ExcludeList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment