In HACK array can be created using one of the following ways:
Untyped Array : array
Explicitly Typed Array with Integer key: array<Type>
Explicitly Typed Array with string or Integer key: array<int, Type> / array<string, Type>
Example:
<?hh
class MyClass {}
class MyArray {
  private array $arr1;//Array with Integer key
  private array $arr2;
//Array with string key
  public function __construct() { 
    $this->arr1 = array();
    $this->arr2 = array();
 }
}
30 Mar 2014

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.