[PHP] Hyphen to underscore inside forloop

Another thing

If you find yourself prefixing a function parameter with &, stop and think if this is really needed. 99% of the time it is not.
 
off-topic

https://github.com/reflex-frp/reflex

https://github.com/search?utf8=✓&q=reflex&type=

All I am saying if is such a revolutionising language as the creator in the video tries to potray then he should have done a better job in the naming department.

Go, now that is a cool name.

back on topic

I still love php
Ps. btw same guy who built Hack for Facebook. As for the name:
  • its after all 1 of the 2 hardest things in CS.
As for whether its revolutionary; we'll only know that once it's released, or more specifically on the adoption rate within Facebook; but conceptually it rings many bells.
 
[)roi(];20329659 said:
Ps. btw same guy who built Hack for Facebook. As for the name:
  • its after all 1 of the 2 hardest things in CS.
As for whether its revolutionary; we'll only know that once it's released, or more specifically on the adoption rate within Facebook; but conceptually it rings many bells.
Definitely exciting stuff from what I could gather.
 
Dont pass in by reference, i.e dont use "&varname" in param. Its kinda dangerous and "irresponsible". pass in the value and return a new changed value.

Also its never a good idea to declare functions like that, functions are meant to be re-usable, so move it outside the loop.
another and I think cooler option is to use array_map, which will basically be shorthand for everything you want to do there.

Hope this helps
 
Top
Sign up to the MyBroadband newsletter
X