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 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$path_parts' (T_VARIABLE) in /in/h77XC on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/h77XC on line 5
Process exited with code 255.

preferences:
187.47 ms | 1395 KiB | 66 Q