Jump to content
aelius

[PHP] Functii si directive deprecated in php 5.3.x

Recommended Posts

Posted

Functiile deprecated sunt functii ce nu mai sunt folosite si urmeaza a fi scoase definitiv din “core” (partea de baza a php-ului). Este recomandat sa nu mai folositi aceste functii pentru ca aplicatiile web nu o sa mai functioneze cu ele. Odata cu versiunea php 5.3.0 s-au introdus doua nivele noi de eroare, si anume: E_DEPRECATED si E_USER_DEPRECATED. Daca doriti sa va fie afisate toate mesajele de eroare, incluzand deprecated si warnings, puteti folosi in scripturile php: error_reporting(-1);

Directive INI (in fisierele de configuratie, ex: php.ini)


- define_syslog_variables
- register_globals
- register_long_arrays
- safe_mode
- magic_quotes_gpc
- magic_quotes_runtime
- magic_quotes_sybase
- Orice comment cu diez (#) in fisierul de configuratie (php.ini) este deprecated. Folositi intotdeauna ';'

Functii deprecated:


- call_user_method() - folositi call_user_func()
- call_user_method_array() - folositi call_user_func_array()
- define_syslog_variables()
- dl()
- ereg() - folositi preg_match()
- ereg_replace() - folositi preg_replace()
- eregi() - folositi preg_match()
- eregi_replace() - folositi preg_replace()
- set_magic_quotes_runtime() si alias-ul ei, magic_quotes_runtime()
- session_register()
- session_unregister()
- session_is_registered()
- set_socket_blocking() - folositi stream_set_blocking()
- split() - folositi preg_split()
- spliti() - folositi preg_split()
- sql_regcase()
- mysql_db_query() - folositi mysql_select_db() si mysql_query()
- mysql_escape_string() - folositi mysql_real_escape_string()

Nota:

In scripturile globale de configuratie ale site-urilor web, folositi "date_default_timezone_set". Exemplu:


date_default_timezone_set('Europe/Berlin');

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...