What is the difference between echo print print_r and var_dump?



What is the difference between echo print print_r and var_dump?..

Answer / Soma Anchal

echo prints a string, while print can print a variable. Both are PHP functions to output data. print_r displays an array or object in readable format. var_dump outputs both the type and the value of a variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What do you mean by horizon in laravel 5?

1 Answers  


How to install laravel by composer?

1 Answers  


How do I test sending emails without actually sending emails to real addresses?

1 Answers  


How to use custom table in laravel modal?

1 Answers  


What are the advantages of queue?

1 Answers  


How to enable or disable maintaince mode in laravel.

1 Answers  


Explain how to register a service provider via composer in laravel?

1 Answers  


What is laravel framework?

1 Answers  


Tell me what is the purpose of using dd() function iin laravel?

1 Answers  


What is the service container in laravel?

1 Answers  


What is queues?

1 Answers  


What is routing in laravel?

1 Answers  


Categories