Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var_dump("abcdef"[-2]); // Print: string (1) "e"
var_dump(strpos("aabbcc", "b", -3)); // Print: int(3)
$string = 'bar';
echo "El último carácter de '$string' es '$string[-1]'.\n";
// Print: El último carácter de 'bar' is 'r'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment