I do not have any error messages, and can proceed if necessary, but I couldn’t find the bug report section so I figured I’d write this here.
Now the bug in question, if you look at my code below, for the sub string, I provide code to fetch the string from characters 0-3, however it goes from 0-2. If my memory is correct, when a string character is assigned a place it starts at 0, so “Nick” is:
When I change the end character value from substr($test, 0, 3); to substr($test, 0, 4); it extends to print the full string – print strlen($test) the output would be 4, because the string is 4 characters in length, however if it were to start counting at zero, then the last character in the string should be assigned a character place of the string length minus one right?
EDIT: Note, the only explanation, in my mind, is that, you know when someone is to say, ‘pick a number between one and ten’ you don’t really pick 1 or 10, I get the concept, but at the same time if I set print substr($test, 1, 4) it will output “ick” meaning that the N is assigned a place value of 0, but then why is the k assigned a place value of 4?```
<?php $test="Nick"; print substr($test, 0,3); ?>
<?php print strtoupper($test); ?>
<?php echo strtolower($test); ?>
<do not remove the three backticks above>