By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,409 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,409 IT Pros & Developers. It's quick & easy.

Are there scanf and fprintf in PHP 5?

P: n/a
RC
I looked at that O'Reilly book Programming PHP
by Rasmus Lerdorf and Kevin Tatroe. That book
base on PHP 4. From Appendix A.
I could find

fscanf
printf

But where are

scanf
fprintf

sscanf
sprintf

Are those four available in PHP 5, now?
Thank Q!
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, 11 May 2005 16:32:15 -0400, RC <ra**********@nospam.noaa.gov> wrote:
I looked at that O'Reilly book Programming PHP
by Rasmus Lerdorf and Kevin Tatroe. That book
base on PHP 4. From Appendix A.
I could find

fscanf
printf

But where are

scanf
fprintf

sscanf
sprintf

Are those four available in PHP 5, now?


PHP has a manual that you can search.

In fact one of my favourite features of the PHP site is you can just put:

php.net/something_you_think_might_be_a_function

... into your browser, and the site (a) redirects you to a local mirror, (b)
takes you straight to the manual page for the function if it exists or (c)
shows close matches or offers a Google search on the site if it doesn't match.

Fantastic.

So:

http://php.net/scanf
http://php.net/fprintf
http://php.net/sscanf
http://php.net/sprintf

I use sprintf liberally in PHP4 - it's been there for a long time. It's still
there in PHP5.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

P: n/a

RC wrote:
I looked at that O'Reilly book Programming PHP
by Rasmus Lerdorf and Kevin Tatroe. That book
base on PHP 4. From Appendix A.
I could find

fscanf
printf

But where are

scanf
fprintf

sscanf
sprintf

Are those four available in PHP 5, now?


The best place to look for answers to questions like these is at
www.php.net

Just enter www.php.net/sprintf (or any function) and you will be taken
to that function if it exists.

Ken

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.