Judy ArraysTable of Contents
The Judy classIntroductionThe Judy class implements the ArrayAccess interface and the Iterator interface. This class, once instantiated, can be accessed like a PHP array. A PHP Judy object (or Judy Array) can be one of the following type :
Example #1 Judy array example
<?php Class synopsisJudy
class Judy
implements
ArrayAccess
,
Iterator
{
/* Constants */
const
integer
Judy::BITSET
= 1
;
const
integer
Judy::INT_TO_INT
= 2
;
const
integer
Judy::INT_TO_MIXED
= 3
;
const
integer
Judy::STRING_TO_INT
= 4
;
const
integer
Judy::STRING_TO_MIXED
= 5
;
/* Methods */
public int byCount
( int
$nth_index
)
public __construct
( int
$judy_type
)
public int count
([ int
$index_start = 0
[, int $index_end = -1
]] )
public void __destruct
( void
)
public mixed first
([ mixed
$index
] )
public int firstEmpty
([ mixed
$index = 0
] )
public int free
( void
)
public int getType
( void
)
public void last
([ string
$index
] )
public int lastEmpty
([ int
$index = -1
] )
public int memoryUsage
( void
)
public mixed next
( mixed
$index
)
public int nextEmpty
( int
$index
)
public bool offsetExists
( mixed
$offset
)
public mixed offsetGet
( mixed
$offset
)
public bool offsetSet
( mixed
$offset
, mixed $value
)
public bool offsetUnset
( mixed
$offset
)
public mixed prev
( mixed
$index
)
public int prevEmpty
( mixed
$index
)
public void size
( void
)
}Predefined Constants
|