PHP - Type Handling
You want to sum values from an array where some elements are strings with numbers and others are booleans. Which PHP code correctly sums all values?
$arr = ['4', true, '3 cats', false];
$arr = ['4', true, '3 cats', false];
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions