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 (11 years, 8 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

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

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