From 73b7f646b426485178bf5113e0f93884e66ce799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Fri, 24 Jan 2014 14:40:36 +0800 Subject: [PATCH] Recovering ByteArray's functionality --- deprecated/php/ByteArray.php | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/deprecated/php/ByteArray.php b/deprecated/php/ByteArray.php index 8d4149e..95a9c31 100644 --- a/deprecated/php/ByteArray.php +++ b/deprecated/php/ByteArray.php @@ -1,5 +1,20 @@ writeInt(12345); $a->writeShort(11223); $a->writeUnsignedInt(1125434357); $a->position = 0; + echo "ReadInt: "; echo $a->readInt()."\n"; + echo "ReadShort: "; echo $a->readShort()."\n"; + echo "readUnsignedShort: "; echo $a->readUnsignedInt()."\n"; $a->position = 0; $a->writeDouble(1); @@ -448,19 +466,31 @@ class ByteArray extends ArrayObject { $a->writeFloat(150); $a->writeFloat(132.1); $a->position = 0; + echo "readDouble: "; echo $a->readDouble()."\n"; + echo "readDouble: "; echo $a->readDouble()."\n"; + echo "readDouble: "; echo $a->readDouble()."\n"; + echo "readDouble: "; echo $a->readDouble()."\n"; + echo "readDouble: "; echo $a->readDouble()."\n"; + echo "readDouble: "; echo $a->readDouble()."\n"; + echo "readFloat: "; echo $a->readFloat()."\n"; + echo "readFloat: "; echo $a->readFloat()."\n"; + echo "readFloat: "; echo $a->readFloat()."\n"; + echo "readFloat: "; echo $a->readFloat()."\n"; + echo "readFloat: "; echo $a->readFloat()."\n"; + echo "readFloat: "; echo $a->readFloat()."\n"; //*/ -?> \ No newline at end of file +?>