I have an eeprom that I control with a php script.
I can control the parameters of this eeprom reading and writing words (16 bit), some of these can control two different parameters with the possibility to write the first or the second byte (8 bit) of the word with a decimal o hexadecimal data.
There is a method to write a word (with the possibility to write the first or the second byte free) in php?
I have an eeprom that I control with a php script. I can control
Share
I think you are looking for
pack():You’ll probably need to supply values of the integer type to
pack(), if you want to represent them in your code as Hex you can do one of the following:Alternatively, you can declare literal Hex bytes in a string using this syntax:
If you need to convert the bytes you are reading back into integers for processing, you can use the complementing function
unpack():