File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug62005.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:17 2013 UTC (10 years, 11 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--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
)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>