Re: Function renaming. First attempt at defining some rules.
| From: | Zak Greant | Date: | Thu, 15 Feb 2001 07:27:43 +0000 |
| Subject: | Re: Function renaming. First attempt at defining some rules. | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2407@lists.php.net to get a copy of this message | ||
I am not sure what to say - we each seem to have gone off in our own
directions on this issue. Zeev's request that his message not spawn a large
thread seems to have been taken seriously, while much of the serious work on
this thread seems not to have made a blip on most people's radar.
I would guess that a lot of people are scratching their heads right now -
how should one respond to many of the messages that have been posted lately?
Either they take an hour to respond to in a conscientious fashion or they
rehash what has been stated.
I am going to go off on my own for a bit and try some things. Also, Hartmut
has done some work that I am going to try and play with in the next little
while.
If anyone is interested in what I am messing about with, just drop me an
email. When I get something that I want to show the rest of the playground,
I will post a message.
--zak
----- Original Message -----
From: "Phil Driscoll" <phil@dialsolutions.co.uk>
To: "Derick Rethans" <d.rethans@jdimedia.nl>; "php qa"
<php-qa@lists.php.net>
Sent: Wednesday, February 14, 2001 10:11 AM
Subject: Re: [PHP-QA] Function renaming. First attempt at defining some
rules.
> >A way to do this is to ask every maintainer of an extention to make a
list
> >of the extension he supports. That way it would cost much less than 9
> >hours for a person. I'd be happy to do this for the mcrypt extension,
> >which needs bug fixing anyhow :)
>
> Sounds like a good way of doing it - and if not a maintainer, then at
least
> the person doing the job needs to have a thorough working knowledge of the
> functions. I've just been looking at the function list and have been
shocked
> at how little of PHP I use.
>
> I've spent the last hour trying to do mysql (just the function names - not
> even begun to thing about order of parameters yet). It's hard work - about
2
> minutes per function! Here's what I think obeys the rules from my earlier
> email (but maybe not!). I may have got the wrong idea as to what some of
the
> functions I haven't used before do, so there may be big cockups in there.
>
> The main thing I noticed was the horrendous amount of unlearning we need
to
> do, but we should bear in mind that of all the people who will ever use
php,
> most of them have never even heard of it yet.
>
>
> mysql_affected_rows -> mysql_[get]affectedrows
> mysql_close -> mysql_close
> mysql_connect -> mysql_connect
> mysql_create_db -> mysql_create
> mysql_data_seek -> mysql_seekdata
> mysql_db_query -> mysql_query (note 1)
> mysql_drop_db -> mysql_drop
> mysql_errno -> mysql_[get]errornumber
> mysql_error -> mysql_[get]error[message]
> mysql_escape_string -> mysql_escapestring
> mysql_fetch_array -> mysql_[get]result (note 2)
> mysql_fetch_assoc -> mysql_[get]result (note 2)
> mysql_fetch_field -> mysql_[get]field
> mysql_fetch_lengths -> mysql_[get]result[field]lengths
> mysql_fetch_object -> mysql_[get]result (note 2)
> mysql_fetch_row -> mysql_[get]result (note 2)
> mysql_field_flags -> mysql_[get]fieldflags
> mysql_field_len -> mysql_[get]result[field]length
> mysql_field_name -> mysql_[get]result[field]name
> mysql_field_seek -> mysql_seekfield
> mysql_field_table -> mysql_[get]result[field]table
> mysql_field_type -> mysql_[get]result[field]type
> mysql_free_result -> mysql_free[result]
> mysql_insert_id -> mysql_[get]insertid
> mysql_list_dbs -> mysql_getdatabases
> mysql_list_fields -> mysql_getfields
> mysql_list_tables -> mysql_gettables
> mysql_num_fields -> mysql_countresultfields (or maybe
> getresultfieldcount)
> mysql_num_rows -> mysql_countresultrows (or maybe getresultrowcount)
> mysql_pconnect -> mysql_connect (note 3)
> mysql_query -> mysql_query
> mysql_result -> mysql_[get]resultfield
> mysql_select_db -> mysql_select
>
>
> 1. the database name is passed in as an optional extra arg to mysql_query
> 2. was fetch_array/object - needs optional arg for result type, or
> alternatively to be called mysql_getresultarray)
> 3. pconnect is achieved by passing in a database name as an optional extra
> parameter to mysql_connect
>
> Cheers
> goes back to hide behind the rock again
> --
> Phil Driscoll
> Dial Solutions
> +44 (0)113 294 5112
> http://www.dialsolutions.com
> http://www.dtonline.org
>
>
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net
> For additional commands, e-mail: php-qa-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>