ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Scripts  >>  PHP
 
 


 

 
 PHP interview questions  PHP Interview Questions
 ASP interview questions  ASP Interview Questions
 CGI Perl interview questions  CGI Perl Interview Questions
 JavaScript interview questions  JavaScript Interview Questions
 VB Script interview questions  VB Script Interview Questions
 JSP interview questions  JSP Interview Questions
 Shell Script interview questions  Shell Script Interview Questions
 Python interview questions  Python Interview Questions
 Tcl interview questions  Tcl Interview Questions
 Awk interview questions  Awk Interview Questions
 AJAX interview questions  AJAX Interview Questions
 Ruby on Rails interview questions  Ruby on Rails Interview Questions
 Scripts AllOther interview questions  Scripts AllOther Interview Questions
Question
For printing out strings, there are echo, print and printf.
Explain the differences.
 Question Submitted By :: Rajan Vardawaj
I also faced this Question!!     Rank Answer Posted By  
 
  Re: For printing out strings, there are echo, print and printf. Explain the differences.
Answer
# 1
echo is a language construct(You can see we don't use
paranthesis for echo).echo does not return any value. print
is also a language construct but it returns an integer
value. printf is a function..... echo is considered fast
than print
 
Is This Answer Correct ?    4 Yes 0 No
Coder
 
  Re: For printing out strings, there are echo, print and printf. Explain the differences.
Answer
# 2
echo is a language construct(You can see we don't use
paranthesis for echo).echo does not return any value. print
is also a language construct but it returns an integer
value. printf is a function..... echo is considered fast
than print and printf
 
Is This Answer Correct ?    2 Yes 0 No
Hardik
 
 
 
  Re: For printing out strings, there are echo, print and printf. Explain the differences.
Answer
# 3
echo, print and printf are used for printing strings but the
basic difference between them is: echo is the most primitive
of them, and just outputs the contents following the
construct to the screen. print is also a construct (so
parentheses are optional when calling it), but it returns
TRUE on successful output and FALSE if it was unable to
print out the string. And you can pass multiple parameters
to echo, like:

and it will output the string “Welcome Jack”

Whereas print does not take multiple parameters. It is also
generally argued that echo is faster, but usually the speed
advantage is negligible, and might not be there for future
versions of PHP.

printf� is a function, not a construct, and allows such
advantages as formatted output, but it’s the slowest way to
print out data out of echo, print and printf.
 
Is This Answer Correct ?    1 Yes 0 No
Shilpa Yogesh Agrawal
 

 
 
 
Other PHP Interview Questions
 
  Question Asked @ Answers
 
What are the differences between procedure-oriented languages and object-oriented languages?  3
What is the difference between mysql_fetch_object and mysql_fetch_array?  4
What is the functionality of the function html entities?  2
What are the security measures we have to take for our site not to hack by others. Infosys1
how to store date to database ConSim5
what is interface in php? how it is use? Wipro2
How can i change the extension name like i have a page which name aboutme.php but i want to show it aboutme.php3 or aboutme.aspx?  3
For printing out strings, there are echo, print and printf. Explain the differences.  3
How can we register the variables into a Session? HCL5
What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods? Rushmore-Consultancy8
Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ? Rushmore-Consultancy1
Hi, I want to upload an image ito database and display image in a table in php how it is possible  2
What are the ways we can destroy a session variable ?  2
What type of headers have to add in the mail function in which file a attached?  2
How can you parse files that were not ending with .php by using Apache?  1
What is PHP?  8
How do you get the Browser information? Life-Infotech2
What is the diffrence between GET,POST and REQUEST Method. Acquity-Software5
what is the diffrence between for and foreach? Photon7
when ever the user logged in the database table the current registered date will be appeared  3
 
For more PHP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com