ArrayObject::__construct


Constructs a new array object.



<?php

public ArrayObject::__construct ([ mix $input = array() [, int $flags = 0 [, str $iterator_class = "ArrayIterator" ]]] )


where,

$input = Input variable, which can be an ARRAY or an OBJECT

$flags 
= To control de behavior of one ArrayObject

$iterator_class 
= The class that will be used for 
                           
iteration of the ArrayObject object

?>

$input


Input variable, which can be an ARRAY or an OBJECT.



$flags


To control de behavior of one ArrayObject.



$iterator_class


The class that will be used for iteration of the ArrayObject object.



 ATTENTION 


When the $input is not an ARRAY or OBJECT, when the $iflags is not an INTEGER and $iterator_class is not an OBJECT that implements Iterator; an InvalidArgumentException is issued.



<?php

 Iterator 
extends Traversable {
/* Methods */
abstract public current ( void ) : mixed
abstract public key ( void ) : scalar
abstract public next ( void ) : void
abstract public rewind ( void ) : void
abstract public valid ( void ) : bool
}

?>

<?php

 IteratorAggregate 
extends Traversable {
/* Methods */
abstract public getIterator ( void ) : Traversable
}}

?>

<?php

 Traversable 
{
}

?>

<?php

 InvalidArgumentException 
extends LogicException {
/* Inherited properties */
protected string $message ;
protected 
int $code ;
protected 
string $file ;
protected 
int $line ;
/* Inherited methods */
final public Exception::getMessage ( void ) : string
final public Exception::getPrevious ( void ) : Throwable
final public Exception::getCode ( void ) : mixed
final public Exception::getFile ( void ) : string
final public Exception::getLine ( void ) : int
final public Exception::getTrace ( void ) : array
final public 
Exception::getTraceAsString ( void ) : string
public Exception::__toString ( void ) : string
final private Exception::__clone ( void ) : void
}

?>

<?php

 LogicException 
extends Exception {
/* Inherited properties */
protected string $message ;
protected 
int $code ;
protected 
string $file ;
protected 
int $line ;
/* Inherited methods */
final public Exception::getMessage ( void ) : string
final public Exception::getPrevious ( void ) : Throwable
final public Exception::getCode ( void ) : mixed
final public Exception::getFile ( void ) : string
final public Exception::getLine ( void ) : int
final public Exception::getTrace ( void ) : array
final public 
Exception::getTraceAsString ( void ) : string
public Exception::__toString ( void ) : string
final private Exception::__clone ( void ) : void
}

?>

<?php

 Exception 
implements Throwable {
/* Properties */
protected string $message ;
protected 
int $code ;
protected 
string $file ;
protected 
int $line ;
/* Methods */
public __construct ([ string $message = "" [, int $code = 0 [, Throwable $previous = NULL ]]] )
final public 
getMessage ( void ) : string
final public getPrevious ( void ) : Throwable
final public getCode ( void ) : mixed
final public getFile ( void ) : string
final public getLine ( void ) : int
final public getTrace ( void ) : array
final public 
getTraceAsString ( void ) : string
public __toString ( void ) : string
final private __clone ( void ) : void
}

?>

<?php

 Throwable 
{
/* Methods */
abstract public getMessage ( void ) : string
abstract public getCode ( void ) : int
abstract public getFile ( void ) : string
abstract public getLine ( void ) : int
abstract public getTrace ( void ) : array
abstract public 
getTraceAsString ( void ) : string
abstract public getPrevious ( void ) : Throwable
abstract public __toString ( void ) : string
}

?>

  1 EXERCISE   

rsr/ArrayObject __construct01.php
FILE NOT FOUND

rsr/ArrayObject __construct01a.php
FILE NOT FOUND