zendframework / zend-stdlib

Stdlib component from Zend Framework
BSD 3-Clause "New" or "Revised" License
384 stars 76 forks source link

grapheme_substr inconsistency as compared to substr #73

Open Xerkus opened 7 years ago

Xerkus commented 7 years ago

grapheme_substr from Intl have differing behavior as compared to substr:

var_dump(substr('a', 1, null)); //  string(0) ""`
var_dump(grapheme_substr('a', 1, null)); // bool(false)

It looks like on php 5.x it also produces warning.

This behavior needs to be investigated against other wrappers and corrected if needed.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-stdlib; a new issue has been opened at https://github.com/laminas/laminas-stdlib/issues/2.