I left php127 out, as it was very young and only a few commits.
No benchmarks, but a common jauge to evaluate them would be interesting. I'm actually looking at the phplang files, to see if we could turn them into a testable specification. That would be helpful to provide a common set of tests.
First, AI makes it easier to do it, in whatever other language.
Then, there is the simplification of the current engine, where things are deprecated over years to give time to history code to be removed.
Adding new features is very close there too, for the opposite reason.
Then, there are some speed gains.
In the end, we could see PHP emerge as a language specification (like ECMA), so everyone can build their compatible engine. After all, there is already https://phplang.org/
I imagine that acquisition is the first step, and then, you need more tools to process them (storing for starters). I'm looking for an illustration for someone that is not on the assembly line.
I'm working on the reverse question, which is what PHP is doing well now a days. It seems that there would a be a list of such problemes as a starting point, but the book is organized around the good and modern part, so you have to dig a bit to find the old nasty behavior. I can share a draft, if that helps.
First, thanks a lot for the detailled feedback. I took it in the new version, or just left if as a decision. I'm on phpc discord, if you want to discuss more of these.
a) I wrote all installations together, and now I see it makes more sense to add composer only when it is needed.
b) I struggled with this one too. It is an interesting question. I took the idea to make it a (rather ugly) if/elseif/then structure, which is more polyglot, and later, move it to PHP idiomatic match(), which is more modern, and, in fact, a relief. I think I'll keep this one as is.
c) echo out of the function is a good practice for later. I won't explain it in detail at that moment. It comes naturally with if => match() evolution too. I'm in.
d) Done.
e) closure are much more complex than functions: currently it keeps the function introduction short, and this is a 2nd pass with more complex notions. I think it keeps the progression gentle that way. A reference (sic) from the chapter 3-3 will help the hasty ones.
f) Arrays are central to PHP, and they might come after variables, indeed. Errors should be kept late, as we don't want to deal with problems until we are on our own. Web dev is also a heart break, since it is the main target of PHP. But we need the previous notions to be at ease there.
So, lots of hard decisions here, please sympathize with me.
g) I'm not sure to understand these (besides move things earlier)
h) the guestbook (besides the lip service to original PHP tutorials of the 2000s) is centered on the database page, while the final web app is around the MVC concept. The two have distinct goals, so they are distinct applications. I think it helps to keep focused on the right material.
Thanks for the feedback.
That was a hard decision for me, who started with PHP with the web stuff, having some prior knowledge. Then, I realized you need several features before tackling a superglobal :)
file_exists(), as in 2024.
Then count()...
from left to right:
ranking;
PHP function name;
% of projects using it;
how often it is used in a project when it is actually used.
I am not going to publish the bottom 100 PHP native functions. You want to learn about them to remove them?
Apperenly, this guy actually WORKS with this...
Indeed, it might be time for a comparison between all these options. After all, PHP 8.7 season is going to kick in soon.
Given the number of type-PHP existing projects, be aware of possible confusion.
I know I was...
This looks interesting, BTW.
#PHP delivers
I left php127 out, as it was very young and only a few commits.
No benchmarks, but a common jauge to evaluate them would be interesting. I'm actually looking at the phplang files, to see if we could turn them into a testable specification. That would be helpful to provide a common set of tests.
Added. Along the way, I found QIQ, another rewrite of PHP in go.
Yes, It is replaced now. It goes to crates.io now.
I see several trends at the same time.
First, AI makes it easier to do it, in whatever other language.
Then, there is the simplification of the current engine, where things are deprecated over years to give time to history code to be removed.
Adding new features is very close there too, for the opposite reason.
Then, there are some speed gains.
In the end, we could see PHP emerge as a language specification (like ECMA), so everyone can build their compatible engine. After all, there is already https://phplang.org/
Give me a moment, I'll add it there. It definitelly belongs.
Thanks.
Yes, this is not a familiar field for me, so I'm trying to understand what it is.
PLC : Programmable Logic Controlers.
https://www.come-star.com/blog/plc-data-acquisition-best-practices-for-industrial-automation/
I imagine that acquisition is the first step, and then, you need more tools to process them (storing for starters). I'm looking for an illustration for someone that is not on the assembly line.
Are there use case available somewhere?That looks very useful in the field.
I'm working on the reverse question, which is what PHP is doing well now a days. It seems that there would a be a list of such problemes as a starting point, but the book is organized around the good and modern part, so you have to dig a bit to find the old nasty behavior. I can share a draft, if that helps.
TLDR; Many thanks for the constructive feedback. The new version is 0.2.4 (https://thephpbook.readthedocs.io/en/latest/)
Longer fdedback on the
First, thanks a lot for the detailled feedback. I took it in the new version, or just left if as a decision. I'm on phpc discord, if you want to discuss more of these.
a) I wrote all installations together, and now I see it makes more sense to add composer only when it is needed.
b) I struggled with this one too. It is an interesting question. I took the idea to make it a (rather ugly) if/elseif/then structure, which is more polyglot, and later, move it to PHP idiomatic match(), which is more modern, and, in fact, a relief. I think I'll keep this one as is.
c) echo out of the function is a good practice for later. I won't explain it in detail at that moment. It comes naturally with if => match() evolution too. I'm in.
d) Done.
e) closure are much more complex than functions: currently it keeps the function introduction short, and this is a 2nd pass with more complex notions. I think it keeps the progression gentle that way. A reference (sic) from the chapter 3-3 will help the hasty ones.
f) Arrays are central to PHP, and they might come after variables, indeed. Errors should be kept late, as we don't want to deal with problems until we are on our own. Web dev is also a heart break, since it is the main target of PHP. But we need the previous notions to be at ease there.
So, lots of hard decisions here, please sympathize with me.
g) I'm not sure to understand these (besides move things earlier)
h) the guestbook (besides the lip service to original PHP tutorials of the 2000s) is centered on the database page, while the final web app is around the MVC concept. The two have distinct goals, so they are distinct applications. I think it helps to keep focused on the right material.
Sure.
Thanks for the feedback.
That was a hard decision for me, who started with PHP with the web stuff, having some prior knowledge. Then, I realized you need several features before tackling a superglobal :)
Enjoy!
The longer version is the group created for onboarding: https://thephp.foundation/blog/2026/08/03/kicking-off-the-php-onboarding-initiative/
This is not for beginner, though the resulting works will. If you want to contribute to help new comers learning, or any idea to share, talk to me.
Here or on the PHPc discord.
TLDR; This is a draft version for the upgrade of PHP onboarding documentation. Take a look, and let me know what you think.
https://thephpbook.readthedocs.io/en/latest/
Reading is a lot easier on the project site, indeed.
This is definitely a case of a feature being there, but so tricky to find that no one uses it.
Can I get parenthod for 'magic null' ? It has not been invented yet, but now, it has.
Can I? Can I? trust me bro...
I secretly put spelling mistakes to make it look like I am not an AI.
Sometimes it works, somtimes it don't.