| 69 | } |
| 70 | |
| 71 | private static function _pack_array( |
| 72 | /*array /*use type hint if you can removing initial comment*/ |
| 73 | $list, |
| 74 | /*int /*use type hint if you can removing initial comment*/ |
| 75 | $length |
| 76 | ) { |
| 77 | for ( |
| 78 | $keys = array_keys($list[0]), |
| 79 | $klength = count($keys), |
| 80 | $result = array(), |
| 81 | $i = 0, |
| 82 | $j = 0, |
| 83 | $ki, $o; |
| 84 | $i < $length; ++$i |
| 85 | ) { |
| 86 | for ( |
| 87 | $o = $list[$i], $ki = 0; |
| 88 | $ki < $klength; |
| 89 | $result[$j++] = $o[$keys[$ki++]] |
| 90 | ); |
| 91 | } |
| 92 | return array_merge(array($klength), $keys, $result); |
| 93 | } |
| 94 | |
| 95 | private static function _pack_object( |
| 96 | /*object /*use type hint if you can removing initial comment*/ |