????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.191 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/spl/tests/ |
Upload File : |
--TEST--
SPL: ArrayObject
--FILE--
<?php
$ar = array(0=>0, 1=>1);
$ar = new ArrayObject($ar);
var_dump($ar);
$ar[2] = 2;
var_dump($ar[2]);
var_dump($ar["3"] = 3);
var_dump(array_merge((array)$ar, array(4=>4, 5=>5)));
var_dump($ar["a"] = "a");
var_dump($ar);
var_dump($ar[0]);
var_dump($ar[6]);
var_dump($ar["b"]);
unset($ar[1]);
unset($ar["3"]);
unset($ar["a"]);
unset($ar[7]);
unset($ar["c"]);
var_dump($ar);
$ar[] = '3';
$ar[] = 4;
var_dump($ar);
?>
===DONE===
<?php exit(0); ?>
--EXPECTF--
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(2) {
[0]=>
int(0)
[1]=>
int(1)
}
}
int(2)
int(3)
array(6) {
[0]=>
int(0)
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
[4]=>
int(4)
[5]=>
int(5)
}
string(1) "a"
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(5) {
[0]=>
int(0)
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
["a"]=>
string(1) "a"
}
}
int(0)
Notice: Undefined offset: 6 in %sarray_001.php on line %d
NULL
Notice: Undefined index: b in %sarray_001.php on line %d
NULL
Notice: Undefined offset: 7 in %sarray_001.php on line %d
Notice: Undefined index: c in %sarray_001.php on line %d
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(2) {
[0]=>
int(0)
[2]=>
int(2)
}
}
object(ArrayObject)#%d (1) {
["storage":"ArrayObject":private]=>
array(4) {
[0]=>
int(0)
[2]=>
int(2)
[4]=>
string(1) "3"
[5]=>
int(4)
}
}
===DONE===