Doc #62428 [Opn]: PCRE "\g" escape missing "<name>" in documentation
Edit report at https://bugs.php.net/bug.php?id=62428&edit=1
ID: 62428
User updated by: danielklein at airpost dot net
Reported by: danielklein at airpost dot net
Summary: PCRE "\g" escape missing "<name>" in documentation
Status: Open
Type: Documentation Problem
Package: Documentation problem
PHP Version: 5.4.4
Block user comment: N
Private report: N
New Comment:
I don't see any change. Where does it say \g<name> in the documentation?
Previous Comments:
------------------------------------------------------------------------
[2015-04-15 14:15:31] ppaisndud at gmail dot com
Documentation has been fixed, can be closed
------------------------------------------------------------------------
[2012-06-27 01:31:39] danielklein at airpost dot net
Description:
------------
http://www.php.net/manual/en/regexp.reference.back-references.php
PCRE also allows "\g" to use "<name>". I don't know since which
version of PHP, but going by the existing documentation it should have been between 5.2.2 and 5.2.4.
Please make note of this in the documentation.
Test script:
---------------
<?php
var_dump(preg_match('/(?<bar>o)\g<bar>/', 'foo'));
?>
Actual result:
--------------
int(1)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62428&edit=1
Thread (9 messages)