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 is php and sql?

0 Answers  


Is multilevel inheritance possible in php?

0 Answers  


How to test if a variable is an array?

0 Answers  


What is the difference between $message and $$message in php?

0 Answers  


What is design pattern? Explain all including singleton pattern?

0 Answers  






What is the difference between array_map () and array_shift ()?

0 Answers  


Are there regular expressions in php?

0 Answers  


What is the apache?

0 Answers  


Which is not a file-related function in php?

0 Answers  


Is php still in demand?

0 Answers  


What does $_cookie mean?

0 Answers  


Extract url from this string? It should be flexible for all strings, not for this string only. "yahoo.comyahoo.co.inhotmail.org"

1 Answers   A1 Technology,


Categories