Bug #66997 [Fbk->NoF]: function callback problem
Edit report at https://bugs.php.net/bug.php?id=66997&edit=1
ID: 66997
Updated by: php-bugs@lists.php.net
Reported by: b4umelody at gmail dot com
Summary: function callback problem
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Arrays related
Operating System: ubuntu
PHP Version: 5.4.26
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2014-04-01 17:46:04] requinix@php.net
The version numbers are a range. "5.4.0 through 5.6.0alpha3".
The code works fine. If you're having a problem then it's somewhere else.
------------------------------------------------------------------------
[2014-04-01 17:35:24] b4umelody at gmail dot com
@requinix I am try actual test code
on 3v4l.org site not give every PHP version of output.....
------------------------------------------------------------------------
[2014-04-01 17:30:01] b4umelody at gmail dot com
@requinix I am try actual test code
on 3v4l.org site not give every PHP version of output.....
------------------------------------------------------------------------
[2014-04-01 17:20:01] requinix@php.net
http://3v4l.org/YhO4V
Looks fine. Is that the actual test code or just something similar?
------------------------------------------------------------------------
[2014-04-01 11:10:36] b4umelody at gmail dot com
Description:
------------
test script working on 5.4.17 version but same script not working on 5.4.26 version.I think function
callback problem on 5.4.26 version
Test script:
---------------
<?php
$str1 = "Samsung Television 21 Television new";
$syns = [
'tv' => ['sdds', 'Television new', 'Television11']
];
$str1 = array_reduce(array_keys($syns), function($c, $x) use ($syns)
{
return $c = preg_replace('/\b'.join('\b|\b', $syns[$x]).'\b/', $x,
$c);
}, $str1);
$arr1 = explode(' ', $str1);
var_dump($arr1);
?>
Expected result:
----------------
string 'Samsung Television 21 tv' (length=24)
Actual result:
--------------
NULL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66997&edit=1
Thread (6 messages)