3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo uppercase_letters('ac84894987984987AD', 2); echo uppercase_letters('acaDdf984987Ad', 10); function uppercase_letters($str, $start, $end){ $strlen = strlen($str); $str_uc = strtoupper(substr($str, $start, $end)); $then = substr($str, $end, $strlen); return $str_uc . $then; }
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function uppercase_letters(), 2 passed in /in/c4anK on line 3 and exactly 3 expected in /in/c4anK:6 Stack trace: #0 /in/c4anK(3): uppercase_letters('ac8489498798498...', 2) #1 {main} thrown in /in/c4anK on line 6
Process exited with code 255.
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.0.14
Warning: Missing argument 3 for uppercase_letters(), called in /in/c4anK on line 3 and defined in /in/c4anK on line 6 Notice: Undefined variable: end in /in/c4anK on line 8 Notice: Undefined variable: end in /in/c4anK on line 9 ac84894987984987AD Warning: Missing argument 3 for uppercase_letters(), called in /in/c4anK on line 4 and defined in /in/c4anK on line 6 Notice: Undefined variable: end in /in/c4anK on line 8 Notice: Undefined variable: end in /in/c4anK on line 9 acaDdf984987Ad
Output for hhvm-3.10.0 - 3.12.0
Warning: uppercase_letters() expects exactly 3 parameters, 2 given in /in/c4anK on line 7 Notice: Undefined variable: end in /in/c4anK on line 8 Notice: Undefined variable: end in /in/c4anK on line 9 ac84894987984987AD Warning: uppercase_letters() expects exactly 3 parameters, 2 given in /in/c4anK on line 7 Notice: Undefined variable: end in /in/c4anK on line 8 Notice: Undefined variable: end in /in/c4anK on line 9 acaDdf984987Ad
Output for 4.3.0 - 5.0.5
Warning: Missing argument 3 for uppercase_letters() in /in/c4anK on line 6 ac84894987984987AD Warning: Missing argument 3 for uppercase_letters() in /in/c4anK on line 6 acaDdf984987Ad