tweaked some definitions for php