Is it safe to train the upper and lower body on the same day of each workout?

Just wondering because I know usually people say "ok i'm working chest, triceps and bicepts today" or "today i'm working core and legs". It safe to just train all of those in one session?