3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url_host = 'sub.example.com'; $main_url_host = 'example.com'; $current_url_host_rev = strrev( $current_url_host ); $main_url_host_rev = strrev( $main_url_host ); if ( strpos( $current_url_host_rev, $main_url_host_rev ) === 0 ) { $current_url_host_rev = trim( substr( $current_url_host_rev, strlen( $main_url_host_rev ) ), '.' ); } $current_url_sub_domains = strrev( $main_url_host_rev ); echo $main_url_host_rev;
Output for git.master, git.master_jit, rfc.property-hooks
moc.elpmaxe

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:
41.74 ms | 401 KiB | 8 Q