Gentoo users: emerge does not compile dev-lang/php with simplexml by default. To enable this option, add the flag simplexml to your USE variable and recompile php.
This extension is enabled by default. It may be disabled by using the following option at compile time: --disable-simplexml
Note: Before PHP 5.1.2, --enable-simplexml is required to enable this extension.