php5.3 does not support eregi () function of the

2010-10-12  来源:本站原创  分类:PHP  人气:208 

When writing a regular you may encounter with the ereg () error, such as: Deprecated: Function eregi () is deprecated ××××××××, reason is php5.3 has not supported ereg (), you can use preg_match () i parameter substitution, such as: ereg ("^[[: alnum :]]+$", $ pass); -> preg_match ("/^[[: alnum :]]+$/ i ", $ pass );

Here are details:

php 5.3 from the one speaking, it can be said in 07 years of a planned pre PHP6 version adds many features, unified a lot of grammar, so that PHP has become more powerful and concise.

Speaking of statistical framework for planning, PHP would of course be a number of aliases, repeat function are classified order, and some do not have the official removed later in php 5.3. It is not recommended for new projects continue to be used.

PHP 5.3 there are two deprecated,

E_DEPRECATED and E_USER_DEPRECATED

The following is the old project will encounter problems after php 5.3

* Define_syslog_variables
* Register_globals
* Register_long_arrays
* Safe_mode
* Magic_quotes_gpc
* Magic_quotes_runtime
* Magic_quotes_sybase
* Note in the PHP.ini is no longer recommended by #.

Deprecated functions:

* Call_user_method () can be used call_user_func () instead
* Call_user_method_array () can use call_user_func_array () instead define_syslog_variables ()
* Dl () object to load the extension using the DL, php5.3 preparation of future applications php.ini
* Ereg () can use preg_match () instead
* Ereg_replace () can use preg_replace () instead
* Eregi () with preg_match () i parameter substitution
* Eregi_replace () with preg_replace () i parameter substitution
* Set_magic_quotes_runtime () with magic_quotes_runtime () instead
* Session_register () session_unregister () session_is_registered ()
* Unified the three alternatives with $ _SESSION
* Set_socket_blocking () with stream_set_blocking () instead
* Split () by preg_split () instead
* Spliti () by preg_split () mode 'i' instead
* Sql_regcase ()
* Mysql_db_query () with the mysql_select_db () mysql_query () instead mysql_escape_string () with the use mysql_real_escape_string () instead
* The time zone handling, unified with the Timezone of like

Deprecated features:

* Add new instance of the direct return is no longer recommended. PHP 6 will no longer support
* Call-time pass-by-reference parameter is now no longer recommend the use of PHP 6 will no longer support
* Use {} to access string order is no longer recommended. Reunification with [] instead. PHP 6 will no longer support

Of course, if the project an emergency, but also to use the above method in php 5.3, you can use the following method to do

Increase in the php.ini

vim / etc / php.ini

php_flag allow_call_time_pass_reference On
php_value error_reporting "E_ALL & ~ E_NOTICE & ~ E_DEPRECATED"

