Archive for the ‘php’ Category
Fun With Closures and Object Caches in PHP
Intro to Closures in PHP
PHP 5.3 introduced closures. It’s already been pointed out that the Closure class in PHP is not necessarily a closure. Lexical scope is optional in PHP’s implementation, which is a little goofy looking:
//lambda ftw
$lambda = function ($x) {
echo ‘I am an anonymous function ftw.’ . "\n" . $x;
};
//closure lol
$closure [...]
December 29, 2009
Posted in: php
No Comments
The Arc Challenge: PHP and JavaScript
Take the Arc Challenge. For the lazy, here is the problem:
Write a program that causes the url said (e.g. http://localhost:port/said) to produce a page with an input field and a submit button. When the submit button is pressed, that should produce a second page with a single link saying “click here.” When that is clicked [...]
December 20, 2009
Posted in: javascript, php
No Comments
Compiling PHP on Windows 64 bit with VC9
Update 2009-10-28: added additional information for compiling on Windows 7.
This seems to one of the most difficult things for someone to explain. Hopefully this will shed some light on the subject of PHP Windows compilation and help you out.
There don’t seem to be any “Compile PHP on Windows x64″ guides, and even less than zero [...]
October 17, 2009
Posted in: php, windows
6 Comments
Transliteration in PHP
This one time, I read this article about how Unicode is for foreigners, and everybody should learn English. It’s not quite as offensive as it sounds, but it’s pretty rude. It was awesome.
Anyway, at the end, he called for transliteration implementations in languages besides ones that suck (my words, not his); here of course I’m [...]
August 22, 2009
Posted in: php, unicode
No Comments
