`Notice: Hex number is too big: 0x100000000` is the error. You won't get the error if it's in your main PHP file but you'll get it if you do that in an included file. And I'm aware that N is a 32-bit int. The idea with that is to get the upper 32-bits of $new_size (to the extent that we can) and then to get the lower 32-bits with the second half. In this way phpseclib can process files larger than 2-3GB or whatever the limit is on 32-bit systems. SFTP, as a protocol, supports files up to 2**64 bytes or 16,384 petabytes. PHP obviously doesn't support that but it can be made to support files > 2-3GB.