Skip to content

u/nikic

In this archive from Dec 2011 to Mar 2024

37
posts
1.4k
comments
3
media
12k
score

Top posts

Top comments

Oh boy. It looks like Zeev has conveniently forgotten that register_globals and magic_quotes removal were a thing, both major backwards incompatible changes. Things like that need to be decided somehow, and the RFC process is the only way we have of doing that.

I think there's a very good argument to be made that converting undefined variable accesses to exceptions is not a worthwhile change ... but saying that even discussing it is off the table because "I say so"?

Well, fuck you Zeev.

168 points

The most significant internal change in PHP 7 are improved implementations for several key datastructures. I have a number of blog posts on this topic, which may be of interest:

There have been many other optimizations as well, but the new zval representation is really at the core of these improvements.

Also helpful might be:

  • My slides from IPC'15: This is about the datastructure changes. Basically pretty graphics for the blog posts above.
  • Dmitry Stogov's slides from ZendCon'15: This also touches on many of the other optimizations like VM stack handling.
119 points

Two major changes that are missing here:

  • In PHP 8 all internal functions/methods will have complete type information in reflection. This took a lot of effort and is not quite finished yet.
  • In PHP 8, a lot of things that were previously warnings are now exceptions. This includes the changes done by https://wiki.php.net/rfc/engine_warnings, but also a huge number of error conditions in standard library functions. The general guideline is that any error condition that indicates a programming error and that the programmer should never be explicitly checking for becomes an Error exception. Everything else stays as warnings. This is also still work in progress.
70 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.