Is it necessary to use closing tag in php?sometime without
closing tag things work.why?

Answers were Sorted based on User's Feedback



Is it necessary to use closing tag in php?sometime without closing tag things work.why?..

Answer / prashant

This isn't exactly a bug. PHP doesn't require the closing
tag (it is assumed when the file ends). Not specifying the
closing ?> helps prevent accidents like additional
whitespace which will cause session initialization to fail
("headers already sent").

Is This Answer Correct ?    10 Yes 2 No

Is it necessary to use closing tag in php?sometime without closing tag things work.why?..

Answer / ankur

some times session are not expired or logout then we find
that type of situation.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More PHP Interview Questions

What are majic methords in php?

0 Answers  


How can use sys time in loop?

0 Answers   Fengate,


How can you increase the maximum execution time of a script in php?

0 Answers  


How do I use isdigit function?

0 Answers  


Which is useful for method overloading?

0 Answers  






What is abstraction php?

0 Answers  


Which methods should be used for sending an email using the variables $to, $subject, and $body?

0 Answers  


Is a number php?

0 Answers  


Tell me how to initiate a session in php?

0 Answers  


What is MVC structure in Magento?

4 Answers  


How do I end a php session?

0 Answers  


Explain the difference b/w static and dynamic websites?

0 Answers  


Categories