Run »
"; echo "4: " .(boolval(42) ? 'true' : 'false') . "
"; echo '"": ' .(boolval("") ? 'true' : 'false') . "
"; echo '"Hello": ' .(boolval("Hello") ? 'true' : 'false') . "
"; echo '"0": ' .(boolval("0") ? 'true' : 'false') . "
"; echo "[3, 5]: " .(boolval([3, 5]) ? 'true' : 'false') . "
"; echo "[]: " .(boolval([]) ? 'true' : 'false') . "
"; ?>
0: false
4: true
"": false
"Hello": true
"0": false
[3, 5]: true
[]: false