Bug #75847 [NEW]: Strange behaviour of array_map and call_user_func_array
| From: | lumi at centrum dot cz | Date: | Fri, 19 Jan 2018 07:15:53 +0000 |
| Subject: | Bug #75847 [NEW]: Strange behaviour of array_map and call_user_func_array | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-213613@lists.php.net to get a copy of this message | ||
From: lumi at centrum dot cz
Operating system: ubuntu
PHP version: 5.6.33
Package: *General Issues
Bug Type: Bug
Bug description:Strange behaviour of array_map and call_user_func_array
Description:
------------
At one hosting that I have paid is installed this version of PHP:
PHP Version 5.6.33-1+ubuntu16.04.1+deb.sury.org+1 (from
https://launchpad.net/~ondrej/+archive/ubuntu/php/+build/14218828)
online phpinfo located here:
http://download.navrat.name/banan/phpinfo.php
When I tried deploy Nette Application to this server I got errors. After
analyzing it looks for me that it is probably bug in the PHP or hosting
configuration.
On windows 5.6.33 x64-vc11-ts it works as expected. on another hosting
with linux and version 5.5.38 or 5.6.31 it works too.
I'm trying to solve it with hosting, but there is horrible technical
support:( So no possibility to get backtrace from them. They said that
have the newest version of PHP and nobody reports error till now and
everything works. That don't want to try this script by own.
In zip file at http://download.navrat.name/banan/bug-php5.6.zip
is
located output of phpinfo.php of this hosting and windows localhost to
compare versions. Zip file contains original exception error from
Nette.
Same directory where is located zip file contains pictures with expected
and actual output.
Test script contains 4 examples.
1 not working code with callback for array_map expected same/similar
output as in 2.
2 working code with direct call of class_exists
3 working code with direct call of preg_replace_callback
4 not working code with call preg_replace_callback with
call_user_func_array expected same output as in 3.
See follow up section with link to pictures.
I don't know if it is core PHP bug or some configuration hosting bug or
some packaging.
I tried at discuss it with hosting - no success
then I tried create issue on package deb package creator:
https://github.com/oerdnj/deb.sury.org/issues/788
and he thought that
isn't package replated and recommend create issue here.
Test script:
---------------
Test script is located here:
http://download.navrat.name/banan/test.php.txt
resp.
http://download.navrat.name/banan/test.php
as executable version without first two lines that enable error/warning
output.
Expected result:
----------------
another hosting company php 5.5.38
http://download.navrat.name/banan/lezeni-test-pipni-updated.png
or development machine windows php 5.6.33
http://download.navrat.name/banan/lezeni-test-localhost-updated.png
Actual result:
--------------
paid hosting
http://download.navrat.name/banan/lezeni-test-banan-updated.png
same hosting just enabled display_errors
http://download.navrat.name/banan/lezeni-test-banan-errors-enabled.pnp.PNG
--
Edit bug report at https://bugs.php.net/bug.php?id=75847&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75847&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75847&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75847&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75847&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75847&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75847&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75847&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75847&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75847&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75847&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75847&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75847&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75847&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75847&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75847&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75847&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75847&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75847&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75847&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75847&r=mysqlcfg