Because PHP's file system operations are based on C language functions, it may handle Null characters in ways you don't expect. The Null character is used to identify the end of a string in the C language. A complete string is from the beginning until the Null character is encountered. The following code demonstrates a similar attack:
Example #1 Code that will be attacked by the Null character problem