How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More PHP Interview Questions

In php how can you jump in to and out of "php mode"?

0 Answers  


What is the difference between characters  and #?

0 Answers  


What is the functionality of the function strstr and stristr?

2 Answers  


Why php 7 is faster?

0 Answers  


How do you count numbers in php?

0 Answers  






What is the difference between md5(), crc32() and sha1() crypto on php?

0 Answers  


What is the difference between indexed and associative array?

0 Answers  


How can we change the maximum size of the files to be uploaded?

0 Answers  


When is a conditional statement ended with an endif?

0 Answers  


What are php data types?

0 Answers  


Which is better mysql or sql?

0 Answers  


Which is useful for method overloading?

0 Answers  


Categories