cannot be empty
Description
The provided parameter is of the valid type, but cannot be left empty.
Example
<?php
print_r(explode('', 'abc')); // Not possible with an empty delimiter
print_r(str_split(1, 'abc'));
?>
Alternatives
- When parsing data, make sure that the separator is not empty.
In previous PHP versions, this error message used to be :ref:empty-delimiter.
In more recent PHP versions, this error message is now :ref:must-not-be-empty.