Can a trait extend a class php?



Can a trait extend a class php?..

Answer / Avinash Kumar Sinha

No, in PHP traits are not able to extend classes. Traits are used for code reuse with the composition instead of inheritance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is trim function in php?

1 Answers  


Is set in php?

1 Answers  


What is difference between print_r and echo in php?

1 Answers  


How can we get the properties (size, type, width, height) of an image using PHP image functions?

4 Answers   ConSim,


Tell me what are sql injections, how do you prevent them and what are the best practices?

1 Answers  


Can php run without apache?

1 Answers  


What software is required for php?

1 Answers  


How to remove duplicate values from php array?

1 Answers  


How are cookies created?

1 Answers  


Is false empty php?

1 Answers  


How can you create a session in php?

1 Answers  


What is a php object?

1 Answers  


Categories