2011 Feb 19 05:17 PM MST | Java1 PHP4 Programming18 Web13 [2011]3

Google App Engine supports Java and Python, thus supporting PHP via Quercus on Java. We can use their fast-access Memcache with code similar to the following:

<?php
import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;

$service = MemcacheServiceFactory::getMemcacheService();
$service->put("key", "this is the value");
echo $service->get("key"); // outputs, "this is the value"

As you can see, the **import** keyword is nonstandard PHP but works on Quercus.