89765cd4f2
This diff changes HHVM so that arrays are considered to implement the Traversable and KeyedTraversable interfaces (which have no methods). The idea is that these interfaces will be useful for parameter type constraints for PHP code that wants to be compatible with both arrays and collections (and possibly other objects that implement these interfaces).
15 linhas
249 B
Plaintext
15 linhas
249 B
Plaintext
bool(true)
|
|
bool(true)
|
|
bool(true)
|
|
bool(false)
|
|
Traversable Array
|
|
array(0) {
|
|
}
|
|
KeyedTraversable Array
|
|
array(0) {
|
|
}
|
|
Indexish Array
|
|
array(0) {
|
|
}
|
|
HipHop Fatal error: Argument 1 passed to ifoo() must be an instance of IFoo, array given in %s on line %d
|