3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hape_uri = 'http://www.example.com/some_path/to/page?param=1'; $path_parts = pathinfo($page_uri); if (!isset($path_parts['extension']) && strlen($page_uri) > 1) { $end = substr($page_uri, -1, 1); $page_uri_slash_fixed = (($end == '/') ? substr($page_uri, 0, -1) : $page_uri . '/'); } echo $page_uri; echo $page_uri_slash_fixed;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $page_uri in /in/bEEoB on line 5 Deprecated: pathinfo(): Passing null to parameter #1 ($path) of type string is deprecated in /in/bEEoB on line 5 Warning: Undefined variable $page_uri in /in/bEEoB on line 7 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/bEEoB on line 7 Warning: Undefined variable $page_uri in /in/bEEoB on line 13 Warning: Undefined variable $page_uri_slash_fixed in /in/bEEoB on line 14

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:
37 ms | 402 KiB | 8 Q