<?php
$features = array(
'Core' => 'Core module',
'XML' => 'XML module',
'HTML' => 'HTML module',
'Views' => 'Views module',
'Stylesheets' => 'Style Sheets module',
'CSS' => 'CSS module',
'CSS2' => 'CSS2 module',
'Events' => 'Events module',
'UIEvents' => 'User interface Events module',
'MouseEvents' => 'Mouse Events module',
'MutationEvents' => 'Mutation Events module',
'HTMLEvents' => 'HTML Events module',
'Range' => 'Range module',
'Traversal' => 'Traversal module'
);
$implementation = new DOMImplementation;
foreach ($features as $key => $name) {
if ($implementation->hasFeature($key, '2.0')) {
echo "$name の機能を保持しています\n";
} else {
echo "$name の機能は保持していません\n";
}
}
?>