php-src/Zend/tests/024.phpt

58 lines
1.2 KiB
Plaintext
Raw Normal View History

2008-04-18 21:54:46 +08:00
--TEST--
Testing operations with undefined variable
--FILE--
<?php
var_dump($a[1]);
var_dump($a[$c]);
var_dump($a + 1);
var_dump($a + $b);
var_dump($a++);
var_dump(++$b);
var_dump($a->$b);
var_dump($a->$b);
2014-05-31 06:48:06 +08:00
var_dump($a->$b->{$c[1]});
2008-04-18 21:54:46 +08:00
?>
--EXPECTF--
Warning: Undefined variable: a in %s on line %d
Warning: Trying to access array offset on value of type null in %s on line %d
2008-04-18 21:54:46 +08:00
NULL
Warning: Undefined variable: a in %s on line %d
Warning: Undefined variable: c in %s on line %d
2008-04-18 21:54:46 +08:00
Warning: Trying to access array offset on value of type null in %s on line %d
2008-04-18 21:54:46 +08:00
NULL
Warning: Undefined variable: a in %s on line %d
2008-04-18 21:54:46 +08:00
int(1)
Warning: Undefined variable: a in %s on line %d
2008-04-18 21:54:46 +08:00
Warning: Undefined variable: b in %s on line %d
2008-04-18 21:54:46 +08:00
int(0)
Warning: Undefined variable: a in %s on line %d
2008-04-18 21:54:46 +08:00
NULL
Warning: Undefined variable: b in %s on line %d
2008-04-18 21:54:46 +08:00
int(1)
Warning: Trying to get property '1' of non-object in %s on line %d
2008-04-18 21:54:46 +08:00
NULL
Warning: Trying to get property '1' of non-object in %s on line %d
2008-04-18 21:54:46 +08:00
NULL
Warning: Undefined variable: c in %s on line %d
2008-04-18 21:54:46 +08:00
Warning: Trying to access array offset on value of type null in %s on line %d
Warning: Trying to get property '1' of non-object in %s on line %d
2008-04-18 21:54:46 +08:00
Warning: Trying to get property '' of non-object in %s on line %d
2008-04-18 21:54:46 +08:00
NULL