]> granicus.if.org Git - php/commitdiff
Updated tests after double->long conversion change (basically to match 5.2)
authorMatt Wilmas <mattwil@php.net>
Thu, 4 Jun 2009 18:24:09 +0000 (18:24 +0000)
committerMatt Wilmas <mattwil@php.net>
Thu, 4 Jun 2009 18:24:09 +0000 (18:24 +0000)
# Let me know about other failing tests I missed

42 files changed:
Zend/tests/bug39018.phpt
Zend/tests/int_overflow_64bit.phpt
Zend/tests/int_underflow_32bit.phpt
ext/date/tests/date_sunrise_variation9.phpt
ext/date/tests/date_sunset_variation9.phpt
ext/date/tests/getdate_variation7.phpt
ext/date/tests/gmdate_variation14.phpt
ext/date/tests/gmstrftime_variation2.phpt
ext/date/tests/idate_variation3.phpt
ext/date/tests/localtime_variation3.phpt
ext/date/tests/strftime_variation23.phpt
ext/ereg/tests/split_variation_004.phpt
ext/ereg/tests/spliti_variation_004.phpt
ext/standard/tests/array/array_fill_variation1.phpt
ext/standard/tests/array/array_slice_variation2.phpt
ext/standard/tests/array/array_slice_variation3.phpt
ext/standard/tests/general_functions/gettype_settype_variation2.phpt
ext/standard/tests/math/decbin_variation1.phpt
ext/standard/tests/math/decbin_variation1_64bit.phpt
ext/standard/tests/math/dechex_variation1.phpt
ext/standard/tests/math/dechex_variation1_64bit.phpt
ext/standard/tests/math/decoct_variation1.phpt
ext/standard/tests/math/decoct_variation1_64bit.phpt
ext/standard/tests/strings/chunk_split_variation2.phpt
ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
ext/standard/tests/strings/pack.phpt
ext/standard/tests/strings/sprintf_variation35.phpt
ext/standard/tests/strings/sprintf_variation4.phpt
ext/standard/tests/strings/sprintf_variation41.phpt
ext/standard/tests/strings/vfprintf_variation15.phpt
ext/standard/tests/strings/vfprintf_variation16.phpt
ext/standard/tests/strings/vfprintf_variation4.phpt
ext/standard/tests/strings/vprintf_variation15.phpt
ext/standard/tests/strings/vprintf_variation15_64bit.phpt
ext/standard/tests/strings/vprintf_variation16.phpt
ext/standard/tests/strings/vprintf_variation4.phpt
ext/standard/tests/strings/vsprintf_variation15.phpt
ext/standard/tests/strings/vsprintf_variation15_64bit.phpt
ext/standard/tests/strings/vsprintf_variation16.phpt
ext/standard/tests/strings/vsprintf_variation4.phpt
ext/standard/tests/url/parse_url_variation_002_32bit.phpt [new file with mode: 0644]
ext/standard/tests/url/parse_url_variation_002_64bit.phpt [moved from ext/standard/tests/url/parse_url_variation_002.phpt with 97% similarity]

index 1bc23d3bab6032cab5951e7919dbee403de37794..6de9092c9f369c6693a569c7b12c5341957a2d76 100644 (file)
@@ -65,7 +65,7 @@ print "\nDone\n";
 
 Notice: Uninitialized string offset: 0 in %s on line 12
 
-Notice: Uninitialized string offset: -%d in %s on line 16
+Notice: Uninitialized string offset: %i in %s on line 16
 
 Notice: Uninitialized string offset: 4 in %s on line 28
 
index 0cb9ea9f810d178f759c85af9886edead32897cc..7c541250205c87d9508649b4857ed215a1b90b52 100644 (file)
@@ -24,9 +24,9 @@ echo "Done\n";
 ?>
 --EXPECT--
 int(9223372036854775807)
-int(9223372036854775807)
-int(9223372036854775807)
-int(9223372036854775807)
+int(-9223372036854775808)
+int(-9223372036854775808)
+int(0)
 int(-9223372036854775808)
 int(-9223372036854775808)
 int(-9223372036854775808)
index 68e3576242c056bf7f7aabd29f29febc2c116ac1..79a949aac5ce57a009d8a17111b7435e7c353894 100644 (file)
@@ -22,8 +22,8 @@ echo "Done\n";
 ?>
 --EXPECT--
 int(-2147483648)
-int(-2147483648)
-int(-2147483648)
-int(-2147483648)
-int(-2147483648)
+int(2147483647)
+int(2147483638)
+int(2147483548)
+int(2147482648)
 Done
index c32065513723c6ddd8d4c1a81e7caf44ab83845a..63794bf20e8729cf6ec38e96a666016b56da9ab8 100644 (file)
@@ -36,12 +36,12 @@ var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $ze
 \*\*\* Testing date_sunrise\(\) : usage variation \*\*\*
 
 -- Testing date_sunrise\(\) function by passing float 12.3456789000e10 value to time --
