mirror of
https://github.com/restoreddev/phpapprentice.git
synced 2025-08-02 21:07:43 +02:00
Multibyte-aware string function
I notice you used some emoji and therefore like unicode. I think it would be a good idea to (indirectly) teach users to use functions which can do international alphabets and emoji from the start.
I read through your guide and think it *is* awesome. In my decade as a PHP developer I have never seen such a succinct and informative explanation of abstract classes before. ❤️
This commit is contained in:
@@ -37,7 +37,7 @@ You can also return a value from a function. You can only
|
|||||||
return a single value from a function.
|
return a single value from a function.
|
||||||
```php
|
```php
|
||||||
function capitalize($value) {
|
function capitalize($value) {
|
||||||
return strtoupper($value);
|
return mb_strtoupper($value);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user