mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
56 lines
873 B
PHP
56 lines
873 B
PHP
<?php
|
|
|
|
interface Traversable {}
|
|
|
|
interface IteratorAggregate extends Traversable
|
|
{
|
|
/** @return Traversable */
|
|
function getIterator();
|
|
}
|
|
|
|
interface Iterator extends Traversable
|
|
{
|
|
function current();
|
|
|
|
/** @return void */
|
|
function next();
|
|
|
|
function key();
|
|
|
|
/** @return bool */
|
|
function valid();
|
|
|
|
/** @return void */
|
|
function rewind();
|
|
}
|
|
|
|
interface ArrayAccess
|
|
{
|
|
function offsetExists($offset);
|
|
|
|
/* actually this should be return by ref but atm cannot be */
|
|
function offsetGet($offset);
|
|
|
|
function offsetSet($offset, $value);
|
|
|
|
function offsetUnset($offset);
|
|
}
|
|
|
|
interface Serializable
|
|
{
|
|
/** @return string */
|
|
function serialize();
|
|
|
|
function unserialize(string $serialized);
|
|
}
|
|
|
|
interface Countable
|
|
{
|
|
/** @return int */
|
|
function count();
|
|
}
|
|
|
|
interface Stringable
|
|
{
|
|
function __toString(): string;
|
|
}
|