Глава 36: пространство имен

This commit is contained in:
Igor Simdyanov
2022-05-27 21:28:32 +03:00
parent bcef05e76b
commit 8b99b51ec8
18 changed files with 251 additions and 0 deletions

View File

@ -0,0 +1,12 @@
<?php
namespace PHP8;
function strlen($str)
{
return count(str_split($str));
}
// Это PHP8\strlen
echo \PHP8\strlen('Hello, world!') . '<br />';
echo strlen('Hello, world!') . '<br />';
echo namespace\strlen('Hello, world!') . '<br />';