Invalide OpCode and php sort function

折月煮酒 提交于 2019-12-13 06:01:20

问题


Didn't change anything lately but I started to get the infamouse PHP Fatal error: Invalid opcode 153/1/8

a small php -v showed:

PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli) (built: Aug 23 2013 15:06:16) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v1.0-dev, Copyright (c) 2004-2012 eAccelerator, by eAccelerator

To be honest, I wasn't aware we used eAccelerator before. I think the hoster upgraded php or changed something in php.ini because I'm sure I didn't touch the code meanwhile..

Anyway my question is: since the Fatal error is shown on the line where I have:

uasort($tabWsFull, function($a, $b) { 
  return $b['bk'] - $a['bk']; 
});

Is there something I can do to fix from within the code ? (without deactivating eAcceleator) maybe rewriting the uasort function ?

All the help is welcome, thx for all.


回答1:


I am not sure but still try

function mySort($a,$b){
  return $b['bk'] - $a['bk']; 
}

uasort($tabWsFull,'mySort');


来源:https://stackoverflow.com/questions/20841026/invalide-opcode-and-php-sort-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!