altered tons to support php's traits.