File: SplFixedArray_offsetGet_invalid_parameter.phpt

package info (click to toggle)
php7.3 7.3.31-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 187,388 kB
  • sloc: ansic: 913,717; php: 22,387; sh: 11,230; cpp: 7,678; javascript: 3,040; pascal: 2,519; xml: 2,099; yacc: 1,950; exp: 1,514; makefile: 721; perl: 315; awk: 263; sql: 22
file content (16 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
SPL FixedArray offsetGet throws error on no parameter
--CREDITS--
PHPNW TestFest 2009 - Ben Longden
--FILE--
<?php
$array = new SplFixedArray(5);
$array[0] = 'a';
$a = $array->offsetGet();
if(is_null($a)) {
	echo 'PASS';
}
?>
--EXPECTF--
Warning: SplFixedArray::offsetGet() expects exactly 1 parameter, 0 given in %s on line %d
PASS