相关文章
  • php5.3 does not support eregi () function of the 2010-10-12

    When writing a regular you may encounter with the ereg () error, such as: Deprecated: Function eregi () is deprecated ××××××××, reason is php5.3 has not supported ereg (), you can use preg_match () i parameter substitution, such as: ereg ("^[[: alnum

  • mysql mysql date time default default system does not support the function 2011-03-27

    Because MySQL currently does not support the default value of the field function , Therefore, based on create_time datetime default now() The form is not possible to set the default value . Instead of the program is to use the type instead of TIMESTA

  • Support sort function oracle page 2010-03-02

    SELECT * FROM( SELECT A.*,ROWNUM num FROM (SELECT * FROM product_user_comment order by user_id) A WHERE ROWNUM<=1550) WHERE num>=5 If you want to write a three-tier ranking function select * from(select rownum rn,empno,ename from emp where rownum<

  • mysql4 order by bug does not support the function 2011-03-22

    mysql 4.1.18 in order by the existence of functions not supported bug select a, sum(b) from tablename group by a order by sum(b) Appears ERROR 1111 (HY000): Invalid use of group function Around this bug is to sum (b) with as select a, sum(b) as ss fr

  • Jquery support keyboard function calculator 2010-06-01

    Recent users to the need of a Web version of the calculator, find the Internet a long time, there are many good solutions, but for the most personal sense of jquery.calculator plug-in based on jquery. Link to the following address: http://keith-wood.

  • CentOS system to install phpmyadmin FAQ Summary 2010-03-21

    Abstract: Deprecated: Function eregi () is deprecated in / usr / local / apache / htdocs / phpmyadmin / libraries / select_lang.lib.php on line 146 Question one: Phenomenon: the top of the page to enter phpMyAdmin: Deprecated: Function eregi () is de

  • Function eregi is deprecated (解决方法) 2014-04-27

    本篇文章是对Function eregi() is deprecated错误的解决方法进行了详细的分析介绍,需要的朋友参考下 在php升级到php5.3之后后,在使用的过程经常发现有的程序会出现Function eregi() is deprecated 的报错信息.是什么原因呢?这是因为php5.3中不再支持eregi()函数,而使用preg_match()函数替代. 解决的方法是:将eregi()函数替换成preg_match() 函数. if(eregi('^test',$file)) 可

  • Do not run dedecms5.6 version php5.3 2011-03-23

    Today in the use of combined ecshop dedecms distribution alliance to help companies create and found dedecms5.6 environment in php5.3 continuous error deprecated in include\dedesql.class.php on line 516 Deprecated: Function eregi() is deprecated in i

  • CentOS 5.3 rapid build Apache + PHP5 + MySQL perfect Web Server (LAMP) 2010-04-01

    LAMP is a L inux, A pache, M ySQL, P HP portfolio of short, this article aims to quickly install CentOS 5.3 i386/x86_64 Apache2 Web server, as well as PHP, MySQL and other support components, addition, and then brief you on MySQL management tool phpM

  • PHP5 common functions 2011-05-18

    PHP has been updated to many versions, with the more recent to the number of PHP5. Here we summarized the PHP5 we used the function, so that we will actually write the code in the view. usleep () function code execution delay of several microseconds.

  • The session fully PHP5 articles 2011-06-01

    session cookie and what's the use? Common usage, such as members of some sites to download things to be logged. http protocol itself is stateless, and no way of knowing whether the customer has logged in, how should we do? cookie and the session can

  • Installed in CentOS5.4 Apache2 + PHP5 + MySQL (LAMP) 2010-06-13

    LAMP is Linux, Apache, Mysql, PHP stands for. This tutorial will explain you how to install a CentOS5.3 server with PHP5 (mod_php) and Mysql support for Apache2 web server. 1 In this tutorial, I will use the host IP address is 192.168.0.100. These se

  • Microsoft SQL Server driver for the PHP adding better support for ADODB 2010-06-21

    PHP support for Microsoft's great to add the PHP in IIS support, support for PHP to access. Net components, more importantly, has released native SQL Server driver to help PHP program that uses SQL Server database to do development. The company's CRM

  • linux + apache2.2 + php5.2 + mysql5.0 Source Installation 2010-07-23

    Recently in learning Linux, found this nice article in LAMP configuration, simple and practical. So this collection. In addition, the software mentioned in this document, I have downloaded the order to my SKYDRIVER web site, a friend in need can go t

  • Let jbpm3.2 functional annotation support hibernate3.2 2010-07-25

    Recently saw some friends because jbpm3 does not support annotations and Fan unhappy, so my good jdpl and methods of change to share. Does not support the function of a reason: JDPL.jar Configuration instantiated package, the source code for the Conf

  • PHP interception of string to support multi-character set UTF-8.GB2312.GBK 2010-08-01

    PHP string interception, interception of the string with the function feature, support for UTF-8, GB2312, GBK multiple character sets. GB2312 Chinese string interception <? Php / / Interception of Chinese string function mysubstr ($ str, $ start, $ l

  • under linux Apache2 + mysql5 + php5 source installation details 2010-08-09

    under linux Apache2 + mysql5 + php5 source installation details 1: Prepare the package Here I will download all the installation package and kept in / root / Software / directory, note the following installation package as much as possible to find th

  • mysql 5.0 of the profile function 2010-10-13

    In the 5.0.37 version of MYSQL or more, to support the function of profile; Summarized as follows: show profile the following format: SHOW PROFILE [type [, type] ...] [FOR QUERY n] [LIMIT row_count [OFFSET offset]] type: ALL | BLOCK IO | CONTEXT SWIT

  • PHP5 + MYSQL5 + APACHE2 + phpMyAdmin-2.7.0 + ZendOptimizer, WINDOWS download method 2010-12-27

    WINDOWS follows: Note: The following can only be used for this method to install PHP5! Not suitable for PHP4, PHP5 and PHP4 different points: 1: php5 and php4 difference is that it changed the dynamic link library catalog 2: PHP5 as the default suppo

  • Transfer: definition of an inline function and macro 2011-01-11

    Article (a) Inline function and macro definitions in C, commonly used in prepared statements instead of # define a function definition. For example: # Define MAX (a, b) ((a)> (b)? (A): (b)) This statement makes the program appear in each MAX (a, b) w