Skip to content

Commit 78aa9e4

Browse files
committed
Fix #79597: Error in openssl-random-pseudo-bytes Example #1
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349902 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 6683589 commit 78aa9e4

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

reference/openssl/functions/openssl-random-pseudo-bytes.xml

+1-9
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<programlisting role="php">
6767
<![CDATA[
6868
<?php
69-
for ($i = -1; $i <= 4; $i++) {
69+
for ($i = 1; $i <= 4; $i++) {
7070
$bytes = openssl_random_pseudo_bytes($i, $cstrong);
7171
$hex = bin2hex($bytes);
7272
@@ -81,14 +81,6 @@ for ($i = -1; $i <= 4; $i++) {
8181
&example.outputs.similar;
8282
<screen>
8383
<![CDATA[
84-
Lengths: Bytes: -1 and Hex: 0
85-
string(0) ""
86-
NULL
87-
88-
Lengths: Bytes: 0 and Hex: 0
89-
string(0) ""
90-
NULL
91-
9284
Lengths: Bytes: 1 and Hex: 2
9385
string(2) "42"
9486
bool(true)

0 commit comments

Comments
 (0)