Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ceol
on April 11, 2012
|
parent
|
context
|
favorite
| on:
PHP: A fractal of bad design
PHP doesn't allow you to pass functions and classes as arguments.
Gigablah
on April 11, 2012
|
next
[–]
You can. Here's my code as an example:
https://github.com/gigablah/fsphinxphp/blob/master/src/FSphi...
Note the $getter parameter.
cgdangelo
on April 11, 2012
|
prev
[–]
Unless I'm misunderstanding you, passing functions as arguments is definitely possible with anonymous functions/closures.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: