Y
Hacker News
new
|
ask
|
show
|
jobs
by
califield
4208 days ago
`f` in your example is a global function that cannot be redefined.
2 comments
imaginenore
4208 days ago
Don't like global functions? Don't use them.
It's really that simple.
link
xyby
4208 days ago
Which is a good thing. When you have ...
function f($x) { return $x*$x; }
...in your code, you know that you can always call f() to get the square of something. Hallelujah. Functions as they are meant to be.
link
It's really that simple.