3v4l.org

run code in 300+ PHP versions simultaneously
<?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 - 7.1.20, 7.2.6 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20
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 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.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

preferences:
237.21 ms | 402 KiB | 350 Q