-unicode\(5\) "(08:53|07:49)"
-float\((8.883[0-9]*|8.883[0-9]*|7.821[0-9]*)\)
-int\((-2147466915|123456811756)\)
+unicode\(5\) "(07:34|07:49)"
+float\((7.566[0-9]*|7.821[0-9]*)\)
+int\((-1097256359|123456811756)\)
 
 -- Testing date_sunrise\(\) function by passing float -12.3456789000e10 value to time --
-unicode\(5\) "(08:48|08:04)"
-float\((8.810[0-9]*|8.074[0-9]*)\)
-int\((-2147443882|-123456761731)\)
+unicode\(5\) "(07:42|08:48|08:04)"
+float\((7.713[0-9]*|8.810[0-9]*|8.074[0-9]*)\)
+int\((1097304168|-2147443882|-123456761731)\)
 ===DONE===
index f7481224f5f31a520884b1bee61da3c3ede8118d..4f02452cb2378eef20c7bebc9fd555ea52def745 100644 (file)
@@ -36,12 +36,12 @@ var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zen
 \*\*\* Testing date_sunset\(\) : usage variation \*\*\*
 
 -- Testing date_sunset\(\) function by passing float 12.3456789000e10 value to time --
-unicode\(5\) "(18:40|19:28)"
-float\((18.676[0-9]*|18.6762[0-9]*|19.480[0-9]*)\)
-int\((-2147431662|123456853728)\)
+unicode\(5\) "(19:49|19:28)"
+float\((19.830[0-9]*|19.830[0-9]*|19.480[0-9]*)\)
+int\((-1097212211|123456853728)\)
 
 -- Testing date_sunset\(\) function by passing float -12.3456789000e10 value to time --
-unicode\(5\) "(18:12|18:48)"
-float\((18.213[0-9]*|18.808[0-9]*)\)
-int\((-2147410031|-123456723090)\)
+unicode\(5\) "(19:03|18:12|18:48)"
+float\((19.056[0-9]*|18.213[0-9]*|18.808[0-9]*)\)
+int\((1097345002|-2147410031|-123456723090)\)
 ===DONE===
index b64579e3248784ef379506ac12be9ed3499d9d3c..6e4a34601b05a8455057736d9a7d4a02c0ce1c77 100644 (file)
@@ -27,52 +27,52 @@ var_dump( getdate($timestamp) );
 -- Testing getdate\(\) function by passing float 12.3456789000e10 value to timestamp --
 array\(11\) {
   \[u"seconds"\]=>
-  int\((7|0)\)
+  int\((36|0)\)
   \[u"minutes"\]=>
-  int\((44|0)\)
+  int\((43|0)\)
   \[u"hours"\]=>
-  int\((8|6)\)
+  int\((10|6)\)
   \[u"mday"\]=>
-  int\((19|11)\)
+  int\((26|11)\)
   \[u"wday"\]=>
   int\((2|6)\)
   \[u"mon"\]=>
-  int\((1|3)\)
+  int\(3\)
   \[u"year"\]=>
-  int\((2038|5882)\)
+  int\((1935|5882)\)
   \[u"yday"\]=>
-  int\((18|69)\)
+  int\((84|69)\)
   \[u"weekday"\]=>
   unicode\((7|8)\) "(Tuesday|Saturday)"
   \[u"month"\]=>
-  unicode\((7|5)\) "(January|March)"
+  unicode\(5\) "March"
   \[0\]=>
-  int\((2147483647|123456789000)\)
+  int\((-1097262584|123456789000)\)
 }
 
 -- Testing getdate\(\) function by passing float -12.3456789000e10 value to timestamp --
 array\(11\) {
   \[u"seconds"\]=>
-  int\((12|20)\)
+  int\((44|12|20)\)
   \[u"minutes"\]=>
   int\((39|23)\)
   \[u"hours"\]=>
-  int\((2|5)\)
+  int\((0|2|5)\)
   \[u"mday"\]=>
-  int\((14|23)\)
+  int\((9|14|23)\)
   \[u"wday"\]=>
   int\((6|-4)\)
   \[u"mon"\]=>
-  int\((12|10)\)
+  int\((10|12)\)
   \[u"year"\]=>
-  int\((1901|-1943)\)
+  int\((2004|1901|-1943)\)
   \[u"yday"\]=>
-  int\((347|295)\)
+  int\((282|347|295)\)
   \[u"weekday"\]=>
   unicode\((8|7)\) "(Saturday|Unknown)"
   \[u"month"\]=>
-  unicode\((8|7)\) "(December|October)"
+  unicode\((7|8)\) "(October|December)"
   \[0\]=>
-  int\((-2147483648|-123456789000)\)
+  int\((1097262584|-2147483648|-123456789000)\)
 }
 ===DONE===
index f1eedfe28d9fa6cc268afbe134e2f0f46b726f8f..4b1f993623aac57edb9615bead850c3e24be706a 100644 (file)
@@ -27,8 +27,8 @@ var_dump( gmdate($format, $timestamp) );
 \*\*\* Testing gmdate\(\) : usage variation \*\*\*
 
 -- Testing gmdate\(\) function with float 12.3456789000e10 to timestamp --
