Basic but somewhat untested implementation of all attributes that php.js implements.