most php done (untested)