|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11064 ereg() doe's not accept the third argument as reported in doc
Submitted: 2001-05-23 16:54 UTC Modified: 2001-05-24 15:45 UTC
From: jmt at freeshell dot org Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 4.0.5 OS: linux 2.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jmt at freeshell dot org
New email:
PHP Version: OS:


 [2001-05-23 16:54 UTC] jmt at freeshell dot org
try this :
ereg( $a, $b, $c );


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-23 19:56 UTC]
And what should happen? You try this:


$date = date("Y-m-d");

if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) {
    echo "$regs[3].$regs[2].$regs[1]";
} else {
    echo "Invalid date format: $date";


Works for me just fine.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 02 19:01:27 2023 UTC