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

Tell me what types of loops exist in php?

0 Answers  


How can we get the browser properties using PHP?

4 Answers   Google, Pollux Softech,


Is nan in php?

0 Answers  


Is php front end?

0 Answers  


Does php support multiple inheritances?

0 Answers  






Why did you choose this particular career path?

0 Answers  


Is php used anymore?

0 Answers  


What is the use of friend function?

7 Answers   Wipro,


How to get the number of characters in a string?

0 Answers  


How do i explode this string '||25||34||73||94||116||128' i need to have a array like this array ( 0 => '25', 1 => '34', 2 => '73', 3 => '94', 4 => '116', 5 => '128' ) explode("||", $array); didnt work for me i get this array array ( 0 => '', 1 => '25', 2 => '34', 3 => '73', 4 => '94', 5 => '116', 6 => '128', )

2 Answers  


How easy is php?

0 Answers  


What is array filter in php?

0 Answers  


Categories