What is difference between var_dump and print_r?



What is difference between var_dump and print_r?..

Answer / Abhay Verma

The main difference between var_dump and print_r in PHP is that var_dump provides more detailed information about variables, including data type, size, and hierarchy. print_r, on the other hand, only outputs the string representation of the variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

How does laravel handle assets?

1 Answers  


How to install laravel via laravel installer.

1 Answers  


What are laravel contract’s?

1 Answers  


How to add multiple and conditions in laravel query?

1 Answers  


What is monolog library?

1 Answers  


What is the best package to set up billing and subscription with stripe and braintree?

1 Answers  


Have you used lumen before?

1 Answers  


What are the requirements for laravel 5.8?

1 Answers  


Is laravel an mvc?

1 Answers  


What is laravel horizon?

1 Answers  


Explain api.php route.

1 Answers  


What is the laravel framework?

1 Answers  


Categories