3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines = array( // INCLUDE: No closing tag. 'INCLUDE' => '<esi:include src="http://example.com/1.html" alt="http://bak.example.com/2.html"/>', 'INLINE opening' => '<esi:inline name="URI" fetchable="{yes | no}">', 'INLINE closing' => '</esi:inline>', 'CHOOSE opening' => '<esi:choose>', 'CHOOSE closing' => '</esi:choose>', 'WHEN opening' => '<esi:when test="...">', 'WHEN closing' => '</esi:when>', 'OTHERWISE opening' => '<esi:otherwise>', 'OTHERWISE closing' => '</esi:otherwise>', 'TRY opening' => '<esi:try>', 'TRY closing' => '</esi:try>', 'ATTEMPT opening' => '<esi:attempt>', 'ATTEMPT closing' => '</esi:attempt>', 'EXCEPT opening' => '<esi:except>', 'EXCEPT closing' => '</esi:except>', 'COMMENT' => '<esi:comment text="the following animation will have a 24 hr TTL." />', 'REMOVE opening' => '<esi:remove>', 'REMOVE closing' => '</esi:remove>', 'VARS opening' => '<esi:vars>', 'VARS closing' => '</esi:vars>', ); foreach ( $lines as $type => $line ) { preg_match( '%^<\s*(/\s*)?((?:esi:)?[a-zA-Z0-9-]+)([^>]*)>?$%', $line, $matches ); $slash = trim( $matches[1] ); $elem = $matches[2]; $attrlist = $matches[3]; echo "$type:\n"; echo "Original: '$line'\n"; echo "Slash: '$slash'\n"; echo "Elem: '$elem'\n"; echo "Attr List: '$attrlist'\n"; echo "\n"; }
Output for git.master_jit, git.master, rfc.property-hooks
INCLUDE: Original: '<esi:include src="http://example.com/1.html" alt="http://bak.example.com/2.html"/>' Slash: '' Elem: 'esi:include' Attr List: ' src="http://example.com/1.html" alt="http://bak.example.com/2.html"/' INLINE opening: Original: '<esi:inline name="URI" fetchable="{yes | no}">' Slash: '' Elem: 'esi:inline' Attr List: ' name="URI" fetchable="{yes | no}"' INLINE closing: Original: '</esi:inline>' Slash: '/' Elem: 'esi:inline' Attr List: '' CHOOSE opening: Original: '<esi:choose>' Slash: '' Elem: 'esi:choose' Attr List: '' CHOOSE closing: Original: '</esi:choose>' Slash: '/' Elem: 'esi:choose' Attr List: '' WHEN opening: Original: '<esi:when test="...">' Slash: '' Elem: 'esi:when' Attr List: ' test="..."' WHEN closing: Original: '</esi:when>' Slash: '/' Elem: 'esi:when' Attr List: '' OTHERWISE opening: Original: '<esi:otherwise>' Slash: '' Elem: 'esi:otherwise' Attr List: '' OTHERWISE closing: Original: '</esi:otherwise>' Slash: '/' Elem: 'esi:otherwise' Attr List: '' TRY opening: Original: '<esi:try>' Slash: '' Elem: 'esi:try' Attr List: '' TRY closing: Original: '</esi:try>' Slash: '/' Elem: 'esi:try' Attr List: '' ATTEMPT opening: Original: '<esi:attempt>' Slash: '' Elem: 'esi:attempt' Attr List: '' ATTEMPT closing: Original: '</esi:attempt>' Slash: '/' Elem: 'esi:attempt' Attr List: '' EXCEPT opening: Original: '<esi:except>' Slash: '' Elem: 'esi:except' Attr List: '' EXCEPT closing: Original: '</esi:except>' Slash: '/' Elem: 'esi:except' Attr List: '' COMMENT: Original: '<esi:comment text="the following animation will have a 24 hr TTL." />' Slash: '' Elem: 'esi:comment' Attr List: ' text="the following animation will have a 24 hr TTL." /' REMOVE opening: Original: '<esi:remove>' Slash: '' Elem: 'esi:remove' Attr List: '' REMOVE closing: Original: '</esi:remove>' Slash: '/' Elem: 'esi:remove' Attr List: '' VARS opening: Original: '<esi:vars>' Slash: '' Elem: 'esi:vars' Attr List: '' VARS closing: Original: '</esi:vars>' Slash: '/' Elem: 'esi:vars' Attr List: ''

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:
21.99 ms | 415 KiB | 5 Q