@ 2016-11-24T02:43:16Z <?php
$arr = array(0, '0', NULL, 'abc', '');
foreach($arr as $key) {
var_dump($key);
echo ':' . strlen($key);
echo PHP_EOL . PHP_EOL;
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.25 , 8.4.1 - 8.4.12 int(0)
:1
string(1) "0"
:1
NULL
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/VWiBe on line 7
:0
string(3) "abc"
:3
string(0) ""
:0
Output for 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.34 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 int(0)
:1
string(1) "0"
:1
NULL
:0
string(3) "abc"
:3
string(0) ""
:0
preferences:dark mode live preview ace vim emacs key bindings
148.73 ms | 408 KiB | 5 Q