This is by my estimates probably one of the 3 least interesting pages in Mwuki. It is, shall we say, a touch sparse. It
was mostly just somewhere to put documentation links I found handy, plus a few notes, and somewhere to tie together other PHP-related pages I have. Some time in future it may become more worthwhile.
PHP-relevant pages in mwuki
Useful docs in the PHP manual include
- Reserved predefined Variables, has a list of what there is
- $_SERVER, one of the ones I have to look up the elements of most often, this array contains details such as the IP address of the client, the actual URL requested, etc etc. There's a load of them in there.
- PHP string literal usage: I relatively often use the "heredoc" mechanism, like I also do in the Unix shell and in Perl (which also support it), but not often enough to remember how the syntax differs from the other (shell/Perl) versions, and so I always have to hunt around for where it's described. Well I shouldn't now.
- foreach() statement: a bit like the heredoc thing, I sometimes manage to get mixed up about the differences from the Perl version, although not to nearly the same extent, nor very often (mostly after a hiatus).
- str-getcsv() function, seems to be a new thing?? Otherwise I might have to use multiple explodes or something, and explode would make it hard to support escapes for the delimiter. Perhaps preg_split or something might work though. (Ah ok, it is not implemented in our version of PHP yet :( So I must roll my own after all... str_getcsv)
- String functions page
- header() function: is included in a moderately unlikely category (not "standard" or "http" but "network" functions), and wants to be referred to when using, for various details.
various extensiony things
Ming:Actually, here's a page of
Ming stuff, I should move most of this there, but it'll mostly be for what I've gleamed myself.
The SWF library Ming has a PHP extension to use it.
Ming extension docs (bit crap); Ming PECL page... ah, there is NO Ming PECL module, despite them having a page there. Grrr... I don't seem to have much luck with PECL modules, 2 tried, neither installable for one reason or another. I did however eventually get to compile the stupid module myself, and then make a test script (link removed now) using it. The example code in the PHP docs was nonfunctional, I had to beat it into submission. Some parts of it had been outright disastrous, so I ought to put up my working versions for people too. I may be able to find more usefull stuff on the GazbMing pages, but a lot of that seems pretty outdated too. It might have informative stuff amongst it though that'd give me helpful clues that the docs don't.
See also the main Ming page, and bits of the old wiki (probably too outdated, but so is the PHP documentation which is practically useless.
And see also the SSWF library, which is AFAICT not available from PHP. It is probably better though I imagine, because its authors seem to be keeping track of what they're doing. However it may not be very intelligible, on looking, eh. At least, I can't see an obvious way of embedding fonts in it for one thing.
BBCode Parser module
is covered at bbcode parser.
Quite interesting but I didn't know where else to put it
less intreesting
- CRC32 function, simple hash, not cryptographically secure, but not long either AFAICT??
- Wordwrap function, ISTR having troubles with this in the past but I may be misremembering. It was probably to do with /n/r combinations turning up and surprising me and making things not work right.
- get_browser function, gives browser ID and capabilities from the string the client reports to the server. Which is of course forgeable, but it still has its uses.
- URL functions in PHP, things like urlencoding, base64, etc
- parse_str, a function for unpacking GET-style query strings into corresponding variables. Note that this is not needed for normal use, as actual GET queries are automatically unpacked into the $_GET{} array for you. It may be of use for other purposes though, not sure what.