Annotation of embedaddon/php/Zend/tests/bug52041.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #52041 (Memory leak when writing on uninitialized variable returned from function)
! 3: --FILE--
! 4: <?php
! 5: function foo() {
! 6: return $x;
! 7: }
! 8:
! 9: foo()->a = 1;
! 10: foo()->a->b = 2;
! 11: foo()->a++;
! 12: foo()->a->b++;
! 13: foo()->a += 2;
! 14: foo()->a->b += 2;
! 15:
! 16: //foo()[0] = 1;
! 17: //foo()[0][0] = 2;
! 18: //foo()[0]++;
! 19: //foo()[0][0]++;
! 20: //foo()[0] += 2;
! 21: //foo()[0][0] += 2;
! 22: var_dump(foo());
! 23: ?>
! 24: --EXPECTF--
! 25: Notice: Undefined variable: x in %sbug52041.php on line 3
! 26:
! 27: Strict Standards: Creating default object from empty value in %sbug52041.php on line 6
! 28:
! 29: Notice: Undefined variable: x in %sbug52041.php on line 3
! 30:
! 31: Strict Standards: Creating default object from empty value in %sbug52041.php on line 7
! 32:
! 33: Notice: Undefined variable: x in %sbug52041.php on line 3
! 34:
! 35: Strict Standards: Creating default object from empty value in %sbug52041.php on line 8
! 36:
! 37: Notice: Undefined variable: x in %sbug52041.php on line 3
! 38:
! 39: Strict Standards: Creating default object from empty value in %sbug52041.php on line 9
! 40:
! 41: Notice: Undefined variable: x in %sbug52041.php on line 3
! 42:
! 43: Strict Standards: Creating default object from empty value in %sbug52041.php on line 10
! 44:
! 45: Notice: Undefined variable: x in %sbug52041.php on line 3
! 46:
! 47: Strict Standards: Creating default object from empty value in %sbug52041.php on line 11
! 48:
! 49: Notice: Undefined variable: x in %sbug52041.php on line 3
! 50: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>