Follow

I'm looking for recent books or up-to-date text on with PHP. is changing rapidly and all the books I see are nearly a decade old. Any good recommendations?

@worldsendless Mine is from 2020 (PHP 7.4), and is the most recent one I'm aware of.

leanpub.com/thinking-functiona

The changes since that would impact FP are Enums and readonly properties. The rest is still largely valid. (I'm hoping we can get more features into the language that would force me to write a new edition.)

Also check out github.com/Crell/fp/ , which I built sometime after writing the book.

@Crell I did look at yours, but Stack Overflow errors have taught me the hard way that PHP has changed a lot recently. Isn't much of PHP different since you wrote the book?

@worldsendless There's a number of very cool improvements to the language, yes. Whether they impact the FP story is the question.

Enums are new. Readonly makes value objects easier, as does constructor promotion. The mixed type is nice in a few cases. Union types don't matter for FP, and neither do attributes.

The core FP story hasn't really changed in the last 4 years. Had any of the FP based RFCs I submitted passed, that would be different, but... They all got blocked.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.