Layman understanding of SHAKE128 XOF Need some help. I am not versed in hashing and just started programming with PHP and currently need to hash some strings but required it to be unique. Found that OpenSSL can hash with SHAKE128 but without the option to select the lengths of the output. Notice that every openssl_digest function with shake128 hash output is 256 character by default, can I just take the first 20 character to use since I notice only the last few characters are appended with each length change? 
shake128 hash "hello" 
example:  

5 byte - 8eb4b6a932

6 byte - 8eb4b6a932f2

7 byte - 8eb4b6a932f280

8 byte - 8eb4b6a932f28033

16 byte - 8eb4b6a932f280335ee1a279f8c208a3

Appreciate your insight. Thank you.
Yes, you can do that as long as you promise to not to use the hash for any other purpose that would be compromised if the shorter hash would leak. However, if you  need fewer than 128 bits then you might as well use SHA-3 and truncate that; it depends on the purpose if SHAKE128 is better than, say, SHA-3-256; they both depend on the same underlying sponge function after all.

Note that neither SHAKE128 or SHA-3-256 output any characters. They generate binary bits or - for most implementations - bytes. The hexadecimal characters that you're showing are just a representation of those bytes.