public static function safeStrcpy(string $string): string
    {
        $length = Binary::safeStrlen($string);
        $return = '';
        /** @var int $chunk */
        $chunk = $length >> 1;
        if ($chunk < 1) {
            $chunk = 1;
        }
        for ($i = 0; $i < $length; $i += $chunk) {
            $return .= Binary::safeSubstr($string, $i, $chunk);
        }
        return $return;
    }
public static function safeStrcpy(string $string): string
    {
        $length = Binary::safeStrlen($string);
        $return = '';
        /** @var int $chunk */
        $chunk = $length >> 1;
        if ($chunk < 1) {
            $chunk = 1;
        }
        for ($i = 0; $i < $length; $i += $chunk) {
            $return .= Binary::safeSubstr($string, $i, $chunk);
        }
        return $return;
    }
public static function safeStrcpy ( string $ string ) : string { $ length = Binary :: safeStrlen ( $ string ) ; $ return = '' ; /** @var int $chunk */ $ chunk = $ length >> 1 ; if ( $ chunk < 1 ) { $ chunk = 1 ; } for ( $ i = 0 ; $ i < $ length ; $ i += $ chunk ) { $ return .= Binary :: safeSubstr ( $ string , $ i , $ chunk ) ; } return $ return ; }
PHP 7 uses interned strings. We don't want altering this one to alter
the original string.

@param string $string
@return string
@throws \TypeError
PHP 7 uses interned strings . We don t want altering this one to alter the original string .