©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
(PECL judy >= 0.1.1)
The 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
$judy = new Judy ( Judy :: INT_TO_MIXED );
$judy [ 1 ] = "one" ;
$judy [ 2 ] = array( 'a' , 'b' , 'c' );
$judy [ 3 ] = new Judy ( Judy :: BITSET );
?>
$nth_index
)$judy_type
)$index_start
= 0
[, int $index_end
= -1
]] )$index
] )$index
= 0
] )$index
] )$index
= -1
] )$index
)$index
)$offset
)$offset
)$offset
, mixed $value
)$offset
)$index
)$index
)Judy::BITSET
Define the Judy Array as a Bitset with keys as Integer and Values as a Boolean
Judy::INT_TO_INT
Define the Judy Array with key/values as Integer, and Integer only.
Judy::INT_TO_MIXED
Define the Judy Array with keys as Integer and Values of any type.
Judy::STRING_TO_INT
Define the Judy Array with keys as a String and Values as Integer, and Integer only.
Judy::STRING_TO_MIXED
Define the Judy Array with keys as a String and Values of any type.