php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73486 Deprecated functions related
Submitted: 2016-11-10 03:28 UTC Modified: 2016-11-10 05:08 UTC
From: thummarmohit77 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.6.27 OS:
Private report: No CVE-ID: None
 [2016-11-10 03:28 UTC] thummarmohit77 at gmail dot com
Description:
------------
I have a problem and trying to resolve using a code (located in Test script section). I have a big project in PHP in lower version and my system use newer version of php. The following function is Deprecated in newer version:
ereg()
split()

And my solution is in test script section but it is not working. I think it should work.

Test script:
---------------
if(!function_exists("ereg")){
    function ereg($s1, $s2){
        return preg_match($s1, $s2);
    }
}

if(!function_exists("split")){
    function split($s1, $s2){
        return preg_split($s1, $s2);
    }
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-10 03:30 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2016-11-10 03:30 UTC] requinix@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

ereg and preg_match do not work the same way. split and preg_split do not work the same way.
 [2016-11-10 04:56 UTC] thummarmohit77 at gmail dot com
I am not checking about similar to ereg or split but just creating functions with same name (if not exists) and is still gives deprecated error.
 [2016-11-10 05:08 UTC] requinix@php.net
-Block user comment: No +Block user comment: Yes
 [2016-11-10 05:08 UTC] requinix@php.net
Your functions are only used if ereg and split are not defined. They are still defined in 5.6.

If you have more questions then see http://www.php.net/support.php.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 02:01:29 2024 UTC