Page 1 of 1
Functions only just noticed... date_sunrise/date_sunset
Posted: Tue Aug 14, 2007 3:54 am
by CoderGoblin
Well you live and learn..
Can't really think immediately of a use for me at the moment but have to admit it came as quite a shock when I saw these two functions....
date_sunrise and
date_sunset
Is this another case of way too many functions in php to remember them all (with exceptions like Feyd) ? When are they going to have a php command to make my coffee ?
Re: Functions only just noticed... date_sunrise/date_sunset
Posted: Tue Aug 14, 2007 8:30 am
by feyd
CoderGoblin wrote:Is this another case of way too many functions in php to remember them all (with exceptions like Feyd)?
While their use is limited to a select few, they are extremely useful because of the large amount of calculation involved.
CoderGoblin wrote:When are they going to have a php command to make my coffee ?
I believe that's scheduled for 6.5, although they are waiting for a communication standard to emerge over TCP/IP.
Posted: Tue Aug 14, 2007 8:41 am
by superdezign
I think it's just another example of what PHP once was: a procedural programming language with a huge function library. It wasn't always OO.
Posted: Tue Aug 14, 2007 11:54 am
by s.dot
Code: Select all
C:\Users\HP_Administrator>php -r "$a = get_defined_functions(); $a = $a['intern
al']; echo count($a);"
1131
That's not too bad, really. PHP 5.2.0 internally defined functions.
Posted: Tue Aug 14, 2007 12:20 pm
by RobertGonzalez
Posted: Tue Aug 14, 2007 2:46 pm
by superdezign
Hehe, I get to see that lovely list every time that I look up a function in my PHP manual.
Posted: Wed Aug 15, 2007 2:52 am
by CoderGoblin
That's fine if you have the time to them all up. I think a lot of people, myself included go to php.net and simply search for the function they are after.
Posted: Wed Aug 15, 2007 12:12 pm
by RobertGonzalez
CoderGoblin wrote:
That's fine if you have the time to them all up. I think a lot of people, myself included go to php.net and simply search for the function they are after.
I agree with this. I do this too. Very rarely do I ever view the function list. The times I do are usually when I think there is a function that does something that someone like feyd knows, but I don't, and before asking, I quickly Ctrl+F that list for variants of what I think it would be called.
But I search way more often than I view that list.