PHP 8.4.24 Released!

Voting

: six minus zero?
(Example: nine)

The Note You're Voting On

kriskra at gmail dot com
18 years ago
The javascript charAt equivalent in php of felipe has a little bug. It's necessary to compare the type (implicit) aswell or the function returns a wrong result:
<?php
function charAt($str,$pos) {
    return (substr($str,$pos,1) !== false) ? substr($str,$pos,1) : -1;
}
?>

<< Back to user notes page

To Top