What do you mean by "page" here?
You can throw whatever PHP you want into a page template. If this is a more or less one-off thing, what you should probably do is use the conditional tags to just embed it.
If you mean you want to do this within content arbitrarily ie. through the post editor, that's disallowed by core, but there are plugins that add the capability. The most recent one I'm aware of is Allow PHP in Posts and Pages, (there are others and you might want to look around) but this is something that's generally advised against unless you absolutely trust every single person that might have access.