php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75008 [KR] Example code error
Submitted: 2017-07-31 05:14 UTC Modified: 2017-08-03 12:41 UTC
From: prioriqz at gmail dot com Assigned:
Status: Suspended Package: Translation problem
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
14 + 30 = ?
Subscribe to this entry?

 
 [2017-07-31 05:14 UTC] prioriqz at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.preg-match
---

In Korean language page: http://php.net/manual/kr/function.preg-match.php

Example #4 code has errors

see below

<?php

$str = 'foobar: 2008';

preg_match('/(?<name>\w+): (?<digit>\d+/', $str, $matches);

print_r($matches);

?>

expected code

<?php

$str = 'foobar: 2008';

preg_match('/(?<name>\w+): (?<digit>\d+)/', $str, $matches);

print_r($matches);

?>




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-03 12:41 UTC] cmb@php.net
-Summary: Example code error +Summary: [KR] Example code error -Status: Open +Status: Suspended -Type: Documentation Problem +Type: Bug -Package: Documentation problem +Package: Translation problem
 [2017-08-03 12:41 UTC] cmb@php.net
Well, the Korean translation should have been removed due to being
out-dated.[1] Therefore, I'm suspending this ticket.

[1] <https://github.com/php/web-php/pull/113>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC