mirror of
https://github.com/php/php-src.git
synced 2024-12-18 22:41:20 +08:00
52 lines
983 B
Plaintext
52 lines
983 B
Plaintext
|
--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);
|
||
|
var_dump($a->$b->$c[1]);
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Notice: Undefined variable: a in %s on line %d
|
||
|
NULL
|
||
|
|
||
|
Notice: Undefined variable: c in %s on line %d
|
||
|
|
||
|
Notice: Undefined variable: a in %s on line %d
|
||
|
NULL
|
||
|
|
||
|
Notice: Undefined variable: a in %s on line %d
|
||
|
int(1)
|
||
|
|
||
|
Notice: Undefined variable: b in %s on line %d
|
||
|
|
||
|
Notice: Undefined variable: a in %s on line %d
|
||
|
int(0)
|
||
|
|
||
|
Notice: Undefined variable: a in %s on line %d
|
||
|
NULL
|
||
|
|
||
|
Notice: Undefined variable: b in %s on line %d
|
||
|
int(1)
|
||
|
|
||
|
Notice: Trying to get property of non-object in %s on line %d
|
||
|
NULL
|
||
|
|
||
|
Notice: Trying to get property of non-object in %s on line %d
|
||
|
NULL
|
||
|
|
||
|
Notice: Undefined variable: c in %s on line %d
|
||
|
|
||
|
Notice: Trying to get property of non-object in %s on line %d
|
||
|
|
||
|
Notice: Trying to get property of non-object in %s on line %d
|
||
|
NULL
|