finish php casting