Hacker News new | ask | show | jobs
by zzt123 1616 days ago
PHP supports first class functions though?
2 comments

While PHP is adding a First class callable syntax in 8.1, first-class-functions have been available in PHP since 5.3.0 (Released Jun 2009) going by the Wikipedia definition:

> This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures.

Ref: https://stackoverflow.com/a/59293198/368328, https://3v4l.org/rQGk2

You right they are supporting it since 8.1.0.