Annotation of embedaddon/php/tests/lang/007.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Function call with global and static variables
! 3: --FILE--
! 4: <?php
! 5: error_reporting(0);
! 6: $a = 10;
! 7:
! 8: function Test()
! 9: {
! 10: static $a=1;
! 11: global $b;
! 12: $c = 1;
! 13: $b = 5;
! 14: echo "$a $b ";
! 15: $a++;
! 16: $c++;
! 17: echo "$a $c ";
! 18: }
! 19:
! 20: Test();
! 21: echo "$a $b $c ";
! 22: Test();
! 23: echo "$a $b $c ";
! 24: Test();
! 25: ?>
! 26: --EXPECT--
! 27: 1 5 2 2 10 5 2 5 3 2 10 5 3 5 4 2
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>