Coding CommunityE-Learning

Livecoding.tv Quiz of the Day: 17/10/2016

Answer: 1. Encapsulation Encapsulation is a mechanism by which developer could hide implementation behind an interface. Encapsulated code has two features: Instance variables are kept protected (usually with the private modifier). Getter and setter methods provide access…
Coding CommunityE-Learning

Livecoding.tv Quiz of the Day: 10/10/2016

Answer: The problem here is that strpos() returns the starting position index of $str1 in $str2 (if found), otherwise it returns false. So in this example, strpos() returns 0 (which is then coerced to false when referenced in the if statement). That’s why the code doesn’t work properly. The correct…