What are the differences between using 'C' and 'I' in the pack function in PHP for defining data types?

When using the pack function in PHP to define data types, 'C' is used for unsigned characters (0-255), while 'I' is used for unsigned integers (depends on the system's word size). It is important to use the correct data type specifier to ensure the data is packed and unpacked correctly.

// Using 'C' for unsigned character
$data = pack('C', 65); // packs the value 65 as an unsigned character

// Using 'I' for unsigned integer
$data = pack('I', 1000); // packs the value 1000 as an unsigned integer