1--TEST-- 2Test --N operator : various numbers as strings 3--FILE-- 4<?php 5 6$strVals = array( 7 "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a", 8 "a5.9" 9); 10 11 12foreach ($strVals as $strVal) { 13 echo "--- testing: '$strVal' ---\n"; 14 var_dump(--$strVal); 15} 16 17?> 18--EXPECT-- 19--- testing: '0' --- 20int(-1) 21--- testing: '65' --- 22int(64) 23--- testing: '-44' --- 24int(-45) 25--- testing: '1.2' --- 26float(0.19999999999999996) 27--- testing: '-7.7' --- 28float(-8.7) 29--- testing: 'abc' --- 30string(3) "abc" 31--- testing: '123abc' --- 32string(6) "123abc" 33--- testing: '123e5' --- 34float(12299999) 35--- testing: '123e5xyz' --- 36string(8) "123e5xyz" 37--- testing: ' 123abc' --- 38string(7) " 123abc" 39--- testing: '123 abc' --- 40string(7) "123 abc" 41--- testing: '123abc ' --- 42string(7) "123abc " 43--- testing: '3.4a' --- 44string(4) "3.4a" 45--- testing: 'a5.9' --- 46string(4) "a5.9" 47