3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $view = insertAtPosition('/views/index/signin.phtml'); function insertAtPosition($string, $insert, $position) { return implode($insert, str_split($string, $position)); } echo implode('/' , '/views/index/signin.phtml');
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function insertAtPosition(), 1 passed in /in/KPhRO on line 3 and exactly 3 expected in /in/KPhRO:4 Stack trace: #0 /in/KPhRO(3): insertAtPosition('/views/index/si...') #1 {main} thrown in /in/KPhRO on line 4
Process exited with code 255.
Output for 5.3.21 - 7.0.20
Warning: Missing argument 2 for insertAtPosition(), called in /in/KPhRO on line 3 and defined in /in/KPhRO on line 4 Warning: Missing argument 3 for insertAtPosition(), called in /in/KPhRO on line 3 and defined in /in/KPhRO on line 4 Notice: Undefined variable: insert in /in/KPhRO on line 5 Notice: Undefined variable: position in /in/KPhRO on line 5 Warning: str_split(): The length of each segment must be greater than zero in /in/KPhRO on line 5 Warning: implode(): Invalid arguments passed in /in/KPhRO on line 5 Warning: implode(): Invalid arguments passed in /in/KPhRO on line 9