| ofs | hex dump | ascii |
|---|
| 0000 | 2d 2d 54 45 53 54 2d 2d 0a 54 65 73 74 20 63 68 75 6e 6b 5f 73 70 6c 69 74 28 29 20 66 75 6e 63 | --TEST--.Test.chunk_split().func |
| 0020 | 74 69 6f 6e 20 3a 20 75 73 61 67 65 20 76 61 72 69 61 74 69 6f 6e 73 20 2d 20 64 69 66 66 65 72 | tion.:.usage.variations.-.differ |
| 0040 | 65 6e 74 20 69 6e 74 65 67 65 72 20 76 61 6c 75 65 73 20 66 6f 72 20 27 63 68 75 6e 6b 6c 65 6e | ent.integer.values.for.'chunklen |
| 0060 | 27 20 61 72 67 75 6d 65 6e 74 28 42 75 67 23 34 32 37 39 36 29 0a 2d 2d 53 4b 49 50 49 46 2d 2d | '.argument(Bug#42796).--SKIPIF-- |
| 0080 | 0a 3c 3f 70 68 70 0a 69 66 20 28 50 48 50 5f 49 4e 54 5f 53 49 5a 45 20 21 3d 20 38 29 20 64 69 | .<?php.if.(PHP_INT_SIZE.!=.8).di |
| 00a0 | 65 28 22 73 6b 69 70 20 74 68 69 73 20 74 65 73 74 20 69 73 20 66 6f 72 20 36 34 62 69 74 20 70 | e("skip.this.test.is.for.64bit.p |
| 00c0 | 6c 61 74 66 6f 72 6d 20 6f 6e 6c 79 22 29 3b 0a 3f 3e 0a 2d 2d 46 49 4c 45 2d 2d 0a 3c 3f 70 68 | latform.only");.?>.--FILE--.<?ph |
| 00e0 | 70 0a 2f 2a 20 50 72 6f 74 6f 74 79 70 65 20 20 3a 20 73 74 72 69 6e 67 20 63 68 75 6e 6b 5f 73 | p./*.Prototype..:.string.chunk_s |
| 0100 | 70 6c 69 74 28 73 74 72 69 6e 67 20 24 73 74 72 20 5b 2c 20 69 6e 74 20 24 63 68 75 6e 6b 6c 65 | plit(string.$str.[,.int.$chunkle |
| 0120 | 6e 20 5b 2c 20 73 74 72 69 6e 67 20 24 65 6e 64 69 6e 67 5d 5d 29 0a 20 2a 20 44 65 73 63 72 69 | n.[,.string.$ending]])..*.Descri |
| 0140 | 70 74 69 6f 6e 3a 20 52 65 74 75 72 6e 73 20 73 70 6c 69 74 20 6c 69 6e 65 0a 20 2a 20 53 6f 75 | ption:.Returns.split.line..*.Sou |
| 0160 | 72 63 65 20 63 6f 64 65 3a 20 65 78 74 2f 73 74 61 6e 64 61 72 64 2f 73 74 72 69 6e 67 2e 63 0a | rce.code:.ext/standard/string.c. |
| 0180 | 20 2a 20 41 6c 69 61 73 20 74 6f 20 66 75 6e 63 74 69 6f 6e 73 3a 20 6e 6f 6e 65 0a 2a 2f 0a 0a | .*.Alias.to.functions:.none.*/.. |
| 01a0 | 2f 2a 0a 2a 20 70 61 73 73 73 69 6e 67 20 64 69 66 66 65 72 65 6e 74 20 69 6e 74 65 67 65 72 20 | /*.*.passsing.different.integer. |
| 01c0 | 76 61 6c 75 65 73 20 66 6f 72 20 27 63 68 75 6e 6b 6c 65 6e 27 20 61 72 67 75 6d 65 6e 74 20 74 | values.for.'chunklen'.argument.t |
| 01e0 | 6f 20 63 68 75 6e 6b 5f 73 70 6c 69 74 28 29 0a 2a 20 27 65 6e 64 69 6e 67 27 20 69 73 20 73 65 | o.chunk_split().*.'ending'.is.se |
| 0200 | 74 20 74 6f 20 27 7c 7c 27 0a 2a 2f 0a 0a 65 63 68 6f 20 22 2a 2a 2a 20 54 65 73 74 69 6e 67 20 | t.to.'||'.*/..echo."***.Testing. |
| 0220 | 63 68 75 6e 6b 5f 73 70 6c 69 74 28 29 20 3a 20 64 69 66 66 65 72 65 6e 74 20 69 6e 74 65 67 65 | chunk_split().:.different.intege |
| 0240 | 72 20 76 61 6c 75 65 73 20 66 6f 72 20 27 63 68 75 6e 6b 6c 65 6e 27 20 2a 2a 2a 5c 6e 22 3b 0a | r.values.for.'chunklen'.***\n";. |
| 0260 | 0a 20 2f 2f 49 6e 69 74 69 61 6c 69 7a 69 6e 67 20 76 61 72 69 61 62 6c 65 73 0a 24 65 6e 64 69 | ..//Initializing.variables.$endi |
| 0280 | 6e 67 20 3d 20 22 7c 7c 22 3b 0a 24 73 74 72 20 3d 20 22 54 68 69 73 20 63 6f 6e 74 61 69 6e 73 | ng.=."||";.$str.=."This.contains |
| 02a0 | 5c 74 61 6e 64 20 73 70 65 63 69 61 6c 20 63 68 61 72 20 26 20 6e 75 6d 62 65 72 73 20 31 32 33 | \tand.special.char.&.numbers.123 |
| 02c0 | 2e 5c 6e 49 74 20 61 6c 73 6f 20 63 68 65 63 6b 73 20 66 6f 72 20 5c 30 20 63 68 61 72 22 3b 0a | .\nIt.also.checks.for.\0.char";. |
| 02e0 | 0a 2f 2f 20 64 69 66 66 65 72 65 6e 74 20 76 61 6c 75 65 73 20 66 6f 72 20 63 68 75 6e 6b 6c 65 | .//.different.values.for.chunkle |
| 0300 | 6e 0a 24 76 61 6c 75 65 73 20 3d 20 61 72 72 61 79 20 28 0a 20 20 30 2c 0a 20 20 31 2c 0a 20 20 | n.$values.=.array.(...0,...1,... |
| 0320 | 2d 31 32 33 2c 20 20 2f 2f 6e 65 67 61 74 69 76 65 20 69 6e 74 65 67 65 72 0a 20 20 30 32 33 34 | -123,..//negative.integer...0234 |
| 0340 | 2c 20 20 2f 2f 6f 63 74 61 6c 20 6e 75 6d 62 65 72 0a 20 20 30 78 31 41 2c 20 20 2f 2f 68 65 78 | ,..//octal.number...0x1A,..//hex |
| 0360 | 61 64 65 63 69 6d 61 6c 20 6e 75 6d 62 65 72 0a 20 20 50 48 50 5f 49 4e 54 5f 4d 41 58 2c 20 20 | adecimal.number...PHP_INT_MAX,.. |
| 0380 | 2f 2f 6d 61 78 20 70 6f 73 69 74 69 76 65 20 69 6e 74 65 67 65 72 20 6e 75 6d 62 65 72 0a 20 20 | //max.positive.integer.number... |
| 03a0 | 50 48 50 5f 49 4e 54 5f 4d 41 58 20 2a 20 33 2c 20 20 2f 2f 69 6e 74 65 67 65 72 20 6f 76 65 72 | PHP_INT_MAX.*.3,..//integer.over |
| 03c0 | 66 6c 6f 77 0a 20 20 2d 50 48 50 5f 49 4e 54 5f 4d 41 58 20 2d 20 31 2c 20 20 2f 2f 6d 69 6e 20 | flow...-PHP_INT_MAX.-.1,..//min. |
| 03e0 | 6e 65 67 61 74 69 76 65 20 69 6e 74 65 67 65 72 0a 0a 29 3b 0a 0a 66 6f 72 28 24 63 6f 75 6e 74 | negative.integer..);..for($count |
| 0400 | 20 3d 20 30 3b 20 24 63 6f 75 6e 74 20 3c 20 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 3b 20 24 | .=.0;.$count.<.count($values);.$ |
| 0420 | 63 6f 75 6e 74 2b 2b 29 20 7b 0a 20 20 65 63 68 6f 20 22 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 | count++).{...echo."--.Iteration. |
| 0440 | 24 63 6f 75 6e 74 20 2d 2d 5c 6e 22 3b 0a 20 20 74 72 79 20 7b 0a 20 20 20 20 76 61 72 5f 64 75 | $count.--\n";...try.{.....var_du |
| 0460 | 6d 70 28 20 63 68 75 6e 6b 5f 73 70 6c 69 74 28 24 73 74 72 2c 20 24 76 61 6c 75 65 73 5b 24 63 | mp(.chunk_split($str,.$values[$c |
| 0480 | 6f 75 6e 74 5d 2c 20 24 65 6e 64 69 6e 67 29 20 29 3b 0a 20 20 7d 20 63 61 74 63 68 20 28 54 79 | ount],.$ending).);...}.catch.(Ty |
| 04a0 | 70 65 45 72 72 6f 72 20 24 65 29 20 7b 0a 20 20 20 20 65 63 68 6f 20 24 65 2d 3e 67 65 74 4d 65 | peError.$e).{.....echo.$e->getMe |
| 04c0 | 73 73 61 67 65 28 29 2c 20 22 5c 6e 22 3b 0a 20 20 7d 0a 7d 0a 0a 65 63 68 6f 20 22 44 6f 6e 65 | ssage(),."\n";...}.}..echo."Done |
| 04e0 | 22 0a 3f 3e 0a 2d 2d 45 58 50 45 43 54 46 2d 2d 0a 2a 2a 2a 20 54 65 73 74 69 6e 67 20 63 68 75 | ".?>.--EXPECTF--.***.Testing.chu |
| 0500 | 6e 6b 5f 73 70 6c 69 74 28 29 20 3a 20 64 69 66 66 65 72 65 6e 74 20 69 6e 74 65 67 65 72 20 76 | nk_split().:.different.integer.v |
| 0520 | 61 6c 75 65 73 20 66 6f 72 20 27 63 68 75 6e 6b 6c 65 6e 27 20 2a 2a 2a 0a 2d 2d 20 49 74 65 72 | alues.for.'chunklen'.***.--.Iter |
| 0540 | 61 74 69 6f 6e 20 30 20 2d 2d 0a 0a 57 61 72 6e 69 6e 67 3a 20 63 68 75 6e 6b 5f 73 70 6c 69 74 | ation.0.--..Warning:.chunk_split |
| 0560 | 28 29 3a 20 43 68 75 6e 6b 20 6c 65 6e 67 74 68 20 73 68 6f 75 6c 64 20 62 65 20 67 72 65 61 74 | ():.Chunk.length.should.be.great |
| 0580 | 65 72 20 74 68 61 6e 20 7a 65 72 6f 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a 62 6f | er.than.zero.in.%s.on.line.%d.bo |
| 05a0 | 6f 6c 28 66 61 6c 73 65 29 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 31 20 2d 2d 0a 73 74 72 69 | ol(false).--.Iteration.1.--.stri |
| 05c0 | 6e 67 28 32 31 33 29 20 22 54 7c 7c 68 7c 7c 69 7c 7c 73 7c 7c 20 7c 7c 63 7c 7c 6f 7c 7c 6e 7c | ng(213)."T||h||i||s||.||c||o||n| |
| 05e0 | 7c 74 7c 7c 61 7c 7c 69 7c 7c 6e 7c 7c 73 7c 7c 09 7c 7c 61 7c 7c 6e 7c 7c 64 7c 7c 20 7c 7c 73 | |t||a||i||n||s||.||a||n||d||.||s |
| 0600 | 7c 7c 70 7c 7c 65 7c 7c 63 7c 7c 69 7c 7c 61 7c 7c 6c 7c 7c 20 7c 7c 63 7c 7c 68 7c 7c 61 7c 7c | ||p||e||c||i||a||l||.||c||h||a|| |
| 0620 | 72 7c 7c 20 7c 7c 26 7c 7c 20 7c 7c 6e 7c 7c 75 7c 7c 6d 7c 7c 62 7c 7c 65 7c 7c 72 7c 7c 73 7c | r||.||&||.||n||u||m||b||e||r||s| |
| 0640 | 7c 20 7c 7c 31 7c 7c 32 7c 7c 33 7c 7c 2e 7c 7c 0a 7c 7c 49 7c 7c 74 7c 7c 20 7c 7c 61 7c 7c 6c | |.||1||2||3||.||.||I||t||.||a||l |
| 0660 | 7c 7c 73 7c 7c 6f 7c 7c 20 7c 7c 63 7c 7c 68 7c 7c 65 7c 7c 63 7c 7c 6b 7c 7c 73 7c 7c 20 7c 7c | ||s||o||.||c||h||e||c||k||s||.|| |
| 0680 | 66 7c 7c 6f 7c 7c 72 7c 7c 20 7c 7c 00 7c 7c 20 7c 7c 63 7c 7c 68 7c 7c 61 7c 7c 72 7c 7c 22 0a | f||o||r||.||.||.||c||h||a||r||". |
| 06a0 | 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 32 20 2d 2d 0a 0a 57 61 72 6e 69 6e 67 3a 20 63 68 75 6e | --.Iteration.2.--..Warning:.chun |
| 06c0 | 6b 5f 73 70 6c 69 74 28 29 3a 20 43 68 75 6e 6b 20 6c 65 6e 67 74 68 20 73 68 6f 75 6c 64 20 62 | k_split():.Chunk.length.should.b |
| 06e0 | 65 20 67 72 65 61 74 65 72 20 74 68 61 6e 20 7a 65 72 6f 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e | e.greater.than.zero.in.%s.on.lin |
| 0700 | 65 20 25 64 0a 62 6f 6f 6c 28 66 61 6c 73 65 29 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 33 20 | e.%d.bool(false).--.Iteration.3. |
| 0720 | 2d 2d 0a 73 74 72 69 6e 67 28 37 33 29 20 22 54 68 69 73 20 63 6f 6e 74 61 69 6e 73 09 61 6e 64 | --.string(73)."This.contains.and |
| 0740 | 20 73 70 65 63 69 61 6c 20 63 68 61 72 20 26 20 6e 75 6d 62 65 72 73 20 31 32 33 2e 0a 49 74 20 | .special.char.&.numbers.123..It. |
| 0760 | 61 6c 73 6f 20 63 68 65 63 6b 73 20 66 6f 72 20 00 20 63 68 61 72 7c 7c 22 0a 2d 2d 20 49 74 65 | also.checks.for...char||".--.Ite |
| 0780 | 72 61 74 69 6f 6e 20 34 20 2d 2d 0a 73 74 72 69 6e 67 28 37 37 29 20 22 54 68 69 73 20 63 6f 6e | ration.4.--.string(77)."This.con |
| 07a0 | 74 61 69 6e 73 09 61 6e 64 20 73 70 65 63 69 61 6c 20 7c 7c 63 68 61 72 20 26 20 6e 75 6d 62 65 | tains.and.special.||char.&.numbe |
| 07c0 | 72 73 20 31 32 33 2e 0a 49 74 20 61 6c 73 7c 7c 6f 20 63 68 65 63 6b 73 20 66 6f 72 20 00 20 63 | rs.123..It.als||o.checks.for...c |
| 07e0 | 68 61 72 7c 7c 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 35 20 2d 2d 0a 73 74 72 69 6e 67 28 | har||".--.Iteration.5.--.string( |
| 0800 | 37 33 29 20 22 54 68 69 73 20 63 6f 6e 74 61 69 6e 73 09 61 6e 64 20 73 70 65 63 69 61 6c 20 63 | 73)."This.contains.and.special.c |
| 0820 | 68 61 72 20 26 20 6e 75 6d 62 65 72 73 20 31 32 33 2e 0a 49 74 20 61 6c 73 6f 20 63 68 65 63 6b | har.&.numbers.123..It.also.check |
| 0840 | 73 20 66 6f 72 20 00 20 63 68 61 72 7c 7c 22 0a 2d 2d 20 49 74 65 72 61 74 69 6f 6e 20 36 20 2d | s.for...char||".--.Iteration.6.- |
| 0860 | 2d 0a 63 68 75 6e 6b 5f 73 70 6c 69 74 28 29 20 65 78 70 65 63 74 73 20 70 61 72 61 6d 65 74 65 | -.chunk_split().expects.paramete |
| 0880 | 72 20 32 20 74 6f 20 62 65 20 69 6e 74 2c 20 66 6c 6f 61 74 20 67 69 76 65 6e 0a 2d 2d 20 49 74 | r.2.to.be.int,.float.given.--.It |
| 08a0 | 65 72 61 74 69 6f 6e 20 37 20 2d 2d 0a 0a 57 61 72 6e 69 6e 67 3a 20 63 68 75 6e 6b 5f 73 70 6c | eration.7.--..Warning:.chunk_spl |
| 08c0 | 69 74 28 29 3a 20 43 68 75 6e 6b 20 6c 65 6e 67 74 68 20 73 68 6f 75 6c 64 20 62 65 20 67 72 65 | it():.Chunk.length.should.be.gre |
| 08e0 | 61 74 65 72 20 74 68 61 6e 20 7a 65 72 6f 20 69 6e 20 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 0a | ater.than.zero.in.%s.on.line.%d. |
| 0900 | 62 6f 6f 6c 28 66 61 6c 73 65 29 0a 44 6f 6e 65 0a | bool(false).Done. |