1--TEST-- 2decrementing different variables 3--SKIPIF-- 4<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?> 5--INI-- 6precision=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 28foreach ($a as $var) { 29 $var--; 30 var_dump($var); 31} 32 33echo "Done\n"; 34?> 35--EXPECTF-- 36array(3) { 37 [0]=> 38 int(1) 39 [1]=> 40 int(2) 41 [2]=> 42 int(3) 43} 44int(-1) 45int(0) 46float(1.5) 47int(-1) 48string(6) "string" 49int(122) 50float(1.5) 51NULL 52bool(true) 53bool(false) 54object(stdClass)#%d (0) { 55} 56array(0) { 57} 58float(-9.2233720368548E+18) 59float(-9.2233720368548E+18) 60Done 61