3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = " <meta charset='UTF-8'> <meta name='keywords' content='your, tags'> <meta name='description' content='150 words'> <meta name='subject' content='your website's subject'> <meta name='copyright' content='company name'> <meta name='language' content='ES'> <meta name='robots' content='index,follow'> <meta name='revised' content='Sunday, July 18th, 2010, 5:15 pm'> <meta name='abstract' content=''> <meta name='topic' content=''> <meta name='summary' content=''> <meta name='Classification' content='Business'> <meta name='author' content='name, email@hotmail.com'> <meta name='designer' content=''> <meta name='reply-to' content='email@hotmail.com'> <meta name='owner' content=''> <meta name='url' content='http://www.websiteaddrress.com'> <meta name='identifier-URL' content='http://www.websiteaddress.com'> <meta name='directory' content='submission'> <meta name='pagename' content='jQuery Tools, Tutorials and Resources - O'Reilly Media'> <meta name='category' content=''> <meta name='coverage' content='Worldwide'> <meta name='distribution' content='Global'> <meta name='rating' content='General'> <meta name='revisit-after' content='7 days'> <meta name='subtitle' content='This is my subtitle'> <meta name='target' content='all'> <meta name='HandheldFriendly' content='True'> <meta name='MobileOptimized' content='320'> <meta name='date' content='Sep. 27, 2010'> <meta name='search_date' content='2010-09-27'> <meta name='DC.title' content='Unstoppable Robot Ninja'> <meta name='ResourceLoaderDynamicStyles' content=''> <meta name='medium' content='blog'> <meta name='syndication-source' content='https://mashable.com/2008/12/24/free-brand-monitoring-tools/'> <meta name='original-source' content='https://mashable.com/2008/12/24/free-brand-monitoring-tools/'> <meta name='verify-v1' content='dV1r/ZJJdDEI++fKJ6iDEl6o+TMNtSu0kv18ONeqM0I='> <meta name='y_key' content='1e39c508e0d87750'> <meta name='pageKey' content='guest-home'> <meta itemprop='name' content='jQTouch'> <meta http-equiv='Expires' content='0'> <meta http-equiv='Pragma' content='no-cache'> <meta http-equiv='Cache-Control' content='no-cache'> <meta http-equiv='imagetoolbar' content='no'> <meta http-equiv='x-dns-prefetch-control' content='off'>"; $dom = new DOMDocument(); libxml_use_internal_errors(true); // silence warnings $dom->loadHTML($html); $xpath = new DOMXPath($dom); $result = []; foreach ($xpath->query("//meta[(@name or @http-equiv) and @content]") as $node) { $result[] = [ 'attr' => $node->getAttribute($node->hasAttribute('name') ? 'name' : 'http-equiv'), 'content' => $node->getAttribute('content') ]; } var_export($result);
Output for git.master_jit, git.master, rfc.property-hooks
array ( 0 => array ( 'attr' => 'keywords', 'content' => 'your, tags', ), 1 => array ( 'attr' => 'description', 'content' => '150 words', ), 2 => array ( 'attr' => 'subject', 'content' => 'your website', ), 3 => array ( 'attr' => 'copyright', 'content' => 'company name', ), 4 => array ( 'attr' => 'language', 'content' => 'ES', ), 5 => array ( 'attr' => 'robots', 'content' => 'index,follow', ), 6 => array ( 'attr' => 'revised', 'content' => 'Sunday, July 18th, 2010, 5:15 pm', ), 7 => array ( 'attr' => 'abstract', 'content' => '', ), 8 => array ( 'attr' => 'topic', 'content' => '', ), 9 => array ( 'attr' => 'summary', 'content' => '', ), 10 => array ( 'attr' => 'Classification', 'content' => 'Business', ), 11 => array ( 'attr' => 'author', 'content' => 'name, email@hotmail.com', ), 12 => array ( 'attr' => 'designer', 'content' => '', ), 13 => array ( 'attr' => 'reply-to', 'content' => 'email@hotmail.com', ), 14 => array ( 'attr' => 'owner', 'content' => '', ), 15 => array ( 'attr' => 'url', 'content' => 'http://www.websiteaddrress.com', ), 16 => array ( 'attr' => 'identifier-URL', 'content' => 'http://www.websiteaddress.com', ), 17 => array ( 'attr' => 'directory', 'content' => 'submission', ), 18 => array ( 'attr' => 'pagename', 'content' => 'jQuery Tools, Tutorials and Resources - O', ), 19 => array ( 'attr' => 'category', 'content' => '', ), 20 => array ( 'attr' => 'coverage', 'content' => 'Worldwide', ), 21 => array ( 'attr' => 'distribution', 'content' => 'Global', ), 22 => array ( 'attr' => 'rating', 'content' => 'General', ), 23 => array ( 'attr' => 'revisit-after', 'content' => '7 days', ), 24 => array ( 'attr' => 'subtitle', 'content' => 'This is my subtitle', ), 25 => array ( 'attr' => 'target', 'content' => 'all', ), 26 => array ( 'attr' => 'HandheldFriendly', 'content' => 'True', ), 27 => array ( 'attr' => 'MobileOptimized', 'content' => '320', ), 28 => array ( 'attr' => 'date', 'content' => 'Sep. 27, 2010', ), 29 => array ( 'attr' => 'search_date', 'content' => '2010-09-27', ), 30 => array ( 'attr' => 'DC.title', 'content' => 'Unstoppable Robot Ninja', ), 31 => array ( 'attr' => 'ResourceLoaderDynamicStyles', 'content' => '', ), 32 => array ( 'attr' => 'medium', 'content' => 'blog', ), 33 => array ( 'attr' => 'syndication-source', 'content' => 'https://mashable.com/2008/12/24/free-brand-monitoring-tools/', ), 34 => array ( 'attr' => 'original-source', 'content' => 'https://mashable.com/2008/12/24/free-brand-monitoring-tools/', ), 35 => array ( 'attr' => 'verify-v1', 'content' => 'dV1r/ZJJdDEI++fKJ6iDEl6o+TMNtSu0kv18ONeqM0I=', ), 36 => array ( 'attr' => 'y_key', 'content' => '1e39c508e0d87750', ), 37 => array ( 'attr' => 'pageKey', 'content' => 'guest-home', ), 38 => array ( 'attr' => 'Expires', 'content' => '0', ), 39 => array ( 'attr' => 'Pragma', 'content' => 'no-cache', ), 40 => array ( 'attr' => 'Cache-Control', 'content' => 'no-cache', ), 41 => array ( 'attr' => 'imagetoolbar', 'content' => 'no', ), 42 => array ( 'attr' => 'x-dns-prefetch-control', 'content' => 'off', ), )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.94 ms | 417 KiB | 5 Q