Doc #63295 [Opn]: Missing information about function alias
| From: | uw@php.net | Date: | Thu, 25 Oct 2012 12:00:47 +0000 |
| Subject: | Doc #63295 [Opn]: Missing information about function alias | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9009@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63295&edit=1
ID: 63295
Updated by: uw@php.net
Reported by: dreen1 at gmail dot com
Summary: Missing information about function alias
Status: Open
Type: Documentation Problem
Package: MySQL related
Operating System: any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I've deprecated all undocumented functions alias in PHP 5.5, http://news.php.net/php.cvs/70459 . As I do not know
how to properly document it (changelog is auto generated and those functions have never been
documented, thus auto generation cannot cover them), I leave the documentation task to the experts -
the docs team.
Previous Comments:
------------------------------------------------------------------------
[2012-10-25 09:57:00] uw@php.net
I think, we should change all undocumented PHP_FALIAS into PHP_DEP_FALIAS to cause deprecation
warnings. This change should then be noted in the docs together with the deprecated functions.
Ulf
/* for downwards compatability */
PHP_FALIAS(mysql, mysql_db_query, arginfo_mysql_db_query)
--> undocumented
PHP_FALIAS(mysql_fieldname, mysql_field_name, arginfo_mysql_field_name)
--> undocumented
PHP_FALIAS(mysql_fieldtable, mysql_field_table, arginfo_mysql_field_seek)
--> undocumented
PHP_FALIAS(mysql_fieldlen, mysql_field_len, arginfo_mysql_field_seek)
--> undocumented
PHP_FALIAS(mysql_fieldtype, mysql_field_type, arginfo_mysql_field_seek)
--> undocumented
PHP_FALIAS(mysql_fieldflags, mysql_field_flags, arginfo_mysql_field_seek)
--> undocumented
PHP_FALIAS(mysql_selectdb, mysql_select_db, arginfo_mysql_select_db)
--> undocumented
#ifndef NETWARE /* The below two functions not supported on NetWare */
#if MYSQL_VERSION_ID < 40000
PHP_DEP_FALIAS(mysql_createdb, mysql_create_db, arginfo_mysql_select_db)
--> undocumented
PHP_DEP_FALIAS(mysql_dropdb, mysql_drop_db, arginfo_mysql_select_db)
--> undocumented
#endif
#endif /* NETWARE */
PHP_FALIAS(mysql_freeresult, mysql_free_result, arginfo__result_mysql_arg)
--> undocumented
PHP_FALIAS(mysql_numfields, mysql_num_fields, arginfo__result_mysql_arg)
--> undocumented
PHP_FALIAS(mysql_numrows, mysql_num_rows, arginfo__result_mysql_arg)
--> undocumented
PHP_FALIAS(mysql_listdbs, mysql_list_dbs, arginfo__optional_mysql_link)
--> undocumented
PHP_DEP_FALIAS(mysql_listtables,mysql_list_tables, arginfo_mysql_select_db)
--> undocumented
PHP_FALIAS(mysql_listfields, mysql_list_fields, arginfo_mysql_list_fields)
--> undocumented
PHP_FALIAS(mysql_db_name, mysql_result, arginfo_mysql_result)
--> ATTN: documented
PHP_FALIAS(mysql_dbname, mysql_result, arginfo_mysql_result)
--> undocumented
PHP_FALIAS(mysql_tablename, mysql_result, arginfo_mysql_result)
--> ATTN: documented
PHP_FALIAS(mysql_table_name, mysql_result, arginfo_mysql_result)
--> ATTN: undocumented although it seems to follow naming of documented ones
------------------------------------------------------------------------
[2012-10-16 23:02:59] dreen1 at gmail dot com
Description:
------------
mysql() is an alias to mysql_db_query() which itself is deprecated. this fact is
undocumented and left me wondering for a long time why I can't define mysql().
Reading source code revealed the truth.
Test script:
---------------
<?php
function mysql()
{
return "nope";
}
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63295&edit=1