Last active
November 29, 2020 18:18
-
-
Save lechidung/d3bf18e347bdc9e0424ce36985f2a9e4 to your computer and use it in GitHub Desktop.
PHP 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** PHP 7 ***/ | |
strlen([]); // Warning: strlen() expects parameter 1 to be string, array given | |
array_chunk([], -1); // Warning: array_chunk(): Size parameter expected to be greater than 0 | |
/*** PHP 8 ***/ | |
strlen([]); // TypeError: strlen(): Argument #1 ($str) must be of type string, array given | |
array_chunk([], -1); // ValueError: array_chunk(): Argument #2 ($length) must be greater than 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment