I was curious if we could use ChatGPT to generate a new and better manual for PHP.
This example was interesting enough that I figured it was worth posting.
It looks like ChatGPT does not know PHP 8.1 - the latest version it seems to know is PHP 8.
When asked to explain the first class Callable(...)
syntax (introduced in PHP 8.1) it does explain how to generate something that is functionally similar, using e.g. fn($car) => $car->drive()
rather than $car->drive(...)
. So it understands the concept, it just doesn't know about the new syntax.
But here's the wild part: I then proceded to explain the new syntax to it, and asked it to explain again using the new syntax - and it did it.