-unicode\((24|25)\) "(2038-01-19T03:14:07\+0000|5882-03-11T00:30:00\+0000)"
+unicode\((24|25)\) "(1935-03-26T04:50:16\+0000|5882-03-11T00:30:00\+0000)"
 
 -- Testing gmdate\(\) function with float -12.3456789000e10 to timestamp --
-unicode\((24|25)\) "(1901-12-13T20:45:52\+0000|-1943-10-22T23:30:00\+0000)"
+unicode\((24|25)\) "(2004-10-08T19:09:44\+0000|1901-12-13T20:45:52\+0000|-1943-10-22T23:30:00\+0000)"
 ===DONE===
\ No newline at end of file
index f40ce4e216fdf4d36fbde7930184c4c65855f9c1..b89ff0f14b335f87475e0156d73ee43f5e9c0fbe 100644 (file)
@@ -112,10 +112,10 @@ unicode(20) "Jan 01 1970 00:00:10"
 unicode(20) "Dec 31 1969 23:59:50"
 
 --float 12.3456789000e10--
-unicode(20) "Jan 19 2038 03:14:07"
+unicode(20) "Mar 26 1935 04:50:16"
 
 --float -12.3456789000e10--
-unicode(20) "Dec 13 1901 20:45:52"
+unicode(20) "Oct 08 2004 19:09:44"
 
 --float .5--
 unicode(20) "Jan 01 1970 00:00:00"
index 0546ff219aafc83a8880daac0d683603191843fa..1a2ee1ffd562f4ad44d3dd049cb019a2218b601d 100644 (file)
@@ -28,8 +28,8 @@ var_dump( idate($format, $timestamp) );
 \*\*\* Testing idate\(\) : usage variation \*\*\*
 
 -- Testing idate\(\) function with float 12.3456789000e10 to timestamp --
-int\((2038|5882)\)
+int\((1935|5882)\)
 
 -- Testing idate\(\) function with float -12.3456789000e10 to timestamp --
-int\((1901|-1943)\)
+int\((2004|1901|-1943)\)
 ===DONE===
index c9d792472b9a245ed6f1d0357a92b1a0b2db504a..c0907a714f3dbb1550e25d953d571aa9405d307a 100644 (file)
@@ -33,41 +33,41 @@ var_dump( localtime($timestamp, $is_associative) );
 -- Testing localtime\(\) function with 'float 12.3456789000e10' to timestamp --
 array\(9\) {
   \[0\]=>
-  int\((7|0)\)
+  int\((16|0)\)
   \[1\]=>
-  int\((14|30)\)
+  int\((50|30)\)
   \[2\]=>
-  int\((3|0)\)
+  int\((4|0)\)
   \[3\]=>
-  int\((19|11)\)
+  int\((26|11)\)
   \[4\]=>
-  int\((0|2)\)
+  int\(2\)
   \[5\]=>
-  int\((138|3982)\)
+  int\((35|3982)\)
   \[6\]=>
   int\((2|6)\)
   \[7\]=>
-  int\((18|69)\)
+  int\((84|69)\)
   \[8\]=>
   int\(0\)
 }
 array\(9\) {
   \[u"tm_sec"\]=>
-  int\((7|0)\)
+  int\((16|0)\)
   \[u"tm_min"\]=>
-  int\((14|30)\)
+  int\((50|30)\)
   \[u"tm_hour"\]=>
-  int\((3|0)\)
+  int\((4|0)\)
   \[u"tm_mday"\]=>
-  int\((19|11)\)
+  int\((26|11)\)
   \[u"tm_mon"\]=>
-  int\((0|2)\)
+  int\(2\)
   \[u"tm_year"\]=>
-  int\((138|3982)\)
+  int\((35|3982)\)
   \[u"tm_wday"\]=>
   int\((2|6)\)
   \[u"tm_yday"\]=>
-  int\((18|69)\)
+  int\((84|69)\)
   \[u"tm_isdst"\]=>
   int\(0\)
 }
