Web Development Exam  >  Web Development Videos  >  PHP for Absolute Beginners: From Novice to PHP Master  >  Beginner PHP Tutorial - 64 - ob_start

Beginner PHP Tutorial - 64 - ob_start Video Lecture | PHP for Absolute Beginners: From Novice to PHP Master - Web Development

200 videos

FAQs on Beginner PHP Tutorial - 64 - ob_start Video Lecture - PHP for Absolute Beginners: From Novice to PHP Master - Web Development

1. What is ob_start in PHP?
Ans. ob_start is a PHP function that turns on output buffering. It allows the output of the PHP script to be stored in a buffer rather than being sent to the browser immediately.
2. Why would I use ob_start in web development?
Ans. ob_start is commonly used in web development to capture the output generated by PHP scripts. This can be useful in scenarios where you want to modify or manipulate the output before sending it to the browser.
3. How does ob_start work in PHP?
Ans. When ob_start is called, it starts output buffering. This means that any output generated by PHP scripts after ob_start will be stored in an internal buffer. The buffer can then be manipulated or modified using other PHP functions before finally being sent to the browser using ob_end_flush() or ob_flush().
4. Can I use ob_start to compress or minify HTML output?
Ans. Yes, ob_start can be used to compress or minify HTML output. By using ob_start in combination with ob_gzhandler, you can enable gzip compression for your HTML output. This can help reduce the size of the transferred data and improve page load times.
5. Are there any performance considerations when using ob_start?
Ans. While ob_start can be a powerful tool, it can also have performance implications. The use of output buffering can increase memory usage, especially if you are buffering large amounts of data. It is important to consider the trade-off between the benefits of output buffering and the potential impact on performance and memory usage.
Explore Courses for Web Development exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

practice quizzes

,

Important questions

,

Objective type Questions

,

shortcuts and tricks

,

MCQs

,

Previous Year Questions with Solutions

,

Beginner PHP Tutorial - 64 - ob_start Video Lecture | PHP for Absolute Beginners: From Novice to PHP Master - Web Development

,

ppt

,

mock tests for examination

,

Free

,

Beginner PHP Tutorial - 64 - ob_start Video Lecture | PHP for Absolute Beginners: From Novice to PHP Master - Web Development

,

video lectures

,

Beginner PHP Tutorial - 64 - ob_start Video Lecture | PHP for Absolute Beginners: From Novice to PHP Master - Web Development

,

Extra Questions

,

Exam

,

pdf

,

study material

,

Summary

,

Viva Questions

,

Sample Paper

,

Semester Notes

,

past year papers

;