I have code JAVA
byte abyte1[] = new byte[k];
But php not have byte type. Its possible to convert this line to php?
I have code JAVA
byte abyte1[] = new byte[k];
But php not have byte type. Its possible to convert this line to php?
The concept of a fixed-length array is not really one that exists in php. Additonally, you don't specify the type of an array either, instead all arrays are actually a hash, that can store any type.
The closest thing to what you ask is:
$abyte1 = array();
And then you can just insert bytes as you might normally:
$abyte1[0] = 1;
$abyte1[1] = 2;
Or you can add to the end of the list:
$abyte1[] = 3;