Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tdot
· 14y ago · 0 comments
PHP doesn't have closure like JavaScript. JS accomplished language for evented approach. Because JS have got closure, cascaded scope and prototype chaing.
Comments
[–]
notJim
14y ago
PHP has had closures for 3 years.
[–]
tdot
OP
14y ago
yes it's true. but didn't have closure like js. did you try to make nested closures in php?
[–]
notJim
14y ago
Yes, I've done it. Very handy for dealing with trees.
[–]
import
14y ago
have you looked at this ?
http://php.net/manual/en/functions.anonymous.php
[–]
tdot
OP
14y ago
yes i know this. but didn't strong like js. because php have got different scopping approach