5 ms·
PHP Cheat Sheet
- stricken 17y ago"PHP doesn't support global varibles..." Since when?
- Legion 17y agoNice catch. As explained at www.php.net/global, PHP most certainly does "support global variables". They are accessible by declaring them with the "global" keyword within the scope they are to be used, or by accessing them via the $GLOBALS superglobal (one that, it appears, the author neglected to include in his list of superglobals)
- olliesaunders 17y agoOmits foreach; regretful.
- tcdent 17y agoIt's a wiki, you can edit it: http://encycode.com/wiki/index.php/PHP_Cheat_Sheet#Foreach_Loop http://encycode.com/wiki/index.php/PHP_Cheat_Sheet#Foreach_L...
- grigory 17y agoNo mention of lambda style anonymous functions, too!
- garnet7 17y agoIs `=&` actually an operator, or is it simply: $foo = &$bar; "set $foo to the address of $bar", like you'd expect from C?
- aaroneous 17y agoThe proper way is $foo = &$bar, but for some reason $foo =& $bar seems to be frequently used to achieve the same thing.
- we09fdsa 17y agowhen i look at that cheat sheet, i understand why php has such a bad fame: if you need to look up those function, you can't create good code! still, a real php cheat sheet may be helpful to navigate through php's idiotic functions naming scheme...