Fix: encoding of php resources when in php compat mode