Sometime we want to consider pages which have children as browse pages and may treat them separately in plugins etc. For example we may not want to show related posts in them. Here is the wordpress php code you can use to find if a wordpress page is leaf page and has no child.