summaryrefslogtreecommitdiff
path: root/Zend/tests/bug62005.phpt
blob: c99b28726fee9e34dee5e0bd22532875e0270276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
--FILE--
<?php
function add_points($player, $points) {
    $player->energy += $points;
    print_r($player);
}
add_points(NULL, 2);
--EXPECTF--
Warning: Creating default object from empty value in %sbug62005.php on line %d
stdClass Object
(
    [energy] => 2
)