What are traits?



What are traits?..

Answer / Ram Chandra Pal

Traits in PHP are a mechanism for code reuse. They allow you to reuse functionality across classes, similar to multiple inheritance. Traits are not parent classes and do not have constructors or destructors.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Explain me what is the use of header() function in php?

1 Answers  


Explain the value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of the integers contained inside input?

1 Answers  


Write a select query that will be displayed the duplicated site name and how many times it is duplicated?

1 Answers  


What is the use of offset in mysql?

1 Answers  


What is the difference between echo and print statement?

11 Answers   Rushmore Consultancy,


What are the different types of PHP arrays?

1 Answers  


Tell me how can we display information of a variable and readable by human with php?

1 Answers  


What is a string in php?

1 Answers  


What is meant by nl2br()?

4 Answers   Rushmore Consultancy,


Explain what does the unlink() function means?

1 Answers  


Which software is used to run php programs?

1 Answers  


What is associative array in php?

1 Answers  


Categories