note 130630 added to language.operators.functional
| From: | tjkappel@gmail.com | Date: | Fri, 30 Jan 2026 15:08:03 +0000 |
| Subject: | note 130630 added to language.operators.functional | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-222522@lists.php.net to get a copy of this message | ||
Keep in mind encoding and types used. The output of the following code is:
3
2
Presumably because one char is 3 bytes and 11, while an integer and not a string, is 2 chars:
<?php
$result = "â
" |> strlen(...);
echo $result, PHP_EOL;
$result = strlen("Hello World");
echo $result |> strlen(...);
?>
----
Server IP: 206.189.2.9
Probable Submitter: 37.96.121.162
----
Manual Page -- https://php.net/manual/en/language.operators.functional.php
Edit -- https://main.php.net/note/edit/130630
Del: integrated -- https://main.php.net/note/delete/130630/integrated
Del: useless -- https://main.php.net/note/delete/130630/useless
Del: bad code -- https://main.php.net/note/delete/130630/bad+code
Del: spam -- https://main.php.net/note/delete/130630/spam
Del: non-english -- https://main.php.net/note/delete/130630/non-english
Del: in docs -- https://main.php.net/note/delete/130630/in+docs
Del: other reasons-- https://main.php.net/note/delete/130630
Reject -- https://main.php.net/note/reject/130630
Search -- https://main.php.net/manage/user-notes.php