Skip to content

Commit fc801be

Browse files
flaviohelenonikic
authored andcommitted
Fix Zend Strings example
1 parent 290b1a1 commit fc801be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Book/php7/internal_types/strings/zend_strings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The most fundamental string creation function on which all others are based is `
9090
ZSTR_VAL(str)[i] = 'a';
9191
}
9292
// Don't forget to null-terminate!
93-
ZSTR_LEN(str)[len] = '\0';
93+
ZSTR_VAL(str)[len] = '\0';
9494

9595
This function allocates a string of a certain length (as always, the length does not include the trailing null byte),
9696
and leaves its initialization to you. Like all string allocation functions, it accepts a parameter that determines

0 commit comments

Comments
 (0)