Annotation of embedaddon/php/Zend/tests/decrement_001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: decrementing different variables
! 3: --SKIPIF--
! 4: <?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
! 5: --INI--
! 6: precision=14
! 7: --FILE--
! 8: <?php
! 9:
! 10: $a = array(
! 11: array(1,2,3),
! 12: "",
! 13: 1,
! 14: 2.5,
! 15: 0,
! 16: "string",
! 17: "123",
! 18: "2.5",
! 19: NULL,
! 20: true,
! 21: false,
! 22: new stdclass,
! 23: array(),
! 24: -PHP_INT_MAX-1,
! 25: (string)(-PHP_INT_MAX-1),
! 26: );
! 27:
! 28: foreach ($a as $var) {
! 29: $var--;
! 30: var_dump($var);
! 31: }
! 32:
! 33: echo "Done\n";
! 34: ?>
! 35: --EXPECTF--
! 36: array(3) {
! 37: [0]=>
! 38: int(1)
! 39: [1]=>
! 40: int(2)
! 41: [2]=>
! 42: int(3)
! 43: }
! 44: int(-1)
! 45: int(0)
! 46: float(1.5)
! 47: int(-1)
! 48: string(6) "string"
! 49: int(122)
! 50: float(1.5)
! 51: NULL
! 52: bool(true)
! 53: bool(false)
! 54: object(stdClass)#%d (0) {
! 55: }
! 56: array(0) {
! 57: }
! 58: float(-2147483649)
! 59: float(-2147483649)
! 60: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>