@@ -75,41 +75,41 @@ array\(9\) {
 -- Testing localtime\(\) function with 'float -12.3456789000e10' to timestamp --
 array\(9\) {
   \[0\]=>
-  int\((52|0)\)
+  int\((44|52|0)\)
   \[1\]=>
-  int\((45|30)\)
+  int\((9|45|30)\)
   \[2\]=>
-  int\((20|23)\)
+  int\((19|20|23)\)
   \[3\]=>
-  int\((13|22)\)
+  int\((8|13|22)\)
   \[4\]=>
-  int\((11|9)\)
+  int\((9|11)\)
   \[5\]=>
-  int\((1|-3843)\)
+  int\((104|1|-3843)\)
   \[6\]=>
   int\((5|-5)\)
   \[7\]=>
-  int\((346|294)\)
+  int\((281|346|294)\)
   \[8\]=>
   int\(0\)
 }
 array\(9\) {
   \[u"tm_sec"\]=>
-  int\((52|0)\)
+  int\((44|52|0)\)
   \[u"tm_min"\]=>
-  int\((45|30)\)
+  int\((9|45|30)\)
   \[u"tm_hour"\]=>
-  int\((20|23)\)
+  int\((19|20|23)\)
   \[u"tm_mday"\]=>
-  int\((13|22)\)
+  int\((8|13|22)\)
   \[u"tm_mon"\]=>
-  int\((11|9)\)
+  int\((9|11)\)
   \[u"tm_year"\]=>
-  int\((1|-3843)\)
+  int\((104|1|-3843)\)
   \[u"tm_wday"\]=>
   int\((5|-5)\)
   \[u"tm_yday"\]=>
-  int\((346|294)\)
+  int\((281|346|294)\)
   \[u"tm_isdst"\]=>
   int\(0\)
 }
index e897160aa8a7822f76345da22998985e96496588..6d17abd7fe59f529a7d41ed45ace14957fcd8751 100644 (file)
@@ -29,8 +29,8 @@ var_dump( strftime($format, $timestamp) );
 \*\*\* Testing strftime\(\) : usage variation \*\*\*
 
 -- Testing strftime\(\) function with float 12.3456789000e10 to timestamp --
-unicode\(\d*\)\s"(Jan|Mar)\s(19|11)\s(2038|5882)\s(03|00):(14|30):(07|00)"
+unicode\(\d*\)\s"Mar\s(26|11)\s(1935|5882)\s(04|00):(50|30):(16|00)"
 
 -- Testing strftime\(\) function with float -12.3456789000e10 to timestamp --
-unicode\(\d*\)\s"(Dec|Oct)\s(13|22)\s(1901|-1943)\s(20|23):(45|30):(52|00)"
+unicode\(\d*\)\s"(Oct|Dec)\s(08|13|22)\s(2004|1901|-1943)\s(19|20|23):(09|45|30):(44|52|00)"
 ===DONE===
index fbd76277ae91d13f7cf8c255bb918f10f34cd3f4..53707090849aef3bf6233859d8b5ab874908a978 100644 (file)
@@ -33,16 +33,8 @@ array(1) {
   [0]=>
   string(9) "1 2 3 4 5"
 }
-array(5) {
+array(1) {
   [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "2"
-  [2]=>
-  string(1) "3"
-  [3]=>
-  string(1) "4"
-  [4]=>
-  string(1) "5"
+  string(9) "1 2 3 4 5"
 }
 Done
\ No newline at end of file
index 7a331be3672eb822744505bd306baed37b44a4da..e6c8e3c21f83bd9f0cfb161bb5d0bab7ec212f54 100644 (file)
@@ -33,16 +33,8 @@ array(1) {
   [0]=>
   string(9) "1 2 3 4 5"
 }
-array(5) {
+array(1) {
   [0]=>
-  string(1) "1"
-  [1]=>
-  string(1) "2"
-  [2]=>
-  string(1) "3"
-  [3]=>
-  string(1) "4"
-  [4]=>
-  string(1) "5"
+  string(9) "1 2 3 4 5"
 }
 Done
\ No newline at end of file
index acce9984551f37b0b3a5a7dacdf1d8c09d0e35d6..1345f3d1aa67b59798b1e164a239d70c00457543 100644 (file)
@@ -125,9 +125,9 @@ array(2) {
 }
 -- Iteration 3 --
 array(2) {
-  [2147483647]=>
+  [-1097262584]=>
   int(100)
-  [-2147483648]=>
+  [0]=>
   int(100)
 }
 -- Iteration 4 --
index d944c5b4c05fe95b0a5c2bfe70464ce34e5a5ed7..e5c84ea0b3a46b6398e33b4bf872ab4ba1ac3351 100644 (file)
@@ -150,7 +150,15 @@ array(4) {
 }
 
 -- Iteration 7 --
-array(0) {
+array(4) {
+  [u"one"]=>
+  int(1)
+  [0]=>
+  int(2)
+  [u"three"]=>
+  int(3)
+  [1]=>
+  int(4)
 }
 
 -- Iteration 8 --
index c2296c7de99502e49399e7daff6768cbbc1d0f94..135ca15e5388dad1ca658003cc0ea67fbcc6e793 100644 (file)
@@ -118,11 +118,7 @@ array(0) {
 }
 
 -- Iteration 7 --
-array(2) {
-  [u"three"]=>
-  int(3)
-  [0]=>
-  int(4)
+array(0) {
 }
 
 -- Iteration 8 --
index 8a02c34bf94a03aeb52858219e30fe5b5676e6d3..319af1fe0daf6b491fd2e5ba618e7ca99e72bfb2 100644 (file)
@@ -460,7 +460,7 @@ unicode(7) "integer"
 -- Iteration 51 --
 unicode(6) "double"
 bool(true)
-int(2147483647)
+int(-508130303)
 unicode(7) "integer"
 -- Iteration 52 --
 unicode(7) "integer"
@@ -470,7 +470,7 @@ unicode(7) "integer"
 -- Iteration 53 --
 unicode(6) "double"
 bool(true)
-int(2147483647)
+int(1952002105)
 unicode(7) "integer"
 -- Iteration 54 --
 unicode(7) "integer"
@@ -490,7 +490,7 @@ unicode(7) "integer"
 -- Iteration 57 --
 unicode(6) "double"
 bool(true)
-int(2147483647)
+int(343000682)
 unicode(7) "integer"
 -- Iteration 58 --
 unicode(6) "double"
@@ -920,7 +920,7 @@ unicode(7) "integer"
 -- Iteration 51 --
 unicode(6) "double"
 bool(true)
-int(2147483647)
+int(-508130303)
 unicode(7) "integer"
 -- Iteration 52 --
 unicode(7) "integer"
@@ -930,7 +930,7 @@ unicode(7) "integer"
 -- Iteration 53 --
 unicode(6) "double"
 bool(true)
-int(2147483647)
+int(1952002105)
 unicode(7) "integer"
 -- Iteration 54 --
 unicode(7) "integer"
@@ -950,7 +950,7 @@ unicode(7) "integer"
 -- Iteration 57 --
 unicode(6) "double"
 bool(true)
-int(2147483647)
+int(343000682)
 unicode(7) "integer"
 -- Iteration 58 --
 unicode(6) "double"
index d1e3f08e7908a5a3f93a79683e1010108f29768e..ba1192f6dbe0738429c9dd31856742325b9f9199 100644 (file)
@@ -110,7 +110,7 @@ unicode(32) "11111111111111111111011011010111"
 unicode(32) "11111111111111111111111111111111"
 
 -- Iteration 6 --
-unicode(31) "1111111111111111111111111111111"
+unicode(1) "0"
 
 -- Iteration 7 --
 unicode(4) "1010"
@@ -119,7 +119,7 @@ unicode(4) "1010"
 unicode(32) "11111111111111111111111111110110"
 
 -- Iteration 9 --
-unicode(31) "1111111111111111111111111111111"
+unicode(32) "10111110100110010001101000001000"
 
 -- Iteration 10 --
 unicode(1) "0"
index 09a96d1d9c0463c7dde9ec28222c653e909f614a..5811fca598c8d005c85db964d7ac1922526dd123 100644 (file)
@@ -110,7 +110,7 @@ unicode(64) "1111111111111111111111111111111111111111111111111111011011010111"
 unicode(63) "111111111111111111111111111111111111111111111111111111111111111"
 
 -- Iteration 6 --
-unicode(63) "111111111111111111111111111111111111111111111111111111111111111"
+unicode(1) "0"
 
 -- Iteration 7 --
 unicode(4) "1010"
index 54080b0bf2780c95a02de90ec68ee473a52cdc5b..79b90d3a0dada05557f975e28e2e29779a195279 100644 (file)
@@ -110,7 +110,7 @@ unicode(8) "fffff6d7"
 unicode(8) "ffffffff"
 
 -- Iteration 6 --
-unicode(8) "7fffffff"
+unicode(1) "0"
 
 -- Iteration 7 --
 unicode(1) "a"
@@ -119,7 +119,7 @@ unicode(1) "a"
 unicode(8) "fffffff6"
 
 -- Iteration 9 --
-unicode(8) "7fffffff"
+unicode(8) "be991a08"
 
 -- Iteration 10 --
 unicode(1) "0"
index 929e759f588d9bd795c3f8ab3f71f42e2b77c24c..0b2303dfd8e4c042db08dfb2a93271c6ea091742 100644 (file)
@@ -110,7 +110,7 @@ unicode(16) "fffffffffffff6d7"
 unicode(16) "7fffffffffffffff"
 
 -- Iteration 6 --
-unicode(16) "7fffffffffffffff"
+unicode(1) "0"
 
 -- Iteration 7 --
 unicode(1) "a"
index 69982da2909f7de5176570d5dfbefb6c3ef4ade9..e37a2b701a8be39b712421b53104449b2e07ead6 100644 (file)
@@ -111,7 +111,7 @@ unicode(11) "37777773327"
 unicode(11) "37777777777"
 
 -- Iteration 6 --
-unicode(11) "17777777777"
+unicode(1) "0"
 
 -- Iteration 7 --
 unicode(2) "12"
@@ -120,7 +120,7 @@ unicode(2) "12"
 unicode(11) "37777777766"
 
 -- Iteration 9 --
-unicode(11) "17777777777"
+unicode(11) "27646215010"
 
 -- Iteration 10 --
 unicode(1) "0"
index 40eca6c9bf213ecb3a8c3ef90985f2df3894c864..d51540da09938a3f2bcfed503ece11753d807034 100644 (file)
@@ -111,7 +111,7 @@ unicode(22) "1777777777777777773327"
 unicode(21) "777777777777777777777"
 
 -- Iteration 6 --
-unicode(21) "777777777777777777777"
+unicode(1) "0"
 
 -- Iteration 7 --
 unicode(2) "12"
index 005e4df86d497b20efe90fa3689f7414d4ae615a..4ceb4ea4f0e7441f3b3df9081484483f86ad6caa 100644 (file)
@@ -98,7 +98,9 @@ unicode(28) "This is ch*uklen vari*ation*"
 Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 3 --
-unicode(26) "This is chuklen variation*"
+
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
+bool(false)
 -- Iteration 4 --
 
 Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
index 25a2cbf07330087e8f8545d6f4704d94baded700..a7dce08aa0898ab9599b7b95a1f99b76c6938107 100644 (file)
@@ -102,7 +102,7 @@ unicode(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000
 unicode(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
 
 -- Iteration 3 --
-unicode(94) "<html>Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
+unicode(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
 
 -- Iteration 4 --
 unicode(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
index 886519945f281891a7a0e36794da7d2b93943b4f..97a6a687c56ee71fd22104c758675b3f21346648 100644 (file)
@@ -145,11 +145,11 @@ Array
 )
 Array
 (
-    [1] => 2147483647
+    [1] => 0
 )
 Array
 (
-    [1] => -2147483648
+    [1] => 0
 )
 Array
 (
@@ -185,7 +185,7 @@ Array
 )
 Array
 (
-    [1] => 2147483647
+    [1] => 0
 )
 Array
 (
@@ -233,7 +233,7 @@ Array
 )
 Array
 (
-    [1] => 2147483647
+    [1] => 0
 )
 Array
 (
@@ -305,7 +305,7 @@ Array
 )
 Array
 (
-    [1] => 2147483647
+    [1] => 0
 )
 Array
 (
index abf2b067a16dc2a3762db0a4e6660507964d8e42..bb5508282e4af0fb42928b9d71271601d6241994 100644 (file)
@@ -67,17 +67,17 @@ unicode(10) "0-9A-Fa-f]"
 unicode(1) "x"
 
 -- Iteration 2 --
-unicode(8) "7fffffff"
-unicode(9) "7fffffffx"
-unicode(8) "7fffffff"
+unicode(1) "1"
+unicode(2) "1x"
+unicode(1) "1"
 unicode(1) "x"
-unicode(9) " 7fffffff"
-unicode(9) "7fffffff "
-unicode(9) "   7fffffff"
-unicode(9) "
-7fffffff"
-unicode(8) "7fffffff"
-unicode(30) "                      7fffffff"
+unicode(2) " 1"
+unicode(2) "1 "
+unicode(2) "   1"
+unicode(2) "
+1"
+unicode(4) "   1"
+unicode(30) "                             1"
 unicode(10) "0-9A-Fa-f]"
 unicode(1) "x"
 
index dbfdb9f3188d0baa518c1ddd371ebca08fa44441..467ef60154aea4646bbc5d01ad236e936e0c08e8 100644 (file)
@@ -67,17 +67,17 @@ unicode(4) "0-9]"
 unicode(1) "d"
 
 -- Iteration 2 --
-unicode(10) "2147483647"
+unicode(1) "1"
 unicode(1) "d"
-unicode(10) "2147483647"
+unicode(1) "1"
 unicode(1) "d"
-unicode(11) " 2147483647"
-unicode(11) "2147483647 "
-unicode(11) "  2147483647"
-unicode(11) "
-2147483647"
-unicode(10) "2147483647"
-unicode(30) "                    2147483647"
+unicode(2) " 1"
+unicode(2) "1 "
+unicode(2) "   1"
+unicode(2) "
+1"
+unicode(4) "   1"
+unicode(30) "                             1"
 unicode(4) "0-9]"
 unicode(1) "d"
 
index 62ca7dcc83806f2979b7a88409460d5a6cd70949..ee1cb13728136654d7a859a465de782726a63624 100644 (file)
@@ -71,17 +71,17 @@ unicode(4) "0-9]"
 unicode(1) "u"
 
 -- Iteration 2 --
-unicode(10) "2147483647"
+unicode(1) "1"
 unicode(1) "u"
-unicode(10) "2147483647"
+unicode(1) "1"
 unicode(1) "u"
-unicode(11) " 2147483647"
-unicode(11) "2147483647 "
-unicode(11) "  2147483647"
-unicode(11) "
-2147483647"
-unicode(10) "2147483647"
-unicode(30) "                    2147483647"
+unicode(2) " 1"
+unicode(2) "1 "
+unicode(2) "   1"
+unicode(2) "
+1"
+unicode(4) "   1"
+unicode(30) "                             1"
 unicode(4) "0-9]"
 unicode(1) "u"
 
index a4046951ddd55ae8a1561c3aa6cdade6d1c98d38..95667b5a81895c322658b4e168dece309d9a047f 100644 (file)
@@ -65,9 +65,9 @@ unlink($data_file);
 -- Iteration 1 --
 1234567 342391 0
 -- Iteration 2 --
-2147483647 u 1234 12345
+3755744308 u 1234 12345
 -- Iteration 3 --
-   1234000 2147483647 120
+   1234000 2450319192 120
 -- Iteration 4 --
 #1 0 $0 10
 -- Iteration 5 --
index 8be18ce5a940ef86f6e75ea99321bba10c96d715..21630521b8dc1ddd2bd64c8bf10c40136b9800b6 100644 (file)
@@ -87,8 +87,8 @@ unlink($data_file);
 
 -- Iteration 1 --
 2 0 10 
-   123456 u 1234 2147483647
-   2147483647 2147483647 12345 
+   123456 u 1234 2820130816
+   2840207360 1177509888 12345 
    12 4294967284 4294843840 _3
    10 123456 2 0
 -- Iteration 2 --
index bdef534639a34e0a2088533cc66b9c698f1d3983..72ca9fe3b9f0a37817a2ab319b1ea26cc9f21222 100644 (file)
@@ -89,7 +89,7 @@ unlink($data_file);
 -- Iteration 1 --
 2 +0 10 
    123456 d -1234 1234
-   2147483647 200000     4000 22000000
+   -1474836480 200000     4000 22000000
    12345 12 -12 -123456
    10 123456 2 0
 -- Iteration 2 --
index a812ff6b8f01ef824c7f09246da5998330df8a1f..97b1bc5c6429334698696038cd8cb1cfb24be4ca 100644 (file)
@@ -58,11 +58,11 @@ foreach($formats as $format) {
 int(16)
 
 -- Iteration 2 --
-2147483647 u 1234 12345
+3755744308 u 1234 12345
 int(23)
 
 -- Iteration 3 --
-   1234000 2147483647 120
+   1234000 2450319192 120
 int(25)
 
 -- Iteration 4 --
index 666865c7c6ad71e7c5096371ec9f615632afd1a8..226f17572b5ce9ad13f070abe153c612e44d7348 100644 (file)
@@ -62,8 +62,8 @@ int(16)
 int(24)
 
 -- Iteration 3 --
-   1234000 9223372036854775807 120
-int(34)
+   1234000 0          120
+int(25)
 
 -- Iteration 4 --
 #1 0 $0 10
index 3bf2c579cdfd003f99599261bcbf327cece5728b..8c3d66d02d0f4da7ea3ac1147cc7c0e881ce62e9 100644 (file)
@@ -77,8 +77,8 @@ foreach($args_array as $args) {
 
 -- Iteration 1 --
 2 0 10 
-   123456 u 1234 2147483647
-   2147483647 2147483647 12345 
+   123456 u 1234 2820130816
+   2840207360 1177509888 12345 
    12 4294967284 4294843840 _3
    10 123456 2 0
 int(115)
index 8a37c79dce9a532a6e22785c365a88a7151a0f4b..8d56fc9cb176d759712a91e84b37dd22d8828441 100644 (file)
@@ -79,10 +79,10 @@ foreach($args_array as $args) {
 -- Iteration 1 --
 2 +0 10 
    123456 d -1234 1234
-   2147483647 200000     4000 22000000
+   -1474836480 200000     4000 22000000
    12345 12 -12 -123456
    10 123456 2 0
-int(111)
+int(112)
 
 -- Iteration 2 --
 0 +0 0 
index 8252c2628d0b0959f1c11940298701a4d7eaf46b..f43ff3fd933c9b3b1074b8e4d2aeddcf1a68d2d5 100644 (file)
@@ -55,7 +55,7 @@ foreach($formats as $format) {
 unicode(16) "1234567 342391 0"
 
 -- Iteration 2 --
-unicode(23) "2147483647 u 1234 12345"
+unicode(23) "3755744308 u 1234 12345"
 
 -- Iteration 3 --
 unicode(25) "   1234000 1012345    120"
index 9a5e62defb6dbdd12d02e295b57092ebacb5e3e5..58a6a8f35d2ef07ee682785d108ca1f46a487af6 100644 (file)
@@ -58,7 +58,7 @@ unicode(16) "1234567 342391 0"
 unicode(24) "12345678900 u 1234 12345"
 
 -- Iteration 3 --
-unicode(34) "   1234000 9223372036854775807 120"
+unicode(25) "   1234000 0          120"
 
 -- Iteration 4 --
 unicode(10) "#1 0 $0 10"
index 74bbfb53ca6da9d90e95768956a69948c84400a4..62153b82409c351dd6b0ddb08b08c1badcb0c2e4 100644 (file)
@@ -76,8 +76,8 @@ echo "Done";
 
 -- Iteration 1 --
 unicode(115) "2 0 10 
-   123456 u 1234 2147483647
-   2147483647 2147483647 12345 
+   123456 u 1234 2820130816
+   2840207360 1177509888 12345 
    12 4294967284 4294843840 _3
    10 123456 2 0"
 
index 9bbbc139583926630da17498d276cafd1dca396e..1ac73f640d23a8f8279bdd62600253fd8d61d73a 100644 (file)
@@ -75,9 +75,9 @@ echo "Done";
 *** Testing vsprintf() : int formats and non-integer values ***
 
 -- Iteration 1 --
-unicode(111) "2 +0 10 
+unicode(112) "2 +0 10 
    123456 d -1234 1234
-   2147483647 200000     4000 22000000
+   -1474836480 200000     4000 22000000
    12345 12 -12 -123456
    10 123456 2 0"
 
diff --git a/ext/standard/tests/url/parse_url_variation_002_32bit.phpt b/ext/standard/tests/url/parse_url_variation_002_32bit.phpt
new file mode 100644 (file)
index 0000000..cefbb07
--- /dev/null
@@ -0,0 +1,205 @@
+--TEST--
+Test parse_url() function : usage variations  - unexpected type for arg 2
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); ?>
+--FILE--
+<?php
+/* Prototype  : proto mixed parse_url(string url, [int url_component])
+ * Description: Parse a URL and return its components 
+ * Source code: ext/standard/url.c
+ * Alias to functions: 
+ */
+
+function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+       echo "Error: $err_no - $err_msg, $filename($linenum)\n";
+}
+set_error_handler('test_error_handler');
+
+echo "*** Testing parse_url() : usage variations ***\n";
+
+// Initialise function arguments not being substituted (if any)
+$url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123';
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//array of values to iterate over
+$values = array(
+
+      // float data
+      10.5,
+      -10.5,
+      10.1234567e10,
+      10.7654321E-10,
+      .5,
+
+      // array data
+      array(),
+      array(0),
+      array(1),
+      array(1, 2),
+      array('color' => 'red', 'item' => 'pen'),
+
+      // null data
+      NULL,
+      null,
+
+      // boolean data
+      true,
+      false,
+      TRUE,
+      FALSE,
+
+      // empty data
+      "",
+      '',
+
+      // string data
+      "string",
+      'string',
+
+      // object data
+      new stdclass(),
+
+      // undefined data
+      $undefined_var,
+
+      // unset data
+      $unset_var,
+);
+
+// loop through each element of the array for url_component
+
+foreach($values as $value) {
+      echo "\nArg value $value \n";
+      var_dump( parse_url($url, $value) );
+};
+
+echo "Done";
+?>
+--EXPECTF--
+*** Testing parse_url() : usage variations ***
+Error: 8 - Undefined variable: undefined_var, %s(61)
+Error: 8 - Undefined variable: unset_var, %s(64)
+
+Arg value 10.5 
+Error: 2 - parse_url(): Invalid URL component identifier 10, %s(71)
+bool(false)
+
+Arg value -10.5 
+array(8) {
+  [u"scheme"]=>
+  unicode(4) "http"
+  [u"host"]=>
+  unicode(11) "www.php.net"
+  [u"port"]=>
+  int(80)
+  [u"user"]=>
+  unicode(6) "secret"
+  [u"pass"]=>
+  unicode(7) "hideout"
+  [u"path"]=>
+  unicode(10) "/index.php"
+  [u"query"]=>
+  unicode(31) "test=1&test2=char&test3=mixesCI"
+  [u"fragment"]=>
+  unicode(16) "some_page_ref123"
+}
+
+Arg value 101234567000 
+array(8) {
+  [u"scheme"]=>
+  unicode(4) "http"
+  [u"host"]=>
+  unicode(11) "www.php.net"
+  [u"port"]=>
+  int(80)
+  [u"user"]=>
+  unicode(6) "secret"
+  [u"pass"]=>
+  unicode(7) "hideout"
+  [u"path"]=>
+  unicode(10) "/index.php"
+  [u"query"]=>
+  unicode(31) "test=1&test2=char&test3=mixesCI"
+  [u"fragment"]=>
+  unicode(16) "some_page_ref123"
+}
+
+Arg value 1.07654321E-9 
+unicode(4) "http"
+
+Arg value 0.5 
+unicode(4) "http"
+Error: 8 - Array to string conversion, %s(70)
+
+Arg value Array 
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+Error: 8 - Array to string conversion, %s(70)
+
+Arg value Array 
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+Error: 8 - Array to string conversion, %s(70)
+
+Arg value Array 
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+Error: 8 - Array to string conversion, %s(70)
+
+Arg value Array 
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+Error: 8 - Array to string conversion, %s(70)
+
+Arg value Array 
+Error: 2 - parse_url() expects parameter 2 to be long, array given, %s(71)
+NULL
+
+Arg value  
+unicode(4) "http"
+
+Arg value  
+unicode(4) "http"
+
+Arg value 1 
+unicode(11) "www.php.net"
+
+Arg value  
+unicode(4) "http"
+
+Arg value 1 
+unicode(11) "www.php.net"
+
+Arg value  
+unicode(4) "http"
+
+Arg value  
+Error: 2 - parse_url() expects parameter 2 to be long, Unicode string given, %s(71)
+NULL
+
+Arg value  
+Error: 2 - parse_url() expects parameter 2 to be long, Unicode string given, %s(71)
+NULL
+
+Arg value string 
+Error: 2 - parse_url() expects parameter 2 to be long, Unicode string given, %s(71)
+NULL
+
+Arg value string 
+Error: 2 - parse_url() expects parameter 2 to be long, Unicode string given, %s(71)
+NULL
+Error: 4096 - Object of class stdClass could not be converted to string, %s(70)
+
+Arg value  
+Error: 2 - parse_url() expects parameter 2 to be long, object given, %s(71)
+NULL
+
+Arg value  
+unicode(4) "http"
+
+Arg value  
+unicode(4) "http"
+Done
similarity index 97%
rename from ext/standard/tests/url/parse_url_variation_002.phpt
rename to ext/standard/tests/url/parse_url_variation_002_64bit.phpt
index e0fea912c3c29dc923d28d24b9e2e9fb88b4853a..751299d9eab1bb95baa9783e701bbc2127ce1bd6 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Test parse_url() function : usage variations  - unexpected type for arg 2
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
 --FILE--
 <?php
 /* Prototype  : proto mixed parse_url(string url, [int url_component])