Tag Archives: php
PHP MySQLi and Multiple Prepared Statements
While sprucing up the PHP code I use to provide my own Stack Overflow API for GeeQe I ran into an error caused by trying to use multiple prepared statements with MySQLi. It turned up when I tried to execute one prepared statement while looping over the result set from another prepared statement that were [...]
Full Text Search with Sphinx
While developing my GeeQE iPhone application I decided I needed a way to let users search posts so I started looking around for a simple search engine that I could use with PHP. I took a look at a number of different options like MySQL Full Text search, Sphinx, Solr and others based on Lucene. [...]
Anonymous functions in PHP
I ran into this and found it interesting. Someone has added support for anonymous functions in PHP.
With the patch you can now do stuff like:
$data = array("zoo", "orange", "car", "lemon", "apple");
usort($data, function($a, $b) { return strcmp($a, $b); });
var_dump($data); # data is sorted alphabetically
Before you had to use a funky function generation call.
Tags: php
Upgrade to PHP 5.2 and Get JSON For Free
A few days ago when PHP 5.2 was released one of the things that caught my eye was that it now includes the JSON extension. For anyone doing AJAXy type stuff JSON is an easy way to martial your data between your server side language and javascript.
For the longest time I've been using the older [...]
Creating S3 URLs that expire using PHP
After reading this post on the S3 forum I realized that other people are thinking about doing some of the same stuff I have. paolonew was looking for a way to for a way to create URLs to S3 objects that expired. I did this a while back when I was thinking about how to [...]
Building HipHop PHP for Fedora 12 on 64 bit and 32 bit Systems