PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - Zend - zend_vm_execute.h (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 9275 16793 55.2 %
Date: 2015-07-26 Functions: 582 994 58.6 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | Zend Engine                                                          |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 2.00 of the Zend license,     |
       8             :    | that is bundled with this package in the file LICENSE, and is        |
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.zend.com/license/2_00.txt.                                |
      11             :    | If you did not receive a copy of the Zend license and are unable to  |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@zend.com so we can mail you a copy immediately.              |
      14             :    +----------------------------------------------------------------------+
      15             :    | Authors: Andi Gutmans <andi@zend.com>                                |
      16             :    |          Zeev Suraski <zeev@zend.com>                                |
      17             :    |          Dmitry Stogov <dmitry@zend.com>                             |
      18             :    +----------------------------------------------------------------------+
      19             : */
      20             : 
      21             : #ifdef ZEND_WIN32
      22             : # pragma warning(once : 4101)
      23             : # pragma warning(once : 6235)
      24             : # pragma warning(once : 6237)
      25             : # pragma warning(once : 6239)
      26             : # pragma warning(once : 6240)
      27             : # pragma warning(once : 6285)
      28             : # pragma warning(once : 6286)
      29             : # pragma warning(once : 6326)
      30             : #endif
      31             : static user_opcode_handler_t zend_user_opcode_handlers[256] = {
      32             :         (user_opcode_handler_t)NULL,
      33             :         (user_opcode_handler_t)NULL,
      34             :         (user_opcode_handler_t)NULL,
      35             :         (user_opcode_handler_t)NULL,
      36             :         (user_opcode_handler_t)NULL,
      37             :         (user_opcode_handler_t)NULL,
      38             :         (user_opcode_handler_t)NULL,
      39             :         (user_opcode_handler_t)NULL,
      40             :         (user_opcode_handler_t)NULL,
      41             :         (user_opcode_handler_t)NULL,
      42             :         (user_opcode_handler_t)NULL,
      43             :         (user_opcode_handler_t)NULL,
      44             :         (user_opcode_handler_t)NULL,
      45             :         (user_opcode_handler_t)NULL,
      46             :         (user_opcode_handler_t)NULL,
      47             :         (user_opcode_handler_t)NULL,
      48             :         (user_opcode_handler_t)NULL,
      49             :         (user_opcode_handler_t)NULL,
      50             :         (user_opcode_handler_t)NULL,
      51             :         (user_opcode_handler_t)NULL,
      52             :         (user_opcode_handler_t)NULL,
      53             :         (user_opcode_handler_t)NULL,
      54             :         (user_opcode_handler_t)NULL,
      55             :         (user_opcode_handler_t)NULL,
      56             :         (user_opcode_handler_t)NULL,
      57             :         (user_opcode_handler_t)NULL,
      58             :         (user_opcode_handler_t)NULL,
      59             :         (user_opcode_handler_t)NULL,
      60             :         (user_opcode_handler_t)NULL,
      61             :         (user_opcode_handler_t)NULL,
      62             :         (user_opcode_handler_t)NULL,
      63             :         (user_opcode_handler_t)NULL,
      64             :         (user_opcode_handler_t)NULL,
      65             :         (user_opcode_handler_t)NULL,
      66             :         (user_opcode_handler_t)NULL,
      67             :         (user_opcode_handler_t)NULL,
      68             :         (user_opcode_handler_t)NULL,
      69             :         (user_opcode_handler_t)NULL,
      70             :         (user_opcode_handler_t)NULL,
      71             :         (user_opcode_handler_t)NULL,
      72             :         (user_opcode_handler_t)NULL,
      73             :         (user_opcode_handler_t)NULL,
      74             :         (user_opcode_handler_t)NULL,
      75             :         (user_opcode_handler_t)NULL,
      76             :         (user_opcode_handler_t)NULL,
      77             :         (user_opcode_handler_t)NULL,
      78             :         (user_opcode_handler_t)NULL,
      79             :         (user_opcode_handler_t)NULL,
      80             :         (user_opcode_handler_t)NULL,
      81             :         (user_opcode_handler_t)NULL,
      82             :         (user_opcode_handler_t)NULL,
      83             :         (user_opcode_handler_t)NULL,
      84             :         (user_opcode_handler_t)NULL,
      85             :         (user_opcode_handler_t)NULL,
      86             :         (user_opcode_handler_t)NULL,
      87             :         (user_opcode_handler_t)NULL,
      88             :         (user_opcode_handler_t)NULL,
      89             :         (user_opcode_handler_t)NULL,
      90             :         (user_opcode_handler_t)NULL,
      91             :         (user_opcode_handler_t)NULL,
      92             :         (user_opcode_handler_t)NULL,
      93             :         (user_opcode_handler_t)NULL,
      94             :         (user_opcode_handler_t)NULL,
      95             :         (user_opcode_handler_t)NULL,
      96             :         (user_opcode_handler_t)NULL,
      97             :         (user_opcode_handler_t)NULL,
      98             :         (user_opcode_handler_t)NULL,
      99             :         (user_opcode_handler_t)NULL,
     100             :         (user_opcode_handler_t)NULL,
     101             :         (user_opcode_handler_t)NULL,
     102             :         (user_opcode_handler_t)NULL,
     103             :         (user_opcode_handler_t)NULL,
     104             :         (user_opcode_handler_t)NULL,
     105             :         (user_opcode_handler_t)NULL,
     106             :         (user_opcode_handler_t)NULL,
     107             :         (user_opcode_handler_t)NULL,
     108             :         (user_opcode_handler_t)NULL,
     109             :         (user_opcode_handler_t)NULL,
     110             :         (user_opcode_handler_t)NULL,
     111             :         (user_opcode_handler_t)NULL,
     112             :         (user_opcode_handler_t)NULL,
     113             :         (user_opcode_handler_t)NULL,
     114             :         (user_opcode_handler_t)NULL,
     115             :         (user_opcode_handler_t)NULL,
     116             :         (user_opcode_handler_t)NULL,
     117             :         (user_opcode_handler_t)NULL,
     118             :         (user_opcode_handler_t)NULL,
     119             :         (user_opcode_handler_t)NULL,
     120             :         (user_opcode_handler_t)NULL,
     121             :         (user_opcode_handler_t)NULL,
     122             :         (user_opcode_handler_t)NULL,
     123             :         (user_opcode_handler_t)NULL,
     124             :         (user_opcode_handler_t)NULL,
     125             :         (user_opcode_handler_t)NULL,
     126             :         (user_opcode_handler_t)NULL,
     127             :         (user_opcode_handler_t)NULL,
     128             :         (user_opcode_handler_t)NULL,
     129             :         (user_opcode_handler_t)NULL,
     130             :         (user_opcode_handler_t)NULL,
     131             :         (user_opcode_handler_t)NULL,
     132             :         (user_opcode_handler_t)NULL,
     133             :         (user_opcode_handler_t)NULL,
     134             :         (user_opcode_handler_t)NULL,
     135             :         (user_opcode_handler_t)NULL,
     136             :         (user_opcode_handler_t)NULL,
     137             :         (user_opcode_handler_t)NULL,
     138             :         (user_opcode_handler_t)NULL,
     139             :         (user_opcode_handler_t)NULL,
     140             :         (user_opcode_handler_t)NULL,
     141             :         (user_opcode_handler_t)NULL,
     142             :         (user_opcode_handler_t)NULL,
     143             :         (user_opcode_handler_t)NULL,
     144             :         (user_opcode_handler_t)NULL,
     145             :         (user_opcode_handler_t)NULL,
     146             :         (user_opcode_handler_t)NULL,
     147             :         (user_opcode_handler_t)NULL,
     148             :         (user_opcode_handler_t)NULL,
     149             :         (user_opcode_handler_t)NULL,
     150             :         (user_opcode_handler_t)NULL,
     151             :         (user_opcode_handler_t)NULL,
     152             :         (user_opcode_handler_t)NULL,
     153             :         (user_opcode_handler_t)NULL,
     154             :         (user_opcode_handler_t)NULL,
     155             :         (user_opcode_handler_t)NULL,
     156             :         (user_opcode_handler_t)NULL,
     157             :         (user_opcode_handler_t)NULL,
     158             :         (user_opcode_handler_t)NULL,
     159             :         (user_opcode_handler_t)NULL,
     160             :         (user_opcode_handler_t)NULL,
     161             :         (user_opcode_handler_t)NULL,
     162             :         (user_opcode_handler_t)NULL,
     163             :         (user_opcode_handler_t)NULL,
     164             :         (user_opcode_handler_t)NULL,
     165             :         (user_opcode_handler_t)NULL,
     166             :         (user_opcode_handler_t)NULL,
     167             :         (user_opcode_handler_t)NULL,
     168             :         (user_opcode_handler_t)NULL,
     169             :         (user_opcode_handler_t)NULL,
     170             :         (user_opcode_handler_t)NULL,
     171             :         (user_opcode_handler_t)NULL,
     172             :         (user_opcode_handler_t)NULL,
     173             :         (user_opcode_handler_t)NULL,
     174             :         (user_opcode_handler_t)NULL,
     175             :         (user_opcode_handler_t)NULL,
     176             :         (user_opcode_handler_t)NULL,
     177             :         (user_opcode_handler_t)NULL,
     178             :         (user_opcode_handler_t)NULL,
     179             :         (user_opcode_handler_t)NULL,
     180             :         (user_opcode_handler_t)NULL,
     181             :         (user_opcode_handler_t)NULL,
     182             :         (user_opcode_handler_t)NULL,
     183             :         (user_opcode_handler_t)NULL,
     184             :         (user_opcode_handler_t)NULL,
     185             :         (user_opcode_handler_t)NULL,
     186             :         (user_opcode_handler_t)NULL,
     187             :         (user_opcode_handler_t)NULL,
     188             :         (user_opcode_handler_t)NULL,
     189             :         (user_opcode_handler_t)NULL,
     190             :         (user_opcode_handler_t)NULL,
     191             :         (user_opcode_handler_t)NULL,
     192             :         (user_opcode_handler_t)NULL,
     193             :         (user_opcode_handler_t)NULL,
     194             :         (user_opcode_handler_t)NULL,
     195             :         (user_opcode_handler_t)NULL,
     196             :         (user_opcode_handler_t)NULL,
     197             :         (user_opcode_handler_t)NULL,
     198             :         (user_opcode_handler_t)NULL,
     199             :         (user_opcode_handler_t)NULL,
     200             :         (user_opcode_handler_t)NULL,
     201             :         (user_opcode_handler_t)NULL,
     202             :         (user_opcode_handler_t)NULL,
     203             :         (user_opcode_handler_t)NULL,
     204             :         (user_opcode_handler_t)NULL,
     205             :         (user_opcode_handler_t)NULL,
     206             :         (user_opcode_handler_t)NULL,
     207             :         (user_opcode_handler_t)NULL,
     208             :         (user_opcode_handler_t)NULL,
     209             :         (user_opcode_handler_t)NULL,
     210             :         (user_opcode_handler_t)NULL,
     211             :         (user_opcode_handler_t)NULL,
     212             :         (user_opcode_handler_t)NULL,
     213             :         (user_opcode_handler_t)NULL,
     214             :         (user_opcode_handler_t)NULL,
     215             :         (user_opcode_handler_t)NULL,
     216             :         (user_opcode_handler_t)NULL,
     217             :         (user_opcode_handler_t)NULL,
     218             :         (user_opcode_handler_t)NULL,
     219             :         (user_opcode_handler_t)NULL,
     220             :         (user_opcode_handler_t)NULL,
     221             :         (user_opcode_handler_t)NULL,
     222             :         (user_opcode_handler_t)NULL,
     223             :         (user_opcode_handler_t)NULL,
     224             :         (user_opcode_handler_t)NULL,
     225             :         (user_opcode_handler_t)NULL,
     226             :         (user_opcode_handler_t)NULL,
     227             :         (user_opcode_handler_t)NULL,
     228             :         (user_opcode_handler_t)NULL,
     229             :         (user_opcode_handler_t)NULL,
     230             :         (user_opcode_handler_t)NULL,
     231             :         (user_opcode_handler_t)NULL,
     232             :         (user_opcode_handler_t)NULL,
     233             :         (user_opcode_handler_t)NULL,
     234             :         (user_opcode_handler_t)NULL,
     235             :         (user_opcode_handler_t)NULL,
     236             :         (user_opcode_handler_t)NULL,
     237             :         (user_opcode_handler_t)NULL,
     238             :         (user_opcode_handler_t)NULL,
     239             :         (user_opcode_handler_t)NULL,
     240             :         (user_opcode_handler_t)NULL,
     241             :         (user_opcode_handler_t)NULL,
     242             :         (user_opcode_handler_t)NULL,
     243             :         (user_opcode_handler_t)NULL,
     244             :         (user_opcode_handler_t)NULL,
     245             :         (user_opcode_handler_t)NULL,
     246             :         (user_opcode_handler_t)NULL,
     247             :         (user_opcode_handler_t)NULL,
     248             :         (user_opcode_handler_t)NULL,
     249             :         (user_opcode_handler_t)NULL,
     250             :         (user_opcode_handler_t)NULL,
     251             :         (user_opcode_handler_t)NULL,
     252             :         (user_opcode_handler_t)NULL,
     253             :         (user_opcode_handler_t)NULL,
     254             :         (user_opcode_handler_t)NULL,
     255             :         (user_opcode_handler_t)NULL,
     256             :         (user_opcode_handler_t)NULL,
     257             :         (user_opcode_handler_t)NULL,
     258             :         (user_opcode_handler_t)NULL,
     259             :         (user_opcode_handler_t)NULL,
     260             :         (user_opcode_handler_t)NULL,
     261             :         (user_opcode_handler_t)NULL,
     262             :         (user_opcode_handler_t)NULL,
     263             :         (user_opcode_handler_t)NULL,
     264             :         (user_opcode_handler_t)NULL,
     265             :         (user_opcode_handler_t)NULL,
     266             :         (user_opcode_handler_t)NULL,
     267             :         (user_opcode_handler_t)NULL,
     268             :         (user_opcode_handler_t)NULL,
     269             :         (user_opcode_handler_t)NULL,
     270             :         (user_opcode_handler_t)NULL,
     271             :         (user_opcode_handler_t)NULL,
     272             :         (user_opcode_handler_t)NULL,
     273             :         (user_opcode_handler_t)NULL,
     274             :         (user_opcode_handler_t)NULL,
     275             :         (user_opcode_handler_t)NULL,
     276             :         (user_opcode_handler_t)NULL,
     277             :         (user_opcode_handler_t)NULL,
     278             :         (user_opcode_handler_t)NULL,
     279             :         (user_opcode_handler_t)NULL,
     280             :         (user_opcode_handler_t)NULL,
     281             :         (user_opcode_handler_t)NULL,
     282             :         (user_opcode_handler_t)NULL,
     283             :         (user_opcode_handler_t)NULL,
     284             :         (user_opcode_handler_t)NULL,
     285             :         (user_opcode_handler_t)NULL,
     286             :         (user_opcode_handler_t)NULL,
     287             :         (user_opcode_handler_t)NULL
     288             : };
     289             : 
     290             : static zend_uchar zend_user_opcodes[256] = {0,
     291             :         1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
     292             :         17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
     293             :         33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
     294             :         49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,
     295             :         65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,
     296             :         81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,
     297             :         97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,
     298             :         113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,
     299             :         129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,
     300             :         145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,
     301             :         161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,
     302             :         177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,
     303             :         193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,
     304             :         209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,
     305             :         225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,
     306             :         241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
     307             : };
     308             : 
     309             : static const void **zend_opcode_handlers;
     310             : static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op);
     311             : 
     312             : 
     313             : #ifdef ZEND_VM_FP_GLOBAL_REG
     314             : register zend_execute_data *execute_data __asm__(ZEND_VM_FP_GLOBAL_REG);
     315             : #endif
     316             : 
     317             : #ifdef ZEND_VM_IP_GLOBAL_REG
     318             : register const zend_op *opline __asm__(ZEND_VM_IP_GLOBAL_REG);
     319             : #endif
     320             : 
     321             : #ifdef ZEND_VM_FP_GLOBAL_REG
     322             : # define ZEND_OPCODE_HANDLER_ARGS void
     323             : # define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU
     324             : # define ZEND_OPCODE_HANDLER_ARGS_DC
     325             : # define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC
     326             : #else
     327             : # define ZEND_OPCODE_HANDLER_ARGS zend_execute_data *execute_data
     328             : # define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU execute_data
     329             : # define ZEND_OPCODE_HANDLER_ARGS_DC , ZEND_OPCODE_HANDLER_ARGS
     330             : # define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC , ZEND_OPCODE_HANDLER_ARGS_PASSTHRU
     331             : #endif
     332             : 
     333             : #if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
     334             : # define ZEND_OPCODE_HANDLER_RET void
     335             : # define ZEND_VM_TAIL_CALL(call) call; return
     336             : # define ZEND_VM_CONTINUE()      return
     337             : # define ZEND_VM_RETURN()        opline = NULL; ZEND_VM_CONTINUE()
     338             : #else
     339             : # define ZEND_OPCODE_HANDLER_RET int
     340             : # define ZEND_VM_TAIL_CALL(call) return call
     341             : # define ZEND_VM_CONTINUE()      return  0
     342             : # define ZEND_VM_RETURN()        return -1
     343             : #endif
     344             : 
     345             : typedef ZEND_OPCODE_HANDLER_RET (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS);
     346             : 
     347             : #undef OPLINE
     348             : #undef DCL_OPLINE
     349             : #undef USE_OPLINE
     350             : #undef LOAD_OPLINE
     351             : #undef SAVE_OPLINE
     352             : #define DCL_OPLINE
     353             : #ifdef ZEND_VM_IP_GLOBAL_REG
     354             : # define OPLINE opline
     355             : # define USE_OPLINE
     356             : # define LOAD_OPLINE() opline = EX(opline)
     357             : # define SAVE_OPLINE() EX(opline) = opline
     358             : #else
     359             : # define OPLINE EX(opline)
     360             : # define USE_OPLINE const zend_op *opline = EX(opline);
     361             : # define LOAD_OPLINE()
     362             : # define SAVE_OPLINE()
     363             : #endif
     364             : #undef CHECK_EXCEPTION
     365             : #undef HANDLE_EXCEPTION
     366             : #undef HANDLE_EXCEPTION_LEAVE
     367             : #define CHECK_EXCEPTION() LOAD_OPLINE()
     368             : #define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()
     369             : #define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()
     370             : #if defined(ZEND_VM_FP_GLOBAL_REG)
     371             : # define ZEND_VM_ENTER()           execute_data = EG(current_execute_data); LOAD_OPLINE(); ZEND_VM_CONTINUE()
     372             : # define ZEND_VM_LEAVE()           ZEND_VM_CONTINUE()
     373             : #elif defined(ZEND_VM_IP_GLOBAL_REG)
     374             : # define ZEND_VM_ENTER()           opline = EG(current_execute_data)->opline; return 1
     375             : # define ZEND_VM_LEAVE()           return  2
     376             : #else
     377             : # define ZEND_VM_ENTER()           return  1
     378             : # define ZEND_VM_LEAVE()           return  2
     379             : #endif
     380             : #define ZEND_VM_DISPATCH(opcode, opline) ZEND_VM_TAIL_CALL(((opcode_handler_t)zend_vm_get_opcode_handler(opcode, opline))(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
     381             : 
     382             : 
     383     2917234 : ZEND_API void execute_ex(zend_execute_data *ex)
     384             : {
     385             :         DCL_OPLINE
     386             : 
     387             : #ifdef ZEND_VM_IP_GLOBAL_REG
     388             :         const zend_op *orig_opline = opline;
     389             : #endif
     390             : #ifdef ZEND_VM_FP_GLOBAL_REG
     391             :         zend_execute_data *orig_execute_data = execute_data;
     392             :         execute_data = ex;
     393             : #else
     394     2917234 :         zend_execute_data *execute_data = ex;
     395             : #endif
     396             : 
     397             : 
     398             :         LOAD_OPLINE();
     399             : 
     400             :         while (1) {
     401             :         int ret;
     402             : #if defined(ZEND_VM_FP_GLOBAL_REG) && defined(ZEND_VM_IP_GLOBAL_REG)
     403             :                 ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
     404             :                 if (UNEXPECTED(!OPLINE)) {
     405             : #else
     406   234551446 :                 if (UNEXPECTED((ret = ((opcode_handler_t)OPLINE->handler)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)) != 0)) {
     407             : #endif
     408             : #ifdef ZEND_VM_FP_GLOBAL_REG
     409             :                         execute_data = orig_execute_data;
     410             : # ifdef ZEND_VM_IP_GLOBAL_REG
     411             :                         opline = orig_opline;
     412             : # endif
     413             :                         return;
     414             : #else
     415     6006262 :                         if (EXPECTED(ret > 0)) {
     416     3090295 :                                 execute_data = EG(current_execute_data);
     417             :                         } else {
     418             : # ifdef ZEND_VM_IP_GLOBAL_REG
     419             :                                 opline = orig_opline;
     420             : # endif
     421     2915967 :                                 return;
     422             :                         }
     423             : #endif
     424             :                 }
     425             : 
     426   231634212 :         }
     427             :         zend_error_noreturn(E_CORE_ERROR, "Arrived at end of main loop which shouldn't happen");
     428             : }
     429             : 
     430       20871 : ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value)
     431             : {
     432             :         zend_execute_data *execute_data;
     433             : 
     434       20871 :         if (EG(exception) != NULL) {
     435           0 :                 return;
     436             :         }
     437             : 
     438       62613 :         execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE,
     439       41742 :                 (zend_function*)op_array, 0, zend_get_called_scope(EG(current_execute_data)), zend_get_this_object(EG(current_execute_data)));
     440       20871 :         if (EG(current_execute_data)) {
     441         151 :                 execute_data->symbol_table = zend_rebuild_symbol_table();
     442             :         } else {
     443       20720 :                 execute_data->symbol_table = &EG(symbol_table);
     444             :         }
     445       20871 :         EX(prev_execute_data) = EG(current_execute_data);
     446             :         i_init_execute_data(execute_data, op_array, return_value);
     447       20871 :         zend_execute_ex(execute_data);
     448             :         zend_vm_stack_free_call_frame(execute_data);
     449             : }
     450             : 
     451     2008763 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     452             : {
     453             :         zend_execute_data *old_execute_data;
     454     2008763 :         uint32_t call_info = EX_CALL_INFO();
     455             : 
     456     2008763 :         if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_FUNCTION) {
     457             :                 zend_object *object;
     458             : 
     459             :                 i_free_compiled_variables(execute_data);
     460     1535896 :                 if (UNEXPECTED(EX(symbol_table) != NULL)) {
     461       87762 :                         zend_clean_and_cache_symbol_table(EX(symbol_table));
     462             :                 }
     463             :                 zend_vm_stack_free_extra_args_ex(call_info, execute_data);
     464     1535896 :                 old_execute_data = execute_data;
     465     1535896 :                 execute_data = EG(current_execute_data) = EX(prev_execute_data);
     466     1535896 :                 if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
     467         502 :                         OBJ_RELEASE((zend_object*)old_execute_data->func->op_array.prototype);
     468             :                 }
     469     1535896 :                 if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
     470      100364 :                         object = Z_OBJ(old_execute_data->This);
     471             : #if 0
     472             :                         if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR)) {
     473             :                                 if (!(EX(opline)->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     474             : #else
     475      100364 :                         if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
     476          34 :                                 if (!(call_info & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     477             : #endif
     478          22 :                                         GC_REFCOUNT(object)--;
     479             :                                 }
     480          34 :                                 if (GC_REFCOUNT(object) == 1) {
     481          33 :                                         zend_object_store_ctor_failed(object);
     482             :                                 }
     483             :                         }
     484             :                         OBJ_RELEASE(object);
     485             :                 }
     486     1535896 :                 EG(scope) = EX(func)->op_array.scope;
     487             : 
     488             :                 zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
     489             : 
     490     1535896 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     491         451 :                         const zend_op *old_opline = EX(opline);
     492         451 :                         zend_throw_exception_internal(NULL);
     493         451 :                         if (RETURN_VALUE_USED(old_opline)) {
     494         185 :                                 zval_ptr_dtor(EX_VAR(old_opline->result.var));
     495             :                         }
     496         451 :                         HANDLE_EXCEPTION_LEAVE();
     497             :                 }
     498             : 
     499             :                 LOAD_OPLINE();
     500     1535445 :                 ZEND_VM_INC_OPCODE();
     501     1535445 :                 ZEND_VM_LEAVE();
     502      472867 :         } else if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_NESTED_CODE) {
     503        8789 :                 zend_detach_symbol_table(execute_data);
     504        8789 :                 destroy_op_array(&EX(func)->op_array);
     505        8789 :                 efree_size(EX(func), sizeof(zend_op_array));
     506        8789 :                 old_execute_data = execute_data;
     507        8789 :                 execute_data = EG(current_execute_data) = EX(prev_execute_data);
     508             :                 zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
     509             : 
     510        8789 :                 zend_attach_symbol_table(execute_data);
     511        8789 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     512          24 :                         zend_throw_exception_internal(NULL);
     513          24 :                         HANDLE_EXCEPTION_LEAVE();
     514             :                 }
     515             : 
     516             :                 LOAD_OPLINE();
     517        8765 :                 ZEND_VM_INC_OPCODE();
     518        8765 :                 ZEND_VM_LEAVE();
     519             :         } else {
     520      464078 :                 if (ZEND_CALL_KIND_EX(call_info) == ZEND_CALL_TOP_FUNCTION) {
     521             :                         i_free_compiled_variables(execute_data);
     522      444436 :                         if (UNEXPECTED(EX(symbol_table) != NULL)) {
     523          75 :                                 zend_clean_and_cache_symbol_table(EX(symbol_table));
     524             :                         }
     525             :                         zend_vm_stack_free_extra_args_ex(call_info, execute_data);
     526      444436 :                         EG(current_execute_data) = EX(prev_execute_data);
     527      444436 :                         if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
     528         429 :                                 OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
     529             :                         }
     530             :                 } else /* if (call_kind == ZEND_CALL_TOP_CODE) */ {
     531       19642 :                         zend_array *symbol_table = EX(symbol_table);
     532             : 
     533       19642 :                         zend_detach_symbol_table(execute_data);
     534       19642 :                         old_execute_data = EX(prev_execute_data);
     535       39439 :                         while (old_execute_data) {
     536         306 :                                 if (old_execute_data->func && ZEND_USER_CODE(old_execute_data->func->op_array.type)) {
     537         151 :                                         if (old_execute_data->symbol_table == symbol_table) {
     538         151 :                                                 zend_attach_symbol_table(old_execute_data);
     539             :                                         }
     540         151 :                                         break;
     541             :                                 }
     542         155 :                                 old_execute_data = old_execute_data->prev_execute_data;
     543             :                         }
     544       19642 :                         EG(current_execute_data) = EX(prev_execute_data);
     545             :                 }
     546             : 
     547      464078 :                 ZEND_VM_RETURN();
     548             :         }
     549             : }
     550             : 
     551     6631302 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     552             : {
     553     6631302 :         USE_OPLINE
     554             : 
     555     6631302 :         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op1));
     556     6631302 :         ZEND_VM_CONTINUE();
     557             : }
     558             : 
     559    22998331 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     560             : {
     561    22998331 :         USE_OPLINE
     562    22998331 :         zend_execute_data *call = EX(call);
     563    22998331 :         zend_function *fbc = call->func;
     564             :         zval *ret;
     565             : 
     566             :         SAVE_OPLINE();
     567    22998331 :         EX(call) = call->prev_execute_data;
     568             : 
     569    22998331 :         call->prev_execute_data = execute_data;
     570    22998331 :         EG(current_execute_data) = call;
     571             : 
     572    22998331 :         ret = EX_VAR(opline->result.var);
     573    22998331 :         ZVAL_NULL(ret);
     574    22998331 :         Z_VAR_FLAGS_P(ret) = 0;
     575             : 
     576    22998331 :         fbc->internal_function.handler(call, ret);
     577             : 
     578             : #if ZEND_DEBUG
     579             :         ZEND_ASSERT(
     580             :                 !call->func ||
     581             :                 !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
     582             :                 zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
     583             : #endif
     584             : 
     585    22998301 :         EG(current_execute_data) = call->prev_execute_data;
     586             :         zend_vm_stack_free_args(call);
     587             :         zend_vm_stack_free_call_frame(call);
     588             : 
     589    22998301 :         if (!RETURN_VALUE_USED(opline)) {
     590     1106299 :                 zval_ptr_dtor(EX_VAR(opline->result.var));
     591             :         }
     592             : 
     593    22998301 :         if (UNEXPECTED(EG(exception) != NULL)) {
     594         100 :                 zend_throw_exception_internal(NULL);
     595         100 :                 if (RETURN_VALUE_USED(opline)) {
     596          48 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     597             :                 }
     598         100 :                 HANDLE_EXCEPTION();
     599             :         }
     600             : 
     601             :         ZEND_VM_INTERRUPT_CHECK();
     602    22998201 :         ZEND_VM_NEXT_OPCODE();
     603             : }
     604             : 
     605     1017888 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     606             : {
     607     1017888 :         USE_OPLINE
     608     1017888 :         zend_execute_data *call = EX(call);
     609     1017888 :         zend_function *fbc = call->func;
     610             :         zval *ret;
     611             : 
     612             :         SAVE_OPLINE();
     613     1017888 :         EX(call) = call->prev_execute_data;
     614             : 
     615     1017888 :         EG(scope) = NULL;
     616     1017888 :         ret = NULL;
     617     1017888 :         call->symbol_table = NULL;
     618     1017888 :         if (RETURN_VALUE_USED(opline)) {
     619      940479 :                 ret = EX_VAR(opline->result.var);
     620      940479 :                 ZVAL_NULL(ret);
     621      940479 :                 Z_VAR_FLAGS_P(ret) = 0;
     622             :         }
     623             : 
     624     1017888 :         call->prev_execute_data = execute_data;
     625     1017888 :         i_init_func_execute_data(call, &fbc->op_array, ret, 0);
     626             : 
     627     1017888 :         ZEND_VM_ENTER();
     628             : }
     629             : 
     630      462911 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     631             : {
     632      462911 :         USE_OPLINE
     633      462911 :         zend_execute_data *call = EX(call);
     634      462911 :         zend_function *fbc = call->func;
     635             :         zval *ret;
     636             : 
     637             :         SAVE_OPLINE();
     638      462911 :         EX(call) = call->prev_execute_data;
     639             : 
     640      462911 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     641      462627 :                 EG(scope) = NULL;
     642      462627 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
     643       50005 :                         if (EXPECTED(RETURN_VALUE_USED(opline))) {
     644       50005 :                                 ret = EX_VAR(opline->result.var);
     645       50005 :                                 zend_generator_create_zval(call, &fbc->op_array, ret);
     646       50005 :                                 Z_VAR_FLAGS_P(ret) = 0;
     647             :                         } else {
     648             :                                 zend_vm_stack_free_args(call);
     649             :                         }
     650             : 
     651             :                         zend_vm_stack_free_call_frame(call);
     652             :                 } else {
     653      412622 :                         ret = NULL;
     654      412622 :                         call->symbol_table = NULL;
     655      412622 :                         if (RETURN_VALUE_USED(opline)) {
     656      295507 :                                 ret = EX_VAR(opline->result.var);
     657      295507 :                                 ZVAL_NULL(ret);
     658      295507 :                                 Z_VAR_FLAGS_P(ret) = 0;
     659             :                         }
     660             : 
     661      412622 :                         call->prev_execute_data = execute_data;
     662      412622 :                         i_init_func_execute_data(call, &fbc->op_array, ret, 0);
     663             : 
     664      412622 :                         ZEND_VM_ENTER();
     665             :                 }
     666       50005 :                 EG(scope) = EX(func)->op_array.scope;
     667             :         } else {
     668             :                 ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
     669             : 
     670         284 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
     671           0 :                         zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
     672           0 :                                 fbc->common.scope ? fbc->common.scope->name->val : "",
     673           0 :                                 fbc->common.scope ? "::" : "",
     674           0 :                                 fbc->common.function_name->val);
     675           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     676           0 :                                 HANDLE_EXCEPTION();
     677             :                         }
     678             :                 }
     679             : 
     680         284 :                 call->prev_execute_data = execute_data;
     681         284 :                 EG(current_execute_data) = call;
     682             : 
     683         284 :                 if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
     684             :                         uint32_t i;
     685           0 :                         uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
     686           0 :                         zval *p = ZEND_CALL_ARG(call, 1);
     687             : 
     688           0 :                         for (i = 0; i < num_args; ++i) {
     689           0 :                                 zend_verify_internal_arg_type(fbc, i + 1, p);
     690           0 :                                 p++;
     691             :                         }
     692           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     693           0 :                                 EG(current_execute_data) = call->prev_execute_data;
     694             :                                 zend_vm_stack_free_args(call);
     695             :                                 zend_vm_stack_free_call_frame(call);
     696           0 :                                 zend_throw_exception_internal(NULL);
     697           0 :                                 HANDLE_EXCEPTION();
     698             :                         }
     699             :                 }
     700             : 
     701         284 :                 ret = EX_VAR(opline->result.var);
     702         284 :                 ZVAL_NULL(ret);
     703         284 :                 Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
     704             : 
     705         284 :                 fbc->internal_function.handler(call, ret);
     706             : 
     707             : #if ZEND_DEBUG
     708             :                 ZEND_ASSERT(
     709             :                         !call->func ||
     710             :                         !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
     711             :                         zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
     712             : #endif
     713             : 
     714         284 :                 EG(current_execute_data) = call->prev_execute_data;
     715             :                 zend_vm_stack_free_args(call);
     716             :                 zend_vm_stack_free_call_frame(call);
     717             : 
     718         284 :                 if (!RETURN_VALUE_USED(opline)) {
     719         222 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     720             :                 }
     721             :         }
     722             : 
     723       50289 :         if (UNEXPECTED(EG(exception) != NULL)) {
     724           0 :                 zend_throw_exception_internal(NULL);
     725           0 :                 if (RETURN_VALUE_USED(opline)) {
     726           0 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     727             :                 }
     728           0 :                 HANDLE_EXCEPTION();
     729             :         }
     730             :         ZEND_VM_INTERRUPT_CHECK();
     731       50289 :         ZEND_VM_NEXT_OPCODE();
     732             : }
     733             : 
     734     3079473 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     735             : {
     736     3079473 :         USE_OPLINE
     737     3079473 :         zend_execute_data *call = EX(call);
     738     3079473 :         zend_function *fbc = call->func;
     739             :         zend_object *object;
     740             :         zval *ret;
     741             : 
     742             :         SAVE_OPLINE();
     743     3079473 :         EX(call) = call->prev_execute_data;
     744     3079473 :         if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
     745           5 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
     746           5 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name->val, fbc->common.function_name->val);
     747           5 :                         HANDLE_EXCEPTION();
     748             :                 }
     749           0 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
     750           0 :                         zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
     751           0 :                                 fbc->common.scope ? fbc->common.scope->name->val : "",
     752           0 :                                 fbc->common.scope ? "::" : "",
     753           0 :                                 fbc->common.function_name->val);
     754           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     755           0 :                                 HANDLE_EXCEPTION();
     756             :                         }
     757             :                 }
     758             :         }
     759             : 
     760             :         LOAD_OPLINE();
     761             : 
     762     3079468 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     763      106148 :                 EG(scope) = fbc->common.scope;
     764      106148 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
     765         385 :                         if (EXPECTED(RETURN_VALUE_USED(opline))) {
     766         383 :                                 ret = EX_VAR(opline->result.var);
     767         383 :                                 zend_generator_create_zval(call, &fbc->op_array, ret);
     768         383 :                                 Z_VAR_FLAGS_P(ret) = 0;
     769             :                         } else {
     770           2 :                                 if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_CLOSURE)) {
     771           1 :                                         OBJ_RELEASE((zend_object*)fbc->op_array.prototype);
     772             :                                 }
     773             :                                 zend_vm_stack_free_args(call);
     774             :                         }
     775             :                 } else {
     776      105763 :                         ret = NULL;
     777      105763 :                         call->symbol_table = NULL;
     778      105763 :                         if (RETURN_VALUE_USED(opline)) {
     779        3481 :                                 ret = EX_VAR(opline->result.var);
     780        3481 :                                 ZVAL_NULL(ret);
     781        3481 :                                 Z_VAR_FLAGS_P(ret) = 0;
     782             :                         }
     783             : 
     784      105763 :                         call->prev_execute_data = execute_data;
     785      105763 :                         i_init_func_execute_data(call, &fbc->op_array, ret, 1);
     786             : 
     787      105763 :                         if (EXPECTED(zend_execute_ex == execute_ex)) {
     788      105763 :                                 ZEND_VM_ENTER();
     789             :                         } else {
     790           0 :                                 ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
     791           0 :                                 zend_execute_ex(call);
     792             :                         }
     793             :                 }
     794     2973320 :         } else if (EXPECTED(fbc->type < ZEND_USER_FUNCTION)) {
     795     2973320 :                 int should_change_scope = 0;
     796             : 
     797     2973320 :                 if (fbc->common.scope) {
     798     2959476 :                         should_change_scope = 1;
     799     2959476 :                         EG(scope) = fbc->common.scope;
     800             :                 }
     801             : 
     802     2973320 :                 call->prev_execute_data = execute_data;
     803     2973320 :                 EG(current_execute_data) = call;
     804             : 
     805     2973320 :                 if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
     806             :                         uint32_t i;
     807        1374 :                         uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
     808        1374 :                         zval *p = ZEND_CALL_ARG(call, 1);
     809             : 
     810        3366 :                         for (i = 0; i < num_args; ++i) {
     811        2187 :                                 zend_verify_internal_arg_type(fbc, i + 1, p);
     812        2187 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
     813         195 :                                         EG(current_execute_data) = call->prev_execute_data;
     814             :                                         zend_vm_stack_free_args(call);
     815         195 :                                         if (RETURN_VALUE_USED(opline)) {
     816         184 :                                                 ZVAL_UNDEF(EX_VAR(opline->result.var));
     817             :                                         }
     818         195 :                                         if (UNEXPECTED(should_change_scope)) {
     819          16 :                                                 goto fcall_end_change_scope;
     820             :                                         } else {
     821         179 :                                                 goto fcall_end;
     822             :                                         }
     823             :                                 }
     824        1992 :                                 p++;
     825             :                         }
     826             :                 }
     827             : 
     828     2973125 :                 ret = EX_VAR(opline->result.var);
     829     2973125 :                 ZVAL_NULL(ret);
     830     2973125 :                 Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
     831             : 
     832     2973125 :                 if (!zend_execute_internal) {
     833             :                         /* saves one function call if zend_execute_internal is not used */
     834     2973125 :                         fbc->internal_function.handler(call, ret);
     835             :                 } else {
     836           0 :                         zend_execute_internal(call, ret);
     837             :                 }
     838             : 
     839             : #if ZEND_DEBUG
     840             :                 ZEND_ASSERT(
     841             :                         !call->func ||
     842             :                         !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
     843             :                         zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
     844             : #endif
     845             : 
     846     2972991 :                 EG(current_execute_data) = call->prev_execute_data;
     847             :                 zend_vm_stack_free_args(call);
     848             : 
     849     2972991 :                 if (!RETURN_VALUE_USED(opline)) {
     850      395099 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     851             :                 }
     852             : 
     853     2972991 :                 if (UNEXPECTED(should_change_scope)) {
     854     2959327 :                         goto fcall_end_change_scope;
     855             :                 } else {
     856       13664 :                         goto fcall_end;
     857             :                 }
     858             :         } else { /* ZEND_OVERLOADED_FUNCTION */
     859           0 :                 EG(scope) = fbc->common.scope;
     860             : 
     861           0 :                 ZVAL_NULL(EX_VAR(opline->result.var));
     862             : 
     863             :                 /* Not sure what should be done here if it's a static method */
     864           0 :                 object = Z_OBJ(call->This);
     865           0 :                 if (EXPECTED(object != NULL)) {
     866           0 :                         call->prev_execute_data = execute_data;
     867           0 :                         EG(current_execute_data) = call;
     868           0 :                         object->handlers->call_method(fbc->common.function_name, object, call, EX_VAR(opline->result.var));
     869           0 :                         EG(current_execute_data) = call->prev_execute_data;
     870             :                 } else {
     871           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call overloaded function for non-object");
     872             : #if 0
     873             :                         //TODO: implement clean exit ???
     874             :                         zend_vm_stack_free_args(call);
     875             : 
     876             :                         zend_vm_stack_free_call_frame(call);
     877             : 
     878             :                         if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
     879             :                                 zend_string_release(fbc->common.function_name);
     880             :                         }
     881             :                         efree(fbc);
     882             : #endif
     883           0 :                         HANDLE_EXCEPTION();
     884             :                 }
     885             : 
     886             :                 zend_vm_stack_free_args(call);
     887             : 
     888           0 :                 if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
     889           0 :                         zend_string_release(fbc->common.function_name);
     890             :                 }
     891           0 :                 efree(fbc);
     892             : 
     893           0 :                 if (!RETURN_VALUE_USED(opline)) {
     894           0 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     895             :                 } else {
     896           0 :                         Z_VAR_FLAGS_P(EX_VAR(opline->result.var)) = 0;
     897             :                 }
     898             :         }
     899             : 
     900             : fcall_end_change_scope:
     901     2959728 :         if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
     902     2954629 :                 object = Z_OBJ(call->This);
     903             : #if 0
     904             :                 if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
     905             :                         if (!(opline->op1.num & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     906             : #else
     907     2954629 :                 if (UNEXPECTED(EG(exception) != NULL) && (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR)) {
     908         365 :                         if (!(ZEND_CALL_INFO(call) & ZEND_CALL_CTOR_RESULT_UNUSED)) {
     909             : #endif
     910         284 :                                 GC_REFCOUNT(object)--;
     911             :                         }
     912         365 :                         if (GC_REFCOUNT(object) == 1) {
     913         365 :                                 zend_object_store_ctor_failed(object);
     914             :                         }
     915             :                 }
     916             :                 OBJ_RELEASE(object);
     917             :         }
     918     2959728 :         EG(scope) = EX(func)->op_array.scope;
     919             : 
     920             : fcall_end:
     921             :         zend_vm_stack_free_call_frame(call);
     922     2973571 :         if (UNEXPECTED(EG(exception) != NULL)) {
     923        1203 :                 zend_throw_exception_internal(NULL);
     924        1203 :                 if (RETURN_VALUE_USED(opline)) {
     925         456 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     926             :                 }
     927        1203 :                 HANDLE_EXCEPTION();
     928             :         }
     929             : 
     930             :         ZEND_VM_INTERRUPT_CHECK();
     931     2972368 :         ZEND_VM_NEXT_OPCODE();
     932             : }
     933             : 
     934          64 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_UNPACK_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     935             : {
     936          64 :         USE_OPLINE
     937             :         zend_free_op free_op1;
     938             :         zval *args;
     939             :         int arg_num;
     940             : 
     941             :         SAVE_OPLINE();
     942         128 :         args = get_zval_ptr_undef(opline->op1_type, opline->op1, execute_data, &free_op1, BP_VAR_R);
     943          64 :         arg_num = ZEND_CALL_NUM_ARGS(EX(call)) + 1;
     944             : 
     945             : send_again:
     946          64 :         if (EXPECTED(Z_TYPE_P(args) == IS_ARRAY)) {
     947          47 :                 HashTable *ht = Z_ARRVAL_P(args);
     948             :                 zval *arg, *top;
     949             :                 zend_string *name;
     950             : 
     951          47 :                 zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht));
     952             : 
     953          47 :                 if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
     954             :                         uint32_t i;
     955           0 :                         int separate = 0;
     956             : 
     957             :                         /* check if any of arguments are going to be passed by reference */
     958           0 :                         for (i = 0; i < zend_hash_num_elements(ht); i++) {
     959           0 :                                 if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + i)) {
     960           0 :                                         separate = 1;
     961           0 :                                         break;
     962             :                                 }
     963             :                         }
     964           0 :                         if (separate) {
     965             :                                 zval_copy_ctor(args);
     966           0 :                                 ht = Z_ARRVAL_P(args);
     967             :                         }
     968             :                 }
     969             : 
     970       42272 :                 ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
     971       21113 :                         if (name) {
     972           1 :                                 zend_error(E_EXCEPTION | E_ERROR, "Cannot unpack array with string keys");
     973           1 :                                 FREE_OP(free_op1);
     974           1 :                                 HANDLE_EXCEPTION();
     975             :                         }
     976             : 
     977       21112 :                         top = ZEND_CALL_ARG(EX(call), arg_num);
     978       42224 :                         if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
     979          20 :                                 if (!Z_IMMUTABLE_P(args)) {
     980          40 :                                         ZVAL_MAKE_REF(arg);
     981             :                                         Z_ADDREF_P(arg);
     982          20 :                                         ZVAL_REF(top, Z_REF_P(arg));
     983             :                                 } else {
     984           0 :                                         ZVAL_DUP(top, arg);
     985             :                                 }
     986       21092 :                         } else if (Z_ISREF_P(arg)) {
     987           7 :                                 ZVAL_COPY(top, Z_REFVAL_P(arg));
     988             :                         } else {
     989       21085 :                                 ZVAL_COPY(top, arg);
     990             :                         }
     991             : 
     992       21112 :                         ZEND_CALL_NUM_ARGS(EX(call))++;
     993       21112 :                         arg_num++;
     994             :                 } ZEND_HASH_FOREACH_END();
     995             : 
     996          17 :         } else if (EXPECTED(Z_TYPE_P(args) == IS_OBJECT)) {
     997          13 :                 zend_class_entry *ce = Z_OBJCE_P(args);
     998             :                 zend_object_iterator *iter;
     999             : 
    1000          15 :                 if (!ce || !ce->get_iterator) {
    1001           2 :                         zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
    1002             :                 } else {
    1003             : 
    1004          11 :                         iter = ce->get_iterator(ce, args, 0);
    1005          11 :                         if (UNEXPECTED(!iter)) {
    1006           1 :                                 FREE_OP(free_op1);
    1007           1 :                                 if (!EG(exception)) {
    1008           0 :                                         zend_throw_exception_ex(
    1009           0 :                                                 NULL, 0, "Object of type %s did not create an Iterator", ce->name->val
    1010             :                                         );
    1011             :                                 }
    1012           1 :                                 HANDLE_EXCEPTION();
    1013             :                         }
    1014             : 
    1015          10 :                         if (iter->funcs->rewind) {
    1016          10 :                                 iter->funcs->rewind(iter);
    1017          10 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    1018           0 :                                         goto unpack_iter_dtor;
    1019             :                                 }
    1020             :                         }
    1021             : 
    1022          31 :                         for (; iter->funcs->valid(iter) == SUCCESS; ++arg_num) {
    1023             :                                 zval *arg, *top;
    1024             : 
    1025          23 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    1026           0 :                                         goto unpack_iter_dtor;
    1027             :                                 }
    1028             : 
    1029          23 :                                 arg = iter->funcs->get_current_data(iter);
    1030          23 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    1031           0 :                                         goto unpack_iter_dtor;
    1032             :                                 }
    1033             : 
    1034          23 :                                 if (iter->funcs->get_current_key) {
    1035             :                                         zval key;
    1036          23 :                                         iter->funcs->get_current_key(iter, &key);
    1037          23 :                                         if (UNEXPECTED(EG(exception) != NULL)) {
    1038           0 :                                                 goto unpack_iter_dtor;
    1039             :                                         }
    1040             : 
    1041          23 :                                         if (Z_TYPE(key) == IS_STRING) {
    1042           1 :                                                 zend_error(E_EXCEPTION | E_ERROR,
    1043             :                                                         "Cannot unpack Traversable with string keys");
    1044           1 :                                                 zend_string_release(Z_STR(key));
    1045           1 :                                                 goto unpack_iter_dtor;
    1046             :                                         }
    1047             : 
    1048             :                                         zval_dtor(&key);
    1049             :                                 }
    1050             : 
    1051          44 :                                 if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
    1052           9 :                                         zend_error(
    1053             :                                                 E_WARNING, "Cannot pass by-reference argument %d of %s%s%s()"
    1054             :                                                 " by unpacking a Traversable, passing by-value instead", arg_num,
    1055           3 :                                                 EX(call)->func->common.scope ? EX(call)->func->common.scope->name->val : "",
    1056           3 :                                                 EX(call)->func->common.scope ? "::" : "",
    1057           3 :                                                 EX(call)->func->common.function_name->val
    1058             :                                         );
    1059             :                                 }
    1060             : 
    1061          22 :                                 if (Z_ISREF_P(arg)) {
    1062           0 :                                         ZVAL_DUP(arg, Z_REFVAL_P(arg));
    1063             :                                 } else {
    1064          22 :                                         if (Z_REFCOUNTED_P(arg)) Z_ADDREF_P(arg);
    1065             :                                 }
    1066             : 
    1067          22 :                                 zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, 1);
    1068          22 :                                 top = ZEND_CALL_ARG(EX(call), arg_num);
    1069          22 :                                 ZVAL_COPY_VALUE(top, arg);
    1070          22 :                                 ZEND_CALL_NUM_ARGS(EX(call))++;
    1071             : 
    1072          22 :                                 iter->funcs->move_forward(iter);
    1073          22 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    1074           1 :                                         goto unpack_iter_dtor;
    1075             :                                 }
    1076             :                         }
    1077             : 
    1078             : unpack_iter_dtor:
    1079          10 :                         zend_iterator_dtor(iter);
    1080             :                 }
    1081           4 :         } else if (EXPECTED(Z_ISREF_P(args))) {
    1082           0 :                 args = Z_REFVAL_P(args);
    1083           0 :                 goto send_again;
    1084             :         } else {
    1085           4 :                 if (opline->op1_type == IS_CV && UNEXPECTED(Z_TYPE_P(args) == IS_UNDEF)) {
    1086           0 :                         GET_OP1_UNDEF_CV(args, BP_VAR_R);
    1087             :                 }
    1088           4 :                 zend_error(E_WARNING, "Only arrays and Traversables can be unpacked");
    1089             :         }
    1090             : 
    1091          62 :         FREE_OP(free_op1);
    1092             :         CHECK_EXCEPTION();
    1093          62 :         ZEND_VM_NEXT_OPCODE();
    1094             : }
    1095             : 
    1096         163 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1097             : {
    1098         163 :         USE_OPLINE
    1099             :         zend_free_op free_op1;
    1100             :         zval *args;
    1101             :         SAVE_OPLINE();
    1102             : 
    1103             :         SAVE_OPLINE();
    1104         326 :         args = get_zval_ptr(opline->op1_type, opline->op1, execute_data, &free_op1, BP_VAR_R);
    1105             : 
    1106         163 :         if (UNEXPECTED(Z_TYPE_P(args) != IS_ARRAY)) {
    1107         100 :                 if ((opline->op1_type & (IS_VAR|IS_CV)) && Z_ISREF_P(args)) {
    1108          25 :                         args = Z_REFVAL_P(args);
    1109          25 :                         if (EXPECTED(Z_TYPE_P(args) == IS_ARRAY)) {
    1110          25 :                                 goto send_array;
    1111             :                         }
    1112             :                 }
    1113          25 :                 zend_internal_type_error(EX_USES_STRICT_TYPES(), "call_user_func_array() expects parameter 2 to be array, %s given", zend_get_type_by_const(Z_TYPE_P(args)));
    1114          25 :                 if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
    1115           0 :                         OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
    1116             :                 }
    1117          25 :                 if (Z_OBJ(EX(call)->This)) {
    1118           0 :                         OBJ_RELEASE(Z_OBJ(EX(call)->This));
    1119             :                 }
    1120          25 :                 EX(call)->func = (zend_function*)&zend_pass_function;
    1121          25 :                 EX(call)->called_scope = NULL;
    1122          25 :                 Z_OBJ(EX(call)->This) = NULL;
    1123             :         } else {
    1124             :                 uint32_t arg_num;
    1125             :                 HashTable *ht;
    1126             :                 zval *arg, *param;
    1127             : 
    1128             : send_array:
    1129         138 :                 ht = Z_ARRVAL_P(args);
    1130         138 :                 zend_vm_stack_extend_call_frame(&EX(call), 0, zend_hash_num_elements(ht));
    1131             : 
    1132         138 :                 if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_IMMUTABLE_P(args)) {
    1133           0 :                         int separate = 0;
    1134             : 
    1135             :                         /* check if any of arguments are going to be passed by reference */
    1136           0 :                         for (arg_num = 0; arg_num < zend_hash_num_elements(ht); arg_num++) {
    1137           0 :                                 if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num + 1)) {
    1138           0 :                                         separate = 1;
    1139           0 :                                         break;
    1140             :                                 }
    1141             :                         }
    1142           0 :                         if (separate) {
    1143             :                                 zval_copy_ctor(args);
    1144           0 :                                 ht = Z_ARRVAL_P(args);
    1145             :                         }
    1146             :                 }
    1147             : 
    1148         138 :                 arg_num = 1;
    1149         138 :                 param = ZEND_CALL_ARG(EX(call), 1);
    1150      133815 :                 ZEND_HASH_FOREACH_VAL(ht, arg) {
    1151      133680 :                         if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
    1152       66540 :                                 if (UNEXPECTED(!Z_ISREF_P(arg))) {
    1153           8 :                                         if (!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, arg_num)) {
    1154             : 
    1155           9 :                                                 zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given",
    1156             :                                                         arg_num,
    1157           3 :                                                         EX(call)->func->common.scope ? EX(call)->func->common.scope->name->val : "",
    1158           3 :                                                         EX(call)->func->common.scope ? "::" : "",
    1159           3 :                                                         EX(call)->func->common.function_name->val);
    1160             : 
    1161           3 :                                                 if (ZEND_CALL_INFO(EX(call)) & ZEND_CALL_CLOSURE) {
    1162           1 :                                                         OBJ_RELEASE((zend_object*)EX(call)->func->common.prototype);
    1163             :                                                 }
    1164           3 :                                                 if (Z_OBJ(EX(call)->This)) {
    1165           0 :                                                         OBJ_RELEASE(Z_OBJ(EX(call)->This));
    1166             :                                                 }
    1167           3 :                                                 EX(call)->func = (zend_function*)&zend_pass_function;
    1168           3 :                                                 EX(call)->called_scope = NULL;
    1169           3 :                                                 Z_OBJ(EX(call)->This) = NULL;
    1170             : 
    1171           3 :                                                 break;
    1172             :                                         }
    1173             : 
    1174           1 :                                         ZVAL_NEW_REF(arg, arg);
    1175             :                                 }
    1176             :                                 Z_ADDREF_P(arg);
    1177             :                         } else{
    1178         311 :                                 if (Z_ISREF_P(arg) &&
    1179          11 :                                     !(EX(call)->func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
    1180             :                                         /* don't separate references for __call */
    1181           9 :                                         arg = Z_REFVAL_P(arg);
    1182             :                                 }
    1183         300 :                                 if (Z_OPT_REFCOUNTED_P(arg)) {
    1184             :                                         Z_ADDREF_P(arg);
    1185             :                                 }
    1186             :                         }
    1187       66837 :                         ZVAL_COPY_VALUE(param, arg);
    1188       66837 :                         ZEND_CALL_NUM_ARGS(EX(call))++;
    1189       66837 :                         arg_num++;
    1190       66837 :                         param++;
    1191             :                 } ZEND_HASH_FOREACH_END();
    1192             :         }
    1193         163 :         FREE_OP(free_op1);
    1194             :         CHECK_EXCEPTION();
    1195         163 :         ZEND_VM_NEXT_OPCODE();
    1196             : }
    1197             : 
    1198        1083 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1199             : {
    1200        1083 :         USE_OPLINE
    1201        1083 :         uint32_t arg_num = opline->op1.num;
    1202             : 
    1203        1083 :         if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
    1204             :                 SAVE_OPLINE();
    1205         148 :                 if (UNEXPECTED(!zend_verify_missing_arg(execute_data, arg_num, CACHE_ADDR(opline->op2.num)))) {
    1206           9 :                         HANDLE_EXCEPTION();
    1207             :                 }
    1208        1009 :         } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
    1209        2018 :                 zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
    1210             : 
    1211             :                 SAVE_OPLINE();
    1212        2018 :                 if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)))) {
    1213         135 :                         HANDLE_EXCEPTION();
    1214             :                 }
    1215             :         }
    1216             : 
    1217         939 :         ZEND_VM_NEXT_OPCODE();
    1218             : }
    1219             : 
    1220          47 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_VARIADIC_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1221             : {
    1222          47 :         USE_OPLINE
    1223          47 :         uint32_t arg_num = opline->op1.num;
    1224          47 :         uint32_t arg_count = EX_NUM_ARGS();
    1225             :         zval *params;
    1226             : 
    1227             :         SAVE_OPLINE();
    1228             : 
    1229          94 :         params = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
    1230             : 
    1231          47 :         if (arg_num <= arg_count) {
    1232             :                 zval *param;
    1233             : 
    1234          32 :                 array_init_size(params, arg_count - arg_num + 1);
    1235          32 :                 zend_hash_real_init(Z_ARRVAL_P(params), 1);
    1236          32 :                 ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(params)) {
    1237          32 :                         param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
    1238          32 :                         if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
    1239             :                                 do {
    1240           9 :                                         zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num));
    1241           9 :                                         if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
    1242           9 :                                         ZEND_HASH_FILL_ADD(param);
    1243           9 :                                         param++;
    1244           9 :                                 } while (++arg_num <= arg_count);
    1245             :                         } else {
    1246             :                                 do {
    1247       21120 :                                         if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
    1248       21120 :                                         ZEND_HASH_FILL_ADD(param);
    1249       21120 :                                         param++;
    1250       21120 :                                 } while (++arg_num <= arg_count);
    1251             :                         }
    1252          32 :                 } ZEND_HASH_FILL_END();
    1253             :         } else {
    1254          15 :                 array_init(params);
    1255             :         }
    1256             : 
    1257             :         CHECK_EXCEPTION();
    1258          47 :         ZEND_VM_NEXT_OPCODE();
    1259             : }
    1260             : 
    1261     1525246 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1262             : {
    1263     1525246 :         USE_OPLINE
    1264             : 
    1265     1525246 :         ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting));
    1266             : 
    1267     1525246 :         if (EG(error_reporting)) {
    1268             :                 do {
    1269     1252469 :                         EG(error_reporting) = 0;
    1270     1252469 :                         if (!EG(error_reporting_ini_entry)) {
    1271        4376 :                                 zend_ini_entry *p = zend_hash_str_find_ptr(EG(ini_directives), "error_reporting", sizeof("error_reporting")-1);
    1272        2188 :                                 if (p) {
    1273        2188 :                                         EG(error_reporting_ini_entry) = p;
    1274             :                                 } else {
    1275           0 :                                         break;
    1276             :                                 }
    1277             :                         }
    1278     1252469 :                         if (!EG(error_reporting_ini_entry)->modified) {
    1279        2188 :                                 if (!EG(modified_ini_directives)) {
    1280        1641 :                                         ALLOC_HASHTABLE(EG(modified_ini_directives));
    1281        1641 :                                         zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
    1282             :                                 }
    1283        4376 :                                 if (EXPECTED(zend_hash_str_add_ptr(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting")-1, EG(error_reporting_ini_entry)) != NULL)) {
    1284        2188 :                                         EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
    1285        2188 :                                         EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
    1286        2188 :                                         EG(error_reporting_ini_entry)->modified = 1;
    1287             :                                 }
    1288             :                         }
    1289             :                 } while (0);
    1290             :         }
    1291     1525246 :         ZEND_VM_NEXT_OPCODE();
    1292             : }
    1293             : 
    1294           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_STMT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1295             : {
    1296           0 :         if (!EG(no_extensions)) {
    1297             :                 SAVE_OPLINE();
    1298           0 :                 zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(func));
    1299             :                 CHECK_EXCEPTION();
    1300             :         }
    1301           0 :         ZEND_VM_NEXT_OPCODE();
    1302             : }
    1303             : 
    1304           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1305             : {
    1306           0 :         if (!EG(no_extensions)) {
    1307             :                 SAVE_OPLINE();
    1308           0 :                 zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(func));
    1309             :                 CHECK_EXCEPTION();
    1310             :         }
    1311           0 :         ZEND_VM_NEXT_OPCODE();
    1312             : }
    1313             : 
    1314           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_FCALL_END_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1315             : {
    1316           0 :         if (!EG(no_extensions)) {
    1317             :                 SAVE_OPLINE();
    1318           0 :                 zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(func));
    1319             :                 CHECK_EXCEPTION();
    1320             :         }
    1321           0 :         ZEND_VM_NEXT_OPCODE();
    1322             : }
    1323             : 
    1324         445 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1325             : {
    1326         445 :         USE_OPLINE
    1327             : 
    1328             :         SAVE_OPLINE();
    1329         445 :         Z_CE_P(EX_VAR(opline->result.var)) = do_bind_class(&EX(func)->op_array, opline, EG(class_table), 0);
    1330             :         CHECK_EXCEPTION();
    1331         437 :         ZEND_VM_NEXT_OPCODE();
    1332             : }
    1333             : 
    1334        1291 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1335             : {
    1336        1291 :         USE_OPLINE
    1337             : 
    1338             :         SAVE_OPLINE();
    1339        1291 :         Z_CE_P(EX_VAR(opline->result.var)) = do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0);
    1340             :         CHECK_EXCEPTION();
    1341        1288 :         ZEND_VM_NEXT_OPCODE();
    1342             : }
    1343             : 
    1344           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1345             : {
    1346           0 :         USE_OPLINE
    1347             :         zval *zce, *orig_zce;
    1348             : 
    1349             :         SAVE_OPLINE();
    1350           0 :         if ((zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)))) == NULL ||
    1351           0 :             ((orig_zce = zend_hash_find(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)))) != NULL &&
    1352           0 :              Z_CE_P(zce) != Z_CE_P(orig_zce))) {
    1353           0 :                 do_bind_inherited_class(&EX(func)->op_array, opline, EG(class_table), Z_CE_P(EX_VAR(opline->extended_value)), 0);
    1354             :         }
    1355             :         CHECK_EXCEPTION();
    1356           0 :         ZEND_VM_NEXT_OPCODE();
    1357             : }
    1358             : 
    1359          21 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1360             : {
    1361             :         zend_class_entry *ce;
    1362          21 :         USE_OPLINE
    1363             : 
    1364             :         SAVE_OPLINE();
    1365          42 :         ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)));
    1366          21 :         Z_CE_P(EX_VAR(opline->result.var)) = ce;
    1367             :         ZEND_ASSERT(ce != NULL);
    1368             : 
    1369          21 :         if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
    1370          10 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
    1371             :         }
    1372             : 
    1373          11 :         if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))) {
    1374           9 :                 zend_verify_abstract_class(ce);
    1375             :         }
    1376          11 :         ce->ce_flags |= ZEND_ACC_ANON_BOUND;
    1377             :         CHECK_EXCEPTION();
    1378          11 :         ZEND_VM_NEXT_OPCODE();
    1379             : }
    1380             : 
    1381           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1382             : {
    1383             :         zend_class_entry *ce;
    1384           2 :         USE_OPLINE
    1385             : 
    1386             :         SAVE_OPLINE();
    1387           4 :         ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op2)));
    1388           2 :         Z_CE_P(EX_VAR(opline->result.var)) = ce;
    1389             :         ZEND_ASSERT(ce != NULL);
    1390             : 
    1391           2 :         if (ce->ce_flags & ZEND_ACC_ANON_BOUND) {
    1392           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
    1393             :         }
    1394             : 
    1395           2 :         zend_do_inheritance(ce, Z_CE_P(EX_VAR(opline->extended_value)));
    1396           2 :         ce->ce_flags |= ZEND_ACC_ANON_BOUND;
    1397             :         CHECK_EXCEPTION();
    1398           2 :         ZEND_VM_NEXT_OPCODE();
    1399             : }
    1400             : 
    1401        2878 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1402             : {
    1403        2878 :         USE_OPLINE
    1404             : 
    1405             :         SAVE_OPLINE();
    1406        2878 :         do_bind_function(&EX(func)->op_array, opline, EG(function_table), 0);
    1407             :         CHECK_EXCEPTION();
    1408        2878 :         ZEND_VM_NEXT_OPCODE();
    1409             : }
    1410             : 
    1411          34 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1412             : {
    1413          34 :         USE_OPLINE
    1414             : 
    1415          34 :         if ((uint32_t)++EG(ticks_count) >= opline->extended_value) {
    1416          34 :                 EG(ticks_count) = 0;
    1417          34 :                 if (zend_ticks_function) {
    1418             :                         SAVE_OPLINE();
    1419          34 :                         zend_ticks_function(opline->extended_value);
    1420             :                         CHECK_EXCEPTION();
    1421             :                 }
    1422             :         }
    1423          34 :         ZEND_VM_NEXT_OPCODE();
    1424             : }
    1425             : 
    1426           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXT_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1427             : {
    1428           0 :         ZEND_VM_NEXT_OPCODE();
    1429             : }
    1430             : 
    1431      445849 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1432             : {
    1433      445849 :         ZEND_VM_NEXT_OPCODE();
    1434             : }
    1435             : 
    1436         250 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1437             : {
    1438         250 :         USE_OPLINE
    1439         250 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    1440             :         zend_class_entry *trait;
    1441             : 
    1442             :         SAVE_OPLINE();
    1443         250 :         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    1444           0 :                 trait = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    1445             :         } else {
    1446         500 :                 trait = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)),
    1447         500 :                                                  EX_CONSTANT(opline->op2) + 1,
    1448             :                                                  ZEND_FETCH_CLASS_TRAIT);
    1449         248 :                 if (UNEXPECTED(trait == NULL)) {
    1450             :                         CHECK_EXCEPTION();
    1451           0 :                         ZEND_VM_NEXT_OPCODE();
    1452             :                 }
    1453         248 :                 if (!(trait->ce_flags & ZEND_ACC_TRAIT)) {
    1454           4 :                         zend_error_noreturn(E_ERROR, "%s cannot use %s - it is not a trait", ce->name->val, trait->name->val);
    1455             :                 }
    1456         244 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), trait);
    1457             :         }
    1458             : 
    1459         244 :         zend_do_implement_trait(ce, trait);
    1460             : 
    1461             :         CHECK_EXCEPTION();
    1462         244 :         ZEND_VM_NEXT_OPCODE();
    1463             : }
    1464             : 
    1465         181 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_TRAITS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1466             : {
    1467         181 :         USE_OPLINE
    1468         181 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    1469             : 
    1470             :         SAVE_OPLINE();
    1471         181 :         zend_do_bind_traits(ce);
    1472             :         CHECK_EXCEPTION();
    1473         138 :         ZEND_VM_NEXT_OPCODE();
    1474             : }
    1475             : 
    1476        3123 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1477             : {
    1478        3123 :         uint32_t op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
    1479             :         int i;
    1480        3123 :         uint32_t catch_op_num = 0, finally_op_num = 0, finally_op_end = 0;
    1481        3123 :         int in_finally = 0;
    1482             : 
    1483             :         ZEND_VM_INTERRUPT_CHECK();
    1484        7128 :         for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
    1485        4613 :                 if (EX(func)->op_array.try_catch_array[i].try_op > op_num) {
    1486             :                         /* further blocks will not be relevant... */
    1487         608 :                         break;
    1488             :                 }
    1489        4005 :                 in_finally = 0;
    1490        4005 :                 if (op_num < EX(func)->op_array.try_catch_array[i].catch_op) {
    1491        1949 :                         catch_op_num = EX(func)->op_array.try_catch_array[i].catch_op;
    1492             :                 }
    1493        4005 :                 if (op_num < EX(func)->op_array.try_catch_array[i].finally_op) {
    1494          49 :                         finally_op_num = EX(func)->op_array.try_catch_array[i].finally_op;
    1495          49 :                         finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
    1496             :                 }
    1497        7961 :                 if (op_num >= EX(func)->op_array.try_catch_array[i].finally_op &&
    1498        3956 :                                 op_num < EX(func)->op_array.try_catch_array[i].finally_end) {
    1499          16 :                         finally_op_end = EX(func)->op_array.try_catch_array[i].finally_end;
    1500          16 :                         in_finally = 1;
    1501             :                 }
    1502             :         }
    1503             : 
    1504             :         i_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
    1505             : 
    1506        3123 :         if (finally_op_num && (!catch_op_num || catch_op_num >= finally_op_num)) {
    1507          15 :                 zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
    1508             : 
    1509          15 :                 if (in_finally && Z_OBJ_P(fast_call)) {
    1510           0 :                         zend_exception_set_previous(EG(exception), Z_OBJ_P(fast_call));
    1511             :                 }
    1512          15 :                 Z_OBJ_P(fast_call) = EG(exception);
    1513          15 :                 EG(exception) = NULL;
    1514          15 :                 fast_call->u2.lineno = (uint32_t)-1;
    1515          15 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[finally_op_num]);
    1516          15 :                 ZEND_VM_CONTINUE();
    1517             :         } else {
    1518        3108 :                 if (in_finally) {
    1519             :                         /* we are going out of current finally scope */
    1520           9 :                         zval *fast_call = EX_VAR(EX(func)->op_array.opcodes[finally_op_end].op1.var);
    1521             : 
    1522           9 :                         if (Z_OBJ_P(fast_call)) {
    1523           2 :                                 zend_exception_set_previous(EG(exception), Z_OBJ_P(fast_call));
    1524           2 :                                 Z_OBJ_P(fast_call) = NULL;
    1525             :                         }
    1526             :                 }
    1527        3108 :                 if (catch_op_num) {
    1528        1916 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[catch_op_num]);
    1529        1916 :                         ZEND_VM_CONTINUE();
    1530        1192 :                 } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
    1531          26 :                         zend_generator *generator = zend_get_running_generator(execute_data);
    1532          26 :                         zend_generator_close(generator, 1);
    1533          26 :                         ZEND_VM_RETURN();
    1534             :                 } else {
    1535        1166 :                         ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    1536             :                 }
    1537             :         }
    1538             : }
    1539             : 
    1540         257 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1541             : {
    1542         257 :         USE_OPLINE
    1543             : 
    1544             :         SAVE_OPLINE();
    1545         257 :         zend_verify_abstract_class(Z_CE_P(EX_VAR(opline->op1.var)));
    1546             :         CHECK_EXCEPTION();
    1547         252 :         ZEND_VM_NEXT_OPCODE();
    1548             : }
    1549             : 
    1550           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1551             : {
    1552           0 :         USE_OPLINE
    1553             :         int ret;
    1554             : 
    1555             :         SAVE_OPLINE();
    1556           0 :         ret = zend_user_opcode_handlers[opline->opcode](execute_data);
    1557             :         LOAD_OPLINE();
    1558             : 
    1559           0 :         switch (ret) {
    1560             :                 case ZEND_USER_OPCODE_CONTINUE:
    1561           0 :                         ZEND_VM_CONTINUE();
    1562             :                 case ZEND_USER_OPCODE_RETURN:
    1563           0 :                         if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
    1564           0 :                                 zend_generator *generator = zend_get_running_generator(execute_data);
    1565           0 :                                 zend_generator_close(generator, 1);
    1566           0 :                                 ZEND_VM_RETURN();
    1567             :                         } else {
    1568           0 :                                 ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    1569             :                         }
    1570             :                 case ZEND_USER_OPCODE_ENTER:
    1571           0 :                         ZEND_VM_ENTER();
    1572             :                 case ZEND_USER_OPCODE_LEAVE:
    1573           0 :                         ZEND_VM_LEAVE();
    1574             :                 case ZEND_USER_OPCODE_DISPATCH:
    1575           0 :                         ZEND_VM_DISPATCH(opline->opcode, opline);
    1576             :                 default:
    1577           0 :                         ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), opline);
    1578             :         }
    1579             : }
    1580             : 
    1581           8 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DISCARD_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1582             : {
    1583           8 :         USE_OPLINE
    1584           8 :         zval *fast_call = EX_VAR(opline->op1.var);
    1585             : 
    1586             :         /* check for delayed exception */
    1587           8 :         if (Z_OBJ_P(fast_call) != NULL) {
    1588             :                 SAVE_OPLINE();
    1589             :                 /* discard the previously thrown exception */
    1590           2 :                 OBJ_RELEASE(Z_OBJ_P(fast_call));
    1591           2 :                 Z_OBJ_P(fast_call) = NULL;
    1592             :         }
    1593             : 
    1594           8 :         ZEND_VM_NEXT_OPCODE();
    1595             : }
    1596             : 
    1597          54 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1598             : {
    1599          54 :         USE_OPLINE
    1600          54 :         zval *fast_call = EX_VAR(opline->result.var);
    1601             : 
    1602          61 :         if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) &&
    1603           7 :             UNEXPECTED(EG(prev_exception) != NULL)) {
    1604             :             /* in case of unhandled exception jump to catch block instead of finally */
    1605           0 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
    1606           0 :                 ZEND_VM_CONTINUE();
    1607             :         }
    1608             :         /* set no delayed exception */
    1609          54 :         Z_OBJ_P(fast_call) = NULL;
    1610             :         /* set return address */
    1611          54 :         fast_call->u2.lineno = opline - EX(func)->op_array.opcodes;
    1612          54 :         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op1));
    1613          54 :         ZEND_VM_CONTINUE();
    1614             : }
    1615             : 
    1616          53 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1617             : {
    1618          53 :         USE_OPLINE
    1619          53 :         zval *fast_call = EX_VAR(opline->op1.var);
    1620             : 
    1621          53 :         if (fast_call->u2.lineno != (uint32_t)-1) {
    1622          35 :                 const zend_op *fast_ret = EX(func)->op_array.opcodes + fast_call->u2.lineno;
    1623          35 :                 ZEND_VM_SET_OPCODE(fast_ret + 1);
    1624          35 :                 if (fast_ret->extended_value & ZEND_FAST_CALL_FROM_FINALLY) {
    1625           7 :                         fast_call->u2.lineno = fast_ret->op2.opline_num;
    1626             :                 }
    1627          35 :                 ZEND_VM_CONTINUE();
    1628             :         } else {
    1629             :                 /* special case for unhandled exceptions */
    1630          18 :                 USE_OPLINE
    1631             : 
    1632          18 :                 if (opline->extended_value == ZEND_FAST_RET_TO_FINALLY) {
    1633           5 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
    1634           5 :                         ZEND_VM_CONTINUE();
    1635             :                 } else {
    1636          13 :                         EG(exception) = Z_OBJ_P(fast_call);
    1637          13 :                         Z_OBJ_P(fast_call) = NULL;
    1638          13 :                         if (opline->extended_value == ZEND_FAST_RET_TO_CATCH) {
    1639           5 :                                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]);
    1640           5 :                                 ZEND_VM_CONTINUE();
    1641           8 :                         } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_GENERATOR) != 0)) {
    1642           4 :                                 zend_generator *generator = zend_get_running_generator(execute_data);
    1643           4 :                                 zend_generator_close(generator, 1);
    1644           4 :                                 ZEND_VM_RETURN();
    1645             :                         } else {
    1646           4 :                                 ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    1647             :                         }
    1648             :                 }
    1649             :         }
    1650             : }
    1651             : 
    1652      100293 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSERT_CHECK_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1653             : {
    1654      100293 :         USE_OPLINE
    1655             : 
    1656      100293 :         if (EG(assertions) <= 0) {
    1657          17 :                 zend_op *target = OP_JMP_ADDR(opline, opline->op2);
    1658             : 
    1659          17 :                 if (RETURN_VALUE_USED(target-1)) {
    1660           7 :                         ZVAL_TRUE(EX_VAR((target-1)->result.var));
    1661             :                 }
    1662          17 :                 ZEND_VM_JMP(target);
    1663             :         } else {
    1664      100276 :                 ZEND_VM_NEXT_OPCODE();
    1665             :         }
    1666             : }
    1667             : 
    1668          35 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1669             : {
    1670             :         uint32_t fetch_type;
    1671          35 :         USE_OPLINE
    1672             : 
    1673             :         SAVE_OPLINE();
    1674          35 :         fetch_type = opline->extended_value;
    1675             : 
    1676          35 :         if (UNEXPECTED(EG(scope) == NULL)) {
    1677           3 :                 zend_error(E_EXCEPTION | E_ERROR, "Cannot use \"%s\" when no class scope is active",
    1678             :                         fetch_type == ZEND_FETCH_CLASS_SELF ? "self" :
    1679             :                         fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static");
    1680           3 :                 HANDLE_EXCEPTION();
    1681             :         }
    1682             : 
    1683          32 :         switch (fetch_type) {
    1684             :                 case ZEND_FETCH_CLASS_SELF:
    1685          15 :                         ZVAL_STR_COPY(EX_VAR(opline->result.var), EG(scope)->name);
    1686          15 :                         break;
    1687             :                 case ZEND_FETCH_CLASS_PARENT:
    1688           3 :                         if (UNEXPECTED(EG(scope)->parent == NULL)) {
    1689           1 :                                 zend_error(E_EXCEPTION | E_ERROR,
    1690             :                                         "Cannot use \"parent\" when current class scope has no parent");
    1691           1 :                                 HANDLE_EXCEPTION();
    1692             :                         }
    1693           2 :                         ZVAL_STR_COPY(EX_VAR(opline->result.var), EG(scope)->parent->name);
    1694           2 :                         break;
    1695             :                 case ZEND_FETCH_CLASS_STATIC:
    1696          14 :                         ZVAL_STR_COPY(EX_VAR(opline->result.var), EX(called_scope)->name);
    1697             :                         break;
    1698             :                 EMPTY_SWITCH_DEFAULT_CASE()
    1699             :         }
    1700          31 :         ZEND_VM_NEXT_OPCODE();
    1701             : }
    1702             : 
    1703         493 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1704             : {
    1705             :         zend_array *args;
    1706         493 :         zend_function *fbc = EX(func);
    1707         493 :         zend_object *object = Z_OBJ(EX(This));
    1708         493 :         zval *ret = EX(return_value);
    1709         493 :         uint32_t call_info = EX_CALL_INFO() & (ZEND_CALL_NESTED | ZEND_CALL_TOP | ZEND_CALL_RELEASE_THIS);
    1710         493 :         zend_class_entry *scope = EX(called_scope);
    1711         493 :         uint32_t num_args = EX_NUM_ARGS();
    1712             :         zend_execute_data *call;
    1713         493 :         USE_OPLINE
    1714             : 
    1715         493 :         args = emalloc(sizeof(zend_array));
    1716         493 :         zend_hash_init(args, num_args, NULL, ZVAL_PTR_DTOR, 0);
    1717         493 :         if (num_args) {
    1718         335 :                 zval *p = ZEND_CALL_ARG(execute_data, 1);
    1719         335 :                 zval *end = p + num_args;
    1720             : 
    1721         335 :                 zend_hash_real_init(args, 1);
    1722         335 :                 ZEND_HASH_FILL_PACKED(args) {
    1723             :                         do {
    1724         448 :                                 ZEND_HASH_FILL_ADD(p);
    1725         448 :                                 p++;
    1726         448 :                         } while (p != end);
    1727         335 :                 } ZEND_HASH_FILL_END();
    1728             :         }
    1729             : 
    1730             :         SAVE_OPLINE();
    1731         493 :         call = execute_data;
    1732         493 :         execute_data = EG(current_execute_data) = EX(prev_execute_data);
    1733             :         zend_vm_stack_free_call_frame(call);
    1734         986 :         call = zend_vm_stack_push_call_frame(call_info, fbc->common.prototype, 2, scope, object);
    1735         493 :         call->prev_execute_data = execute_data;
    1736             : 
    1737         493 :         ZVAL_STR(ZEND_CALL_ARG(call, 1), fbc->common.function_name);
    1738         493 :         ZVAL_ARR(ZEND_CALL_ARG(call, 2), args);
    1739         493 :         zend_free_trampoline(fbc);
    1740         493 :         fbc = call->func;
    1741             : 
    1742         493 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
    1743             : 
    1744             :                 ZEND_ASSERT(!(fbc->common.fn_flags & ZEND_ACC_GENERATOR));
    1745             : 
    1746         168 :                 call->symbol_table = NULL;
    1747         168 :                 i_init_func_execute_data(call, &fbc->op_array,
    1748         168 :                                 ret, (fbc->common.fn_flags & ZEND_ACC_STATIC) == 0);
    1749             : 
    1750         168 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    1751         168 :                         ZEND_VM_ENTER();
    1752             :                 } else {
    1753           0 :                         ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
    1754           0 :                         zend_execute_ex(call);
    1755             :                 }
    1756             :         } else {
    1757             :                 zval retval;
    1758             : 
    1759             :                 ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION);
    1760             : 
    1761         325 :                 EG(current_execute_data) = call;
    1762             : 
    1763         325 :                 if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
    1764             :                         uint32_t i;
    1765           0 :                         uint32_t num_args = ZEND_CALL_NUM_ARGS(call);
    1766           0 :                         zval *p = ZEND_CALL_ARG(call, 1);
    1767             : 
    1768           0 :                         EG(current_execute_data) = call;
    1769             : 
    1770           0 :                         for (i = 0; i < num_args; ++i) {
    1771           0 :                                 zend_verify_internal_arg_type(fbc, i + 1, p);
    1772           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    1773           0 :                                         EG(current_execute_data) = call->prev_execute_data;
    1774             :                                         zend_vm_stack_free_args(call);
    1775             :                                         zend_vm_stack_free_call_frame(call);
    1776           0 :                                         if (ret) {
    1777           0 :                                                 ZVAL_UNDEF(ret);
    1778             :                                         }
    1779           0 :                                         goto call_trampoline_end;
    1780             :                                 }
    1781           0 :                                 p++;
    1782             :                         }
    1783             :                 }
    1784             : 
    1785         325 :                 if (ret == NULL) {
    1786         257 :                         ZVAL_NULL(&retval);
    1787         257 :                         ret = &retval;
    1788             :                 }
    1789         325 :                 Z_VAR_FLAGS_P(ret) = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0 ? IS_VAR_RET_REF : 0;
    1790             : 
    1791         325 :                 if (!zend_execute_internal) {
    1792             :                         /* saves one function call if zend_execute_internal is not used */
    1793         325 :                         fbc->internal_function.handler(call, ret);
    1794             :                 } else {
    1795           0 :                         zend_execute_internal(call, ret);
    1796             :                 }
    1797             : 
    1798             : #if ZEND_DEBUG
    1799             :                 ZEND_ASSERT(
    1800             :                         !call->func ||
    1801             :                         !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) ||
    1802             :                         zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var)));
    1803             : #endif
    1804             : 
    1805         317 :                 EG(current_execute_data) = call->prev_execute_data;
    1806             : 
    1807             :                 zend_vm_stack_free_args(call);
    1808             : 
    1809         317 :                 if (ret == &retval) {
    1810             :                         zval_ptr_dtor(ret);
    1811             :                 }
    1812             :         }
    1813             : 
    1814             : call_trampoline_end:
    1815         317 :         execute_data = EG(current_execute_data);
    1816             : 
    1817         317 :         if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) {
    1818           0 :                 ZEND_VM_RETURN();
    1819             :         }
    1820             : 
    1821         317 :         opline = EX(opline);
    1822             : 
    1823         317 :         if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
    1824         317 :                 object = Z_OBJ(call->This);
    1825             :                 OBJ_RELEASE(object);
    1826             :         }
    1827         317 :         EG(scope) = EX(func)->op_array.scope;
    1828             :         zend_vm_stack_free_call_frame(call);
    1829             : 
    1830         317 :         if (UNEXPECTED(EG(exception) != NULL)) {
    1831           4 :                 zend_throw_exception_internal(NULL);
    1832           4 :                 if (RETURN_VALUE_USED(opline)) {
    1833           2 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
    1834             :                 }
    1835           4 :                 HANDLE_EXCEPTION_LEAVE();
    1836             :         }
    1837             : 
    1838         313 :         ZEND_VM_INC_OPCODE();
    1839         313 :         ZEND_VM_LEAVE();
    1840             : }
    1841             : 
    1842        1295 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1843             : {
    1844        1295 :         USE_OPLINE
    1845             : 
    1846             :         SAVE_OPLINE();
    1847        1295 :         if (EG(exception)) {
    1848           0 :                 zend_exception_save();
    1849             :         }
    1850        1295 :         if (IS_CONST == IS_UNUSED) {
    1851             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
    1852             :                 CHECK_EXCEPTION();
    1853             :                 ZEND_VM_NEXT_OPCODE();
    1854             :         } else {
    1855             : 
    1856        1295 :                 zval *class_name = EX_CONSTANT(opline->op2);
    1857             : 
    1858             : try_class_name:
    1859             :                 if (IS_CONST == IS_CONST) {
    1860        1295 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    1861           0 :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    1862             :                         } else {
    1863        1295 :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
    1864        1294 :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    1865             :                         }
    1866             :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    1867             :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    1868             :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    1869             :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value);
    1870             :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(class_name) == IS_REFERENCE) {
    1871             :                         class_name = Z_REFVAL_P(class_name);
    1872             :                         goto try_class_name;
    1873             :                 } else {
    1874             :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
    1875             :                                 GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
    1876             :                         }
    1877             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    1878             :                                 HANDLE_EXCEPTION();
    1879             :                         }
    1880             :                         zend_error(E_EXCEPTION | E_ERROR, "Class name must be a valid object or a string");
    1881             :                 }
    1882             : 
    1883             :                 CHECK_EXCEPTION();
    1884        1294 :                 ZEND_VM_NEXT_OPCODE();
    1885             :         }
    1886             : }
    1887             : 
    1888      462591 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1889             : {
    1890      462591 :         USE_OPLINE
    1891             :         zend_function *fbc;
    1892             :         zval *function_name, *func;
    1893             :         zend_execute_data *call;
    1894             : 
    1895      462591 :         if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
    1896      459741 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    1897             :         } else {
    1898        2850 :                 function_name = (zval*)(EX_CONSTANT(opline->op2)+1);
    1899        2850 :                 if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(function_name))) == NULL)) {
    1900             :                         SAVE_OPLINE();
    1901          17 :                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    1902          17 :                         HANDLE_EXCEPTION();
    1903             :                 } else {
    1904        2833 :                         fbc = Z_FUNC_P(func);
    1905        2833 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
    1906             :                 }
    1907             :         }
    1908      925148 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    1909             :                 fbc, opline->extended_value, NULL, NULL);
    1910      462574 :         call->prev_execute_data = EX(call);
    1911      462574 :         EX(call) = call;
    1912             : 
    1913      462574 :         ZEND_VM_NEXT_OPCODE();
    1914             : }
    1915             : 
    1916           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1917             : {
    1918           1 :         USE_OPLINE
    1919             :         zend_function *fbc;
    1920             :         zval *function_name, *func;
    1921             :         zend_string *lcname;
    1922             : 
    1923             :         zend_class_entry *called_scope;
    1924             :         zend_object *object;
    1925             :         zend_execute_data *call;
    1926           1 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
    1927             : 
    1928             :         SAVE_OPLINE();
    1929           1 :         function_name = EX_CONSTANT(opline->op2);
    1930             : 
    1931             : try_function_name:
    1932           1 :         if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    1933             :                 const char *colon;
    1934             : 
    1935             :                 if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
    1936             :                         colon > Z_STRVAL_P(function_name) &&
    1937             :                         *(colon-1) == ':'
    1938             :                 ) {
    1939             :                         zend_string *mname;
    1940             :                         size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
    1941             :                         size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
    1942             : 
    1943             :                         if (!mname_length) {
    1944             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    1945             : 
    1946             :                                 HANDLE_EXCEPTION();
    1947             :                         }
    1948             : 
    1949             :                         lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
    1950             : 
    1951             :                         called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    1952             :                         if (UNEXPECTED(called_scope == NULL)) {
    1953             :                                 zend_string_release(lcname);
    1954             :                                 CHECK_EXCEPTION();
    1955             :                                 ZEND_VM_NEXT_OPCODE();
    1956             :                         }
    1957             : 
    1958             :                         mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
    1959             : 
    1960             :                         if (called_scope->get_static_method) {
    1961             :                                 fbc = called_scope->get_static_method(called_scope, mname);
    1962             :                         } else {
    1963             :                                 fbc = zend_std_get_static_method(called_scope, mname, NULL);
    1964             :                         }
    1965             :                         if (UNEXPECTED(fbc == NULL)) {
    1966             :                                 if (EXPECTED(!EG(exception))) {
    1967             :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, mname->val);
    1968             :                                 }
    1969             :                                 zend_string_release(lcname);
    1970             :                                 zend_string_release(mname);
    1971             : 
    1972             :                                 HANDLE_EXCEPTION();
    1973             :                         }
    1974             : 
    1975             :                         zend_string_release(lcname);
    1976             :                         zend_string_release(mname);
    1977             : 
    1978             :                         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    1979             :                                 if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    1980             :                                         zend_error(E_DEPRECATED,
    1981             :                                                 "Non-static method %s::%s() should not be called statically",
    1982             :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    1983             :                                 } else {
    1984             :                                         zend_error(
    1985             :                                                 E_EXCEPTION | E_ERROR,
    1986             :                                                 "Non-static method %s::%s() cannot be called statically",
    1987             :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    1988             : 
    1989             :                                         HANDLE_EXCEPTION();
    1990             :                                 }
    1991             :                         }
    1992             :                 } else {
    1993             :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    1994             :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    1995             :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    1996             :                         } else {
    1997             :                                 lcname = zend_string_tolower(Z_STR_P(function_name));
    1998             :                         }
    1999             :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    2000             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2001             :                                 zend_string_release(lcname);
    2002             : 
    2003             :                                 HANDLE_EXCEPTION();
    2004             :                         }
    2005             :                         zend_string_release(lcname);
    2006             : 
    2007             :                         fbc = Z_FUNC_P(func);
    2008             :                         called_scope = NULL;
    2009             :                         object = NULL;
    2010             :                 }
    2011             : 
    2012           1 :         } else if (IS_CONST != IS_CONST &&
    2013             :             EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    2014             :                 Z_OBJ_HANDLER_P(function_name, get_closure) &&
    2015             :                 Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
    2016             :                 if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    2017             :                         /* Delay closure destruction until its invocation */
    2018             :                         ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
    2019             :                         GC_REFCOUNT(fbc->common.prototype)++;
    2020             :                         call_info |= ZEND_CALL_CLOSURE;
    2021             :                 }
    2022             : 
    2023           3 :         } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    2024           1 :                         zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    2025             :                 zval *obj;
    2026             :                 zval *method;
    2027           1 :                 obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    2028           1 :                 method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    2029             : 
    2030           1 :                 if (!obj || !method) {
    2031           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Array callback has to contain indices 0 and 1");
    2032             : 
    2033           0 :                         HANDLE_EXCEPTION();
    2034             :                 }
    2035             : 
    2036           1 :                 ZVAL_DEREF(obj);
    2037           1 :                 if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    2038           0 :                         zend_error(E_EXCEPTION | E_ERROR, "First array member is not a valid class name or object");
    2039             : 
    2040           0 :                         HANDLE_EXCEPTION();
    2041             :                 }
    2042             : 
    2043           1 :                 ZVAL_DEREF(method);
    2044           1 :                 if (Z_TYPE_P(method) != IS_STRING) {
    2045           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Second array member is not a valid method");
    2046             : 
    2047           0 :                         HANDLE_EXCEPTION();
    2048             :                 }
    2049             : 
    2050           1 :                 if (Z_TYPE_P(obj) == IS_STRING) {
    2051           1 :                         object = NULL;
    2052           1 :                         called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    2053           1 :                         if (UNEXPECTED(called_scope == NULL)) {
    2054             :                                 CHECK_EXCEPTION();
    2055           0 :                                 ZEND_VM_NEXT_OPCODE();
    2056             :                         }
    2057             : 
    2058           1 :                         if (called_scope->get_static_method) {
    2059           0 :                                 fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
    2060             :                         } else {
    2061           1 :                                 fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
    2062             :                         }
    2063           1 :                         if (UNEXPECTED(fbc == NULL)) {
    2064           0 :                                 if (EXPECTED(!EG(exception))) {
    2065           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    2066             :                                 }
    2067             : 
    2068           0 :                                 HANDLE_EXCEPTION();
    2069             :                         }
    2070           1 :                         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2071           0 :                                 if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2072           0 :                                         zend_error(E_DEPRECATED,
    2073             :                                                 "Non-static method %s::%s() should not be called statically",
    2074           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2075             :                                 } else {
    2076           0 :                                         zend_error(
    2077             :                                                 E_EXCEPTION | E_ERROR,
    2078             :                                                 "Non-static method %s::%s() cannot be called statically",
    2079           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2080             : 
    2081           0 :                                         HANDLE_EXCEPTION();
    2082             :                                 }
    2083             :                         }
    2084             :                 } else {
    2085           0 :                         called_scope = Z_OBJCE_P(obj);
    2086           0 :                         object = Z_OBJ_P(obj);
    2087             : 
    2088           0 :                         fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
    2089           0 :                         if (UNEXPECTED(fbc == NULL)) {
    2090           0 :                                 if (EXPECTED(!EG(exception))) {
    2091           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    2092             :                                 }
    2093             : 
    2094           0 :                                 HANDLE_EXCEPTION();
    2095             :                         }
    2096             : 
    2097           0 :                         if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    2098           0 :                                 object = NULL;
    2099             :                         } else {
    2100           0 :                                 call_info |= ZEND_CALL_RELEASE_THIS;
    2101           0 :                                 GC_REFCOUNT(object)++; /* For $this pointer */
    2102             :                         }
    2103             :                 }
    2104             : 
    2105           0 :         } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
    2106             :                 function_name = Z_REFVAL_P(function_name);
    2107             :                 goto try_function_name;
    2108             :         } else {
    2109           0 :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    2110             :                         GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    2111             :                 }
    2112           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2113           0 :                         HANDLE_EXCEPTION();
    2114             :                 }
    2115           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Function name must be a string");
    2116             : 
    2117           0 :                 HANDLE_EXCEPTION();
    2118             :         }
    2119           2 :         call = zend_vm_stack_push_call_frame(call_info,
    2120             :                 fbc, opline->extended_value, called_scope, object);
    2121           1 :         call->prev_execute_data = EX(call);
    2122           1 :         EX(call) = call;
    2123             : 
    2124             :         CHECK_EXCEPTION();
    2125           1 :         ZEND_VM_NEXT_OPCODE();
    2126             : }
    2127             : 
    2128         342 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2129             : {
    2130         342 :         USE_OPLINE
    2131             :         zval *func_name;
    2132             :         zval *func;
    2133             :         zend_function *fbc;
    2134             :         zend_execute_data *call;
    2135             : 
    2136         342 :         func_name = EX_CONSTANT(opline->op2) + 1;
    2137         342 :         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    2138          12 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    2139         330 :         } else if ((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL) {
    2140         276 :                 func_name++;
    2141         276 :                 if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(func_name))) == NULL)) {
    2142             :                         SAVE_OPLINE();
    2143           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    2144           0 :                         HANDLE_EXCEPTION();
    2145             :                 } else {
    2146         276 :                         fbc = Z_FUNC_P(func);
    2147         276 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
    2148             :                 }
    2149             :         } else {
    2150          54 :                 fbc = Z_FUNC_P(func);
    2151          54 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), fbc);
    2152             :         }
    2153             : 
    2154         684 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    2155             :                 fbc, opline->extended_value, NULL, NULL);
    2156         342 :         call->prev_execute_data = EX(call);
    2157         342 :         EX(call) = call;
    2158             : 
    2159         342 :         ZEND_VM_NEXT_OPCODE();
    2160             : }
    2161             : 
    2162    24018762 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2163             : {
    2164    24018762 :         USE_OPLINE
    2165             : 
    2166    24018762 :         zval *fname = EX_CONSTANT(opline->op2);
    2167             :         zval *func;
    2168             :         zend_function *fbc;
    2169             :         zend_execute_data *call;
    2170             : 
    2171    24018762 :         if (CACHED_PTR(Z_CACHE_SLOT_P(fname))) {
    2172    23867223 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
    2173      151539 :         } else if (UNEXPECTED((func = zend_hash_find(EG(function_table), Z_STR_P(fname))) == NULL)) {
    2174             :             SAVE_OPLINE();
    2175           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(fname));
    2176           0 :                 HANDLE_EXCEPTION();
    2177             :         } else {
    2178      151539 :                 fbc = Z_FUNC_P(func);
    2179      151539 :                 CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
    2180             :         }
    2181             : 
    2182    48037524 :         call = zend_vm_stack_push_call_frame_ex(
    2183             :                 opline->op1.num, ZEND_CALL_NESTED_FUNCTION,
    2184             :                 fbc, opline->extended_value, NULL, NULL);
    2185    24018762 :         call->prev_execute_data = EX(call);
    2186    24018762 :         EX(call) = call;
    2187             : 
    2188    24018762 :         ZEND_VM_NEXT_OPCODE();
    2189             : }
    2190             : 
    2191      157961 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2192             : {
    2193      157961 :         USE_OPLINE
    2194             :         uint32_t arg_num;
    2195             :         zval *param;
    2196             : 
    2197             :         ZEND_VM_REPEATABLE_OPCODE
    2198             : 
    2199      188059 :         arg_num = opline->op1.num;
    2200      376118 :         param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
    2201      188059 :         if (arg_num > EX_NUM_ARGS()) {
    2202      100571 :                 ZVAL_COPY_VALUE(param, EX_CONSTANT(opline->op2));
    2203      100571 :                 if (Z_OPT_CONSTANT_P(param)) {
    2204             :                         SAVE_OPLINE();
    2205         121 :                         if (UNEXPECTED(zval_update_constant_ex(param, 0, NULL) != SUCCESS)) {
    2206          15 :                                 ZVAL_UNDEF(param);
    2207          15 :                                 HANDLE_EXCEPTION();
    2208             :                         }
    2209             :                 } else {
    2210             :                         /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
    2211      100450 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(param))) {
    2212          25 :                                 zval_copy_ctor_func(param);
    2213             :                         }
    2214             :                 }
    2215             :         }
    2216             : 
    2217      188039 :         if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
    2218       87578 :                 zval *default_value = EX_CONSTANT(opline->op2);
    2219             : 
    2220             :                 SAVE_OPLINE();
    2221      175156 :                 if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, default_value, CACHE_ADDR(Z_CACHE_SLOT_P(default_value))))) {
    2222           7 :                         HANDLE_EXCEPTION();
    2223             :                 }
    2224             :         }
    2225             : 
    2226      188032 :         ZEND_VM_REPEAT_OPCODE(ZEND_RECV_INIT);
    2227             :         ZEND_VM_NEXT_OPCODE();
    2228             : }
    2229             : 
    2230           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2231             : {
    2232           2 :         USE_OPLINE
    2233             :         zend_brk_cont_element *el;
    2234             : 
    2235             :         SAVE_OPLINE();
    2236           2 :         el = zend_brk_cont(Z_LVAL_P(EX_CONSTANT(opline->op2)), opline->extended_value,
    2237           2 :                            &EX(func)->op_array, execute_data);
    2238             : 
    2239           2 :         if (el->start >= 0) {
    2240           1 :                 zend_op *brk_opline = EX(func)->op_array.opcodes + el->brk;
    2241             : 
    2242           1 :                 if (brk_opline->opcode == ZEND_FREE) {
    2243           0 :                         zval_ptr_dtor_nogc(EX_VAR(brk_opline->op1.var));
    2244           1 :                 } else if (brk_opline->opcode == ZEND_FE_FREE) {
    2245           1 :                         zval *var = EX_VAR(brk_opline->op1.var);
    2246           1 :                         if (Z_TYPE_P(var) != IS_ARRAY && Z_FE_ITER_P(var) != (uint32_t)-1) {
    2247           0 :                                 zend_hash_iterator_del(Z_FE_ITER_P(var));
    2248             :                         }
    2249             :                         zval_ptr_dtor_nogc(var);
    2250             :                 }
    2251             :         }
    2252           2 :         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op1));
    2253             : }
    2254             : 
    2255         383 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2256             : {
    2257         383 :         USE_OPLINE
    2258         383 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    2259             :         zend_class_entry *iface;
    2260             : 
    2261             :         SAVE_OPLINE();
    2262         383 :         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    2263           0 :                 iface = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    2264             :         } else {
    2265         383 :                 iface = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_INTERFACE);
    2266         381 :                 if (UNEXPECTED(iface == NULL)) {
    2267             :                         CHECK_EXCEPTION();
    2268           1 :                         ZEND_VM_NEXT_OPCODE();
    2269             :                 }
    2270         380 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), iface);
    2271             :         }
    2272             : 
    2273         380 :         if (UNEXPECTED((iface->ce_flags & ZEND_ACC_INTERFACE) == 0)) {
    2274           4 :                 zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name->val, iface->name->val);
    2275             :         }
    2276         376 :         zend_do_implement_interface(ce, iface);
    2277             : 
    2278             :         CHECK_EXCEPTION();
    2279         347 :         ZEND_VM_NEXT_OPCODE();
    2280             : }
    2281             : 
    2282        3074 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2283             : {
    2284        3074 :         USE_OPLINE
    2285             : 
    2286             :         SAVE_OPLINE();
    2287        3074 :         if (EG(exception)) {
    2288           0 :                 zend_exception_save();
    2289             :         }
    2290             :         if (IS_UNUSED == IS_UNUSED) {
    2291        3074 :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
    2292             :                 CHECK_EXCEPTION();
    2293        3074 :                 ZEND_VM_NEXT_OPCODE();
    2294             :         } else {
    2295             : 
    2296             :                 zval *class_name = NULL;
    2297             : 
    2298             : try_class_name:
    2299             :                 if (IS_UNUSED == IS_CONST) {
    2300             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    2301             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    2302             :                         } else {
    2303             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
    2304             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    2305             :                         }
    2306             :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    2307             :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    2308             :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2309             :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value);
    2310             :                 } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_TYPE_P(class_name) == IS_REFERENCE) {
    2311             :                         class_name = Z_REFVAL_P(class_name);
    2312             :                         goto try_class_name;
    2313             :                 } else {
    2314             :                         if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
    2315             :                                 GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
    2316             :                         }
    2317             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2318             :                                 HANDLE_EXCEPTION();
    2319             :                         }
    2320             :                         zend_error(E_EXCEPTION | E_ERROR, "Class name must be a valid object or a string");
    2321             :                 }
    2322             : 
    2323             :                 CHECK_EXCEPTION();
    2324             :                 ZEND_VM_NEXT_OPCODE();
    2325             :         }
    2326             : }
    2327             : 
    2328        1138 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2329             : {
    2330        1138 :         USE_OPLINE
    2331             : 
    2332             :         SAVE_OPLINE();
    2333        1138 :         if (EG(exception)) {
    2334           0 :                 zend_exception_save();
    2335             :         }
    2336        1138 :         if (IS_CV == IS_UNUSED) {
    2337             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
    2338             :                 CHECK_EXCEPTION();
    2339             :                 ZEND_VM_NEXT_OPCODE();
    2340             :         } else {
    2341             : 
    2342        2276 :                 zval *class_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    2343             : 
    2344             : try_class_name:
    2345        1138 :                 if (IS_CV == IS_CONST) {
    2346             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    2347             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    2348             :                         } else {
    2349             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
    2350             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    2351             :                         }
    2352        1138 :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    2353          21 :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    2354        1117 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2355        1114 :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value);
    2356           3 :                 } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_TYPE_P(class_name) == IS_REFERENCE) {
    2357           0 :                         class_name = Z_REFVAL_P(class_name);
    2358           0 :                         goto try_class_name;
    2359             :                 } else {
    2360           3 :                         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
    2361           3 :                                 GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
    2362             :                         }
    2363           3 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2364           2 :                                 HANDLE_EXCEPTION();
    2365             :                         }
    2366           1 :                         zend_error(E_EXCEPTION | E_ERROR, "Class name must be a valid object or a string");
    2367             :                 }
    2368             : 
    2369             :                 CHECK_EXCEPTION();
    2370        1136 :                 ZEND_VM_NEXT_OPCODE();
    2371             :         }
    2372             : }
    2373             : 
    2374       13804 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2375             : {
    2376       13804 :         USE_OPLINE
    2377             :         zend_function *fbc;
    2378             :         zval *function_name, *func;
    2379             :         zend_string *lcname;
    2380             : 
    2381             :         zend_class_entry *called_scope;
    2382             :         zend_object *object;
    2383             :         zend_execute_data *call;
    2384       13804 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
    2385             : 
    2386             :         SAVE_OPLINE();
    2387       27608 :         function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    2388             : 
    2389             : try_function_name:
    2390       13808 :         if (IS_CV != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    2391             :                 const char *colon;
    2392             : 
    2393       26578 :                 if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
    2394           7 :                         colon > Z_STRVAL_P(function_name) &&
    2395           7 :                         *(colon-1) == ':'
    2396             :                 ) {
    2397             :                         zend_string *mname;
    2398           7 :                         size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
    2399           7 :                         size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
    2400             : 
    2401           7 :                         if (!mname_length) {
    2402           1 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2403             : 
    2404           1 :                                 HANDLE_EXCEPTION();
    2405             :                         }
    2406             : 
    2407          12 :                         lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
    2408             : 
    2409           6 :                         called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    2410           6 :                         if (UNEXPECTED(called_scope == NULL)) {
    2411             :                                 zend_string_release(lcname);
    2412             :                                 CHECK_EXCEPTION();
    2413           1 :                                 ZEND_VM_NEXT_OPCODE();
    2414             :                         }
    2415             : 
    2416          10 :                         mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
    2417             : 
    2418           5 :                         if (called_scope->get_static_method) {
    2419           0 :                                 fbc = called_scope->get_static_method(called_scope, mname);
    2420             :                         } else {
    2421           5 :                                 fbc = zend_std_get_static_method(called_scope, mname, NULL);
    2422             :                         }
    2423           5 :                         if (UNEXPECTED(fbc == NULL)) {
    2424           1 :                                 if (EXPECTED(!EG(exception))) {
    2425           1 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, mname->val);
    2426             :                                 }
    2427             :                                 zend_string_release(lcname);
    2428             :                                 zend_string_release(mname);
    2429             : 
    2430           1 :                                 HANDLE_EXCEPTION();
    2431             :                         }
    2432             : 
    2433             :                         zend_string_release(lcname);
    2434             :                         zend_string_release(mname);
    2435             : 
    2436           4 :                         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2437           0 :                                 if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2438           0 :                                         zend_error(E_DEPRECATED,
    2439             :                                                 "Non-static method %s::%s() should not be called statically",
    2440           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2441             :                                 } else {
    2442           0 :                                         zend_error(
    2443             :                                                 E_EXCEPTION | E_ERROR,
    2444             :                                                 "Non-static method %s::%s() cannot be called statically",
    2445           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2446             : 
    2447           0 :                                         HANDLE_EXCEPTION();
    2448             :                                 }
    2449             :                         }
    2450             :                 } else {
    2451       13273 :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    2452           2 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    2453           1 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    2454             :                         } else {
    2455       13272 :                                 lcname = zend_string_tolower(Z_STR_P(function_name));
    2456             :                         }
    2457       13273 :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    2458           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2459             :                                 zend_string_release(lcname);
    2460             : 
    2461           0 :                                 HANDLE_EXCEPTION();
    2462             :                         }
    2463             :                         zend_string_release(lcname);
    2464             : 
    2465       13273 :                         fbc = Z_FUNC_P(func);
    2466       13273 :                         called_scope = NULL;
    2467       13273 :                         object = NULL;
    2468             :                 }
    2469             : 
    2470        2031 :         } else if (IS_CV != IS_CONST &&
    2471         528 :             EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    2472         501 :                 Z_OBJ_HANDLER_P(function_name, get_closure) &&
    2473         501 :                 Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
    2474         501 :                 if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    2475             :                         /* Delay closure destruction until its invocation */
    2476             :                         ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
    2477         492 :                         GC_REFCOUNT(fbc->common.prototype)++;
    2478         492 :                         call_info |= ZEND_CALL_CLOSURE;
    2479             :                 }
    2480             : 
    2481          65 :         } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    2482          21 :                         zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    2483             :                 zval *obj;
    2484             :                 zval *method;
    2485          21 :                 obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    2486          21 :                 method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    2487             : 
    2488          21 :                 if (!obj || !method) {
    2489           1 :                         zend_error(E_EXCEPTION | E_ERROR, "Array callback has to contain indices 0 and 1");
    2490             : 
    2491           1 :                         HANDLE_EXCEPTION();
    2492             :                 }
    2493             : 
    2494          20 :                 ZVAL_DEREF(obj);
    2495          31 :                 if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    2496           0 :                         zend_error(E_EXCEPTION | E_ERROR, "First array member is not a valid class name or object");
    2497             : 
    2498           0 :                         HANDLE_EXCEPTION();
    2499             :                 }
    2500             : 
    2501          20 :                 ZVAL_DEREF(method);
    2502          20 :                 if (Z_TYPE_P(method) != IS_STRING) {
    2503           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Second array member is not a valid method");
    2504             : 
    2505           0 :                         HANDLE_EXCEPTION();
    2506             :                 }
    2507             : 
    2508          20 :                 if (Z_TYPE_P(obj) == IS_STRING) {
    2509           9 :                         object = NULL;
    2510           9 :                         called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    2511           9 :                         if (UNEXPECTED(called_scope == NULL)) {
    2512             :                                 CHECK_EXCEPTION();
    2513           2 :                                 ZEND_VM_NEXT_OPCODE();
    2514             :                         }
    2515             : 
    2516           7 :                         if (called_scope->get_static_method) {
    2517           0 :                                 fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
    2518             :                         } else {
    2519           7 :                                 fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
    2520             :                         }
    2521           7 :                         if (UNEXPECTED(fbc == NULL)) {
    2522           1 :                                 if (EXPECTED(!EG(exception))) {
    2523           1 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    2524             :                                 }
    2525             : 
    2526           1 :                                 HANDLE_EXCEPTION();
    2527             :                         }
    2528           6 :                         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2529           1 :                                 if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2530           2 :                                         zend_error(E_DEPRECATED,
    2531             :                                                 "Non-static method %s::%s() should not be called statically",
    2532           2 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2533             :                                 } else {
    2534           0 :                                         zend_error(
    2535             :                                                 E_EXCEPTION | E_ERROR,
    2536             :                                                 "Non-static method %s::%s() cannot be called statically",
    2537           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2538             : 
    2539           0 :                                         HANDLE_EXCEPTION();
    2540             :                                 }
    2541             :                         }
    2542             :                 } else {
    2543          11 :                         called_scope = Z_OBJCE_P(obj);
    2544          11 :                         object = Z_OBJ_P(obj);
    2545             : 
    2546          11 :                         fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
    2547          11 :                         if (UNEXPECTED(fbc == NULL)) {
    2548           0 :                                 if (EXPECTED(!EG(exception))) {
    2549           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    2550             :                                 }
    2551             : 
    2552           0 :                                 HANDLE_EXCEPTION();
    2553             :                         }
    2554             : 
    2555          11 :                         if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    2556           2 :                                 object = NULL;
    2557             :                         } else {
    2558           9 :                                 call_info |= ZEND_CALL_RELEASE_THIS;
    2559           9 :                                 GC_REFCOUNT(object)++; /* For $this pointer */
    2560             :                         }
    2561             :                 }
    2562             : 
    2563           6 :         } else if ((IS_CV & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
    2564           4 :                 function_name = Z_REFVAL_P(function_name);
    2565           4 :                 goto try_function_name;
    2566             :         } else {
    2567           2 :                 if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    2568           2 :                         GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    2569             :                 }
    2570           2 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2571           2 :                         HANDLE_EXCEPTION();
    2572             :                 }
    2573           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Function name must be a string");
    2574             : 
    2575           0 :                 HANDLE_EXCEPTION();
    2576             :         }
    2577       27590 :         call = zend_vm_stack_push_call_frame(call_info,
    2578             :                 fbc, opline->extended_value, called_scope, object);
    2579       13795 :         call->prev_execute_data = EX(call);
    2580       13795 :         EX(call) = call;
    2581             : 
    2582             :         CHECK_EXCEPTION();
    2583       13795 :         ZEND_VM_NEXT_OPCODE();
    2584             : }
    2585             : 
    2586          21 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2587             : {
    2588          21 :         USE_OPLINE
    2589             : 
    2590             :         SAVE_OPLINE();
    2591          21 :         if (EG(exception)) {
    2592           0 :                 zend_exception_save();
    2593             :         }
    2594          21 :         if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
    2595             :                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(NULL, opline->extended_value);
    2596             :                 CHECK_EXCEPTION();
    2597             :                 ZEND_VM_NEXT_OPCODE();
    2598             :         } else {
    2599             :                 zend_free_op free_op2;
    2600          42 :                 zval *class_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    2601             : 
    2602             : try_class_name:
    2603          21 :                 if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
    2604             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(class_name))) {
    2605             :                                 Z_CE_P(EX_VAR(opline->result.var)) = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    2606             :                         } else {
    2607             :                                 Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
    2608             :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), Z_CE_P(EX_VAR(opline->result.var)));
    2609             :                         }
    2610          21 :                 } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
    2611           6 :                         Z_CE_P(EX_VAR(opline->result.var)) = Z_OBJCE_P(class_name);
    2612          15 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2613          15 :                         Z_CE_P(EX_VAR(opline->result.var)) = zend_fetch_class(Z_STR_P(class_name), opline->extended_value);
    2614           0 :                 } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_TYPE_P(class_name) == IS_REFERENCE) {
    2615           0 :                         class_name = Z_REFVAL_P(class_name);
    2616           0 :                         goto try_class_name;
    2617             :                 } else {
    2618           0 :                         if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(class_name) == IS_UNDEF)) {
    2619             :                                 GET_OP2_UNDEF_CV(class_name, BP_VAR_R);
    2620             :                         }
    2621           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    2622           0 :                                 HANDLE_EXCEPTION();
    2623             :                         }
    2624           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Class name must be a valid object or a string");
    2625             :                 }
    2626             : 
    2627          21 :                 zval_ptr_dtor_nogc(free_op2);
    2628             :                 CHECK_EXCEPTION();
    2629          21 :                 ZEND_VM_NEXT_OPCODE();
    2630             :         }
    2631             : }
    2632             : 
    2633          75 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2634             : {
    2635          75 :         USE_OPLINE
    2636             :         zend_function *fbc;
    2637             :         zval *function_name, *func;
    2638             :         zend_string *lcname;
    2639             :         zend_free_op free_op2;
    2640             :         zend_class_entry *called_scope;
    2641             :         zend_object *object;
    2642             :         zend_execute_data *call;
    2643          75 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
    2644             : 
    2645             :         SAVE_OPLINE();
    2646         150 :         function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    2647             : 
    2648             : try_function_name:
    2649          77 :         if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    2650             :                 const char *colon;
    2651             : 
    2652          96 :                 if ((colon = zend_memrchr(Z_STRVAL_P(function_name), ':', Z_STRLEN_P(function_name))) != NULL &&
    2653           0 :                         colon > Z_STRVAL_P(function_name) &&
    2654           0 :                         *(colon-1) == ':'
    2655             :                 ) {
    2656             :                         zend_string *mname;
    2657           0 :                         size_t cname_length = colon - Z_STRVAL_P(function_name) - 1;
    2658           0 :                         size_t mname_length = Z_STRLEN_P(function_name) - cname_length - (sizeof("::") - 1);
    2659             : 
    2660           0 :                         if (!mname_length) {
    2661           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2662           0 :                                 zval_ptr_dtor_nogc(free_op2);
    2663           0 :                                 HANDLE_EXCEPTION();
    2664             :                         }
    2665             : 
    2666           0 :                         lcname = zend_string_init(Z_STRVAL_P(function_name), cname_length, 0);
    2667             : 
    2668           0 :                         called_scope = zend_fetch_class_by_name(lcname, NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    2669           0 :                         if (UNEXPECTED(called_scope == NULL)) {
    2670             :                                 zend_string_release(lcname);
    2671             :                                 CHECK_EXCEPTION();
    2672           0 :                                 ZEND_VM_NEXT_OPCODE();
    2673             :                         }
    2674             : 
    2675           0 :                         mname = zend_string_init(Z_STRVAL_P(function_name) + (cname_length + sizeof("::") - 1), mname_length, 0);
    2676             : 
    2677           0 :                         if (called_scope->get_static_method) {
    2678           0 :                                 fbc = called_scope->get_static_method(called_scope, mname);
    2679             :                         } else {
    2680           0 :                                 fbc = zend_std_get_static_method(called_scope, mname, NULL);
    2681             :                         }
    2682           0 :                         if (UNEXPECTED(fbc == NULL)) {
    2683           0 :                                 if (EXPECTED(!EG(exception))) {
    2684           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, mname->val);
    2685             :                                 }
    2686             :                                 zend_string_release(lcname);
    2687             :                                 zend_string_release(mname);
    2688           0 :                                 zval_ptr_dtor_nogc(free_op2);
    2689           0 :                                 HANDLE_EXCEPTION();
    2690             :                         }
    2691             : 
    2692             :                         zend_string_release(lcname);
    2693             :                         zend_string_release(mname);
    2694             : 
    2695           0 :                         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2696           0 :                                 if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2697           0 :                                         zend_error(E_DEPRECATED,
    2698             :                                                 "Non-static method %s::%s() should not be called statically",
    2699           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2700             :                                 } else {
    2701           0 :                                         zend_error(
    2702             :                                                 E_EXCEPTION | E_ERROR,
    2703             :                                                 "Non-static method %s::%s() cannot be called statically",
    2704           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2705           0 :                                         zval_ptr_dtor_nogc(free_op2);
    2706           0 :                                         HANDLE_EXCEPTION();
    2707             :                                 }
    2708             :                         }
    2709             :                 } else {
    2710          48 :                         if (Z_STRVAL_P(function_name)[0] == '\\') {
    2711           0 :                                 lcname = zend_string_alloc(Z_STRLEN_P(function_name) - 1, 0);
    2712           0 :                                 zend_str_tolower_copy(lcname->val, Z_STRVAL_P(function_name) + 1, Z_STRLEN_P(function_name) - 1);
    2713             :                         } else {
    2714          48 :                                 lcname = zend_string_tolower(Z_STR_P(function_name));
    2715             :                         }
    2716          48 :                         if (UNEXPECTED((func = zend_hash_find(EG(function_table), lcname)) == NULL)) {
    2717           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(function_name));
    2718             :                                 zend_string_release(lcname);
    2719           0 :                                 zval_ptr_dtor_nogc(free_op2);
    2720           0 :                                 HANDLE_EXCEPTION();
    2721             :                         }
    2722             :                         zend_string_release(lcname);
    2723             : 
    2724          48 :                         fbc = Z_FUNC_P(func);
    2725          48 :                         called_scope = NULL;
    2726          48 :                         object = NULL;
    2727             :                 }
    2728          48 :                 zval_ptr_dtor_nogc(free_op2);
    2729          95 :         } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST &&
    2730          29 :             EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    2731          22 :                 Z_OBJ_HANDLER_P(function_name, get_closure) &&
    2732          22 :                 Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &called_scope, &fbc, &object) == SUCCESS) {
    2733          22 :                 if (fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
    2734             :                         /* Delay closure destruction until its invocation */
    2735             :                         ZEND_ASSERT(GC_TYPE(fbc->common.prototype) == IS_OBJECT);
    2736          22 :                         GC_REFCOUNT(fbc->common.prototype)++;
    2737          22 :                         call_info |= ZEND_CALL_CLOSURE;
    2738             :                 }
    2739          22 :                 zval_ptr_dtor_nogc(free_op2);
    2740          15 :         } else if (EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
    2741           4 :                         zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
    2742             :                 zval *obj;
    2743             :                 zval *method;
    2744           4 :                 obj = zend_hash_index_find(Z_ARRVAL_P(function_name), 0);
    2745           4 :                 method = zend_hash_index_find(Z_ARRVAL_P(function_name), 1);
    2746             : 
    2747           4 :                 if (!obj || !method) {
    2748           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Array callback has to contain indices 0 and 1");
    2749           0 :                         zval_ptr_dtor_nogc(free_op2);
    2750           0 :                         HANDLE_EXCEPTION();
    2751             :                 }
    2752             : 
    2753           4 :                 ZVAL_DEREF(obj);
    2754           5 :                 if (Z_TYPE_P(obj) != IS_STRING && Z_TYPE_P(obj) != IS_OBJECT) {
    2755           0 :                         zend_error(E_EXCEPTION | E_ERROR, "First array member is not a valid class name or object");
    2756           0 :                         zval_ptr_dtor_nogc(free_op2);
    2757           0 :                         HANDLE_EXCEPTION();
    2758             :                 }
    2759             : 
    2760           4 :                 ZVAL_DEREF(method);
    2761           4 :                 if (Z_TYPE_P(method) != IS_STRING) {
    2762           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Second array member is not a valid method");
    2763           0 :                         zval_ptr_dtor_nogc(free_op2);
    2764           0 :                         HANDLE_EXCEPTION();
    2765             :                 }
    2766             : 
    2767           4 :                 if (Z_TYPE_P(obj) == IS_STRING) {
    2768           3 :                         object = NULL;
    2769           3 :                         called_scope = zend_fetch_class_by_name(Z_STR_P(obj), NULL, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    2770           3 :                         if (UNEXPECTED(called_scope == NULL)) {
    2771             :                                 CHECK_EXCEPTION();
    2772           0 :                                 ZEND_VM_NEXT_OPCODE();
    2773             :                         }
    2774             : 
    2775           3 :                         if (called_scope->get_static_method) {
    2776           0 :                                 fbc = called_scope->get_static_method(called_scope, Z_STR_P(method));
    2777             :                         } else {
    2778           3 :                                 fbc = zend_std_get_static_method(called_scope, Z_STR_P(method), NULL);
    2779             :                         }
    2780           3 :                         if (UNEXPECTED(fbc == NULL)) {
    2781           0 :                                 if (EXPECTED(!EG(exception))) {
    2782           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", called_scope->name->val, Z_STRVAL_P(method));
    2783             :                                 }
    2784           0 :                                 zval_ptr_dtor_nogc(free_op2);
    2785           0 :                                 HANDLE_EXCEPTION();
    2786             :                         }
    2787           3 :                         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    2788           0 :                                 if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    2789           0 :                                         zend_error(E_DEPRECATED,
    2790             :                                                 "Non-static method %s::%s() should not be called statically",
    2791           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2792             :                                 } else {
    2793           0 :                                         zend_error(
    2794             :                                                 E_EXCEPTION | E_ERROR,
    2795             :                                                 "Non-static method %s::%s() cannot be called statically",
    2796           0 :                                                 fbc->common.scope->name->val, fbc->common.function_name->val);
    2797           0 :                                         zval_ptr_dtor_nogc(free_op2);
    2798           0 :                                         HANDLE_EXCEPTION();
    2799             :                                 }
    2800             :                         }
    2801             :                 } else {
    2802           1 :                         called_scope = Z_OBJCE_P(obj);
    2803           1 :                         object = Z_OBJ_P(obj);
    2804             : 
    2805           1 :                         fbc = Z_OBJ_HT_P(obj)->get_method(&object, Z_STR_P(method), NULL);
    2806           1 :                         if (UNEXPECTED(fbc == NULL)) {
    2807           0 :                                 if (EXPECTED(!EG(exception))) {
    2808           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", object->ce->name->val, Z_STRVAL_P(method));
    2809             :                                 }
    2810           0 :                                 zval_ptr_dtor_nogc(free_op2);
    2811           0 :                                 HANDLE_EXCEPTION();
    2812             :                         }
    2813             : 
    2814           1 :                         if ((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    2815           1 :                                 object = NULL;
    2816             :                         } else {
    2817           0 :                                 call_info |= ZEND_CALL_RELEASE_THIS;
    2818           0 :                                 GC_REFCOUNT(object)++; /* For $this pointer */
    2819             :                         }
    2820             :                 }
    2821           4 :                 zval_ptr_dtor_nogc(free_op2);
    2822           3 :         } else if (((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) && Z_TYPE_P(function_name) == IS_REFERENCE) {
    2823           2 :                 function_name = Z_REFVAL_P(function_name);
    2824           2 :                 goto try_function_name;
    2825             :         } else {
    2826           1 :                 if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    2827             :                         GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    2828             :                 }
    2829           1 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2830           0 :                         HANDLE_EXCEPTION();
    2831             :                 }
    2832           1 :                 zend_error(E_EXCEPTION | E_ERROR, "Function name must be a string");
    2833           1 :                 zval_ptr_dtor_nogc(free_op2);
    2834           1 :                 HANDLE_EXCEPTION();
    2835             :         }
    2836         148 :         call = zend_vm_stack_push_call_frame(call_info,
    2837             :                 fbc, opline->extended_value, called_scope, object);
    2838          74 :         call->prev_execute_data = EX(call);
    2839          74 :         EX(call) = call;
    2840             : 
    2841             :         CHECK_EXCEPTION();
    2842          74 :         ZEND_VM_NEXT_OPCODE();
    2843             : }
    2844             : 
    2845           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2846             : {
    2847           0 :         USE_OPLINE
    2848             : 
    2849             : 
    2850             :         SAVE_OPLINE();
    2851           0 :         bitwise_not_function(EX_VAR(opline->result.var),
    2852           0 :                 EX_CONSTANT(opline->op1));
    2853             : 
    2854             :         CHECK_EXCEPTION();
    2855           0 :         ZEND_VM_NEXT_OPCODE();
    2856             : }
    2857             : 
    2858           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2859             : {
    2860           0 :         USE_OPLINE
    2861             :         zval *val;
    2862             : 
    2863             : 
    2864           0 :         val = EX_CONSTANT(opline->op1);
    2865           0 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    2866           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    2867           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    2868           0 :                 if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    2869             :                         SAVE_OPLINE();
    2870           0 :                         GET_OP1_UNDEF_CV(val, BP_VAR_R);
    2871             :                         CHECK_EXCEPTION();
    2872             :                 }
    2873           0 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    2874             :         } else {
    2875             :                 SAVE_OPLINE();
    2876           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), !i_zend_is_true(val));
    2877             : 
    2878             :                 CHECK_EXCEPTION();
    2879             :         }
    2880           0 :         ZEND_VM_NEXT_OPCODE();
    2881             : }
    2882             : 
    2883       49712 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2884             : {
    2885       49712 :         USE_OPLINE
    2886             : 
    2887             :         zval *z;
    2888             : 
    2889             :         SAVE_OPLINE();
    2890       49712 :         z = EX_CONSTANT(opline->op1);
    2891             : 
    2892       49712 :         if (Z_TYPE_P(z) == IS_STRING) {
    2893       49666 :                 zend_string *str = Z_STR_P(z);
    2894             : 
    2895       49666 :                 if (str->len != 0) {
    2896       49663 :                         zend_write(str->val, str->len);
    2897             :                 }
    2898             :         } else {
    2899          46 :                 zend_string *str = _zval_get_string_func(z);
    2900             : 
    2901          46 :                 if (str->len != 0) {
    2902          46 :                         zend_write(str->val, str->len);
    2903           0 :                 } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(z) == IS_UNDEF)) {
    2904             :                         GET_OP1_UNDEF_CV(z, BP_VAR_R);
    2905             :                 }
    2906             :                 zend_string_release(str);
    2907             :         }
    2908             : 
    2909             :         CHECK_EXCEPTION();
    2910       49710 :         ZEND_VM_NEXT_OPCODE();
    2911             : }
    2912             : 
    2913         841 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2914             : {
    2915         841 :         USE_OPLINE
    2916             : 
    2917             :         zval *val;
    2918             : 
    2919         841 :         val = EX_CONSTANT(opline->op1);
    2920             : 
    2921         841 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    2922         202 :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    2923         202 :                 ZEND_VM_CONTINUE();
    2924         639 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    2925         359 :                 if (IS_CONST == IS_CV) {
    2926             :                         if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    2927             :                                 SAVE_OPLINE();
    2928             :                                 GET_OP1_UNDEF_CV(val, BP_VAR_R);
    2929             :                         }
    2930             :                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    2931             :                 } else {
    2932         359 :                         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    2933         359 :                         ZEND_VM_CONTINUE();
    2934             :                 }
    2935             :         }
    2936             : 
    2937             :         SAVE_OPLINE();
    2938         280 :         if (i_zend_is_true(val)) {
    2939         117 :                 opline++;
    2940             :         } else {
    2941         163 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    2942             :         }
    2943             : 
    2944         280 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2945           0 :                 HANDLE_EXCEPTION();
    2946             :         }
    2947         280 :         ZEND_VM_JMP(opline);
    2948             : }
    2949             : 
    2950     6101447 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2951             : {
    2952     6101447 :         USE_OPLINE
    2953             : 
    2954             :         zval *val;
    2955             : 
    2956     6101447 :         val = EX_CONSTANT(opline->op1);
    2957             : 
    2958     6101447 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    2959     6100991 :                 ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    2960     6100991 :                 ZEND_VM_CONTINUE();
    2961         456 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    2962           3 :                 if (IS_CONST == IS_CV) {
    2963             :                         if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    2964             :                                 SAVE_OPLINE();
    2965             :                                 GET_OP1_UNDEF_CV(val, BP_VAR_R);
    2966             :                                 CHECK_EXCEPTION();
    2967             :                         }
    2968             :                         ZEND_VM_NEXT_OPCODE();
    2969             :                 } else {
    2970           3 :                         ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    2971           3 :                         ZEND_VM_CONTINUE();
    2972             :                 }
    2973             :         }
    2974             : 
    2975             :         SAVE_OPLINE();
    2976         453 :         if (i_zend_is_true(val)) {
    2977         452 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    2978             :         } else {
    2979           1 :                 opline++;
    2980             :         }
    2981             : 
    2982         453 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2983           0 :                 HANDLE_EXCEPTION();
    2984             :         }
    2985         453 :         ZEND_VM_JMP(opline);
    2986             : }
    2987             : 
    2988           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2989             : {
    2990           0 :         USE_OPLINE
    2991             : 
    2992             :         zval *val;
    2993             : 
    2994           0 :         val = EX_CONSTANT(opline->op1);
    2995             : 
    2996           0 :         if (EXPECTED(Z_TYPE_INFO_P(val) == IS_TRUE)) {
    2997           0 :                 ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
    2998           0 :                 ZEND_VM_CONTINUE();
    2999           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    3000           0 :                 if (IS_CONST == IS_CV) {
    3001             :                         if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    3002             :                                 SAVE_OPLINE();
    3003             :                                 GET_OP1_UNDEF_CV(val, BP_VAR_R);
    3004             :                         }
    3005             :                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3006             :                 } else {
    3007           0 :                         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    3008           0 :                         ZEND_VM_CONTINUE();
    3009             :                 }
    3010             :         }
    3011             : 
    3012             :         SAVE_OPLINE();
    3013           0 :         if (i_zend_is_true(val)) {
    3014           0 :                 opline = ZEND_OFFSET_TO_OPLINE(opline, opline->extended_value);
    3015             :         } else {
    3016           0 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    3017             :         }
    3018             : 
    3019           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3020           0 :                 HANDLE_EXCEPTION();
    3021             :         }
    3022           0 :         ZEND_VM_JMP(opline);
    3023             : }
    3024             : 
    3025           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3026             : {
    3027           0 :         USE_OPLINE
    3028             : 
    3029             :         zval *val;
    3030             :         int ret;
    3031             : 
    3032           0 :         val = EX_CONSTANT(opline->op1);
    3033             : 
    3034           0 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    3035           0 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3036           0 :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    3037           0 :                 ZEND_VM_CONTINUE();
    3038           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    3039           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3040           0 :                 if (IS_CONST == IS_CV) {
    3041             :                         if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    3042             :                                 SAVE_OPLINE();
    3043             :                                 GET_OP1_UNDEF_CV(val, BP_VAR_R);
    3044             :                         }
    3045             :                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3046             :                 } else {
    3047           0 :                         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    3048           0 :                         ZEND_VM_CONTINUE();
    3049             :                 }
    3050             :         }
    3051             : 
    3052             :         SAVE_OPLINE();
    3053           0 :         ret = i_zend_is_true(val);
    3054             : 
    3055           0 :         if (ret) {
    3056           0 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3057           0 :                 opline++;
    3058             :         } else {
    3059           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3060           0 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    3061             :         }
    3062           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3063           0 :                 HANDLE_EXCEPTION();
    3064             :         }
    3065           0 :         ZEND_VM_JMP(opline);
    3066             : }
    3067             : 
    3068           7 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3069             : {
    3070           7 :         USE_OPLINE
    3071             : 
    3072             :         zval *val;
    3073             :         int ret;
    3074             : 
    3075           7 :         val = EX_CONSTANT(opline->op1);
    3076             : 
    3077           7 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    3078           7 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3079           7 :                 ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    3080           7 :                 ZEND_VM_CONTINUE();
    3081           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    3082           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3083           0 :                 if (IS_CONST == IS_CV) {
    3084             :                         if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    3085             :                                 SAVE_OPLINE();
    3086             :                                 GET_OP1_UNDEF_CV(val, BP_VAR_R);
    3087             :                                 CHECK_EXCEPTION();
    3088             :                         }
    3089             :                         ZEND_VM_NEXT_OPCODE();
    3090             :                 } else {
    3091           0 :                         ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    3092           0 :                         ZEND_VM_CONTINUE();
    3093             :                 }
    3094             :         }
    3095             : 
    3096             :         SAVE_OPLINE();
    3097           0 :         ret = i_zend_is_true(val);
    3098             : 
    3099           0 :         if (ret) {
    3100           0 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3101           0 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    3102             :         } else {
    3103           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3104           0 :                 opline++;
    3105             :         }
    3106           0 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3107           0 :                 HANDLE_EXCEPTION();
    3108             :         }
    3109           0 :         ZEND_VM_JMP(opline);
    3110             : }
    3111             : 
    3112      565385 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3113             : {
    3114      565385 :         USE_OPLINE
    3115             :         zval *retval_ptr;
    3116             :         zend_free_op free_op1;
    3117             : 
    3118      565385 :         retval_ptr = EX_CONSTANT(opline->op1);
    3119      565385 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(retval_ptr) == IS_UNDEF)) {
    3120             :                 SAVE_OPLINE();
    3121             :                 retval_ptr = GET_OP1_UNDEF_CV(retval_ptr, BP_VAR_R);
    3122             :                 if (EX(return_value)) {
    3123             :                         ZVAL_NULL(EX(return_value));
    3124             :                 }
    3125      565385 :         } else if (!EX(return_value)) {
    3126      321204 :                 if (IS_CONST == IS_VAR || IS_CONST == IS_TMP_VAR ) {
    3127             :                         if (Z_REFCOUNTED_P(free_op1) && !Z_DELREF_P(free_op1)) {
    3128             :                                 SAVE_OPLINE();
    3129             :                                 zval_dtor_func_for_ptr(Z_COUNTED_P(free_op1));
    3130             :                         }
    3131             :                 }
    3132             :         } else {
    3133             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    3134      244181 :                         ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    3135             :                         if (IS_CONST == IS_CONST) {
    3136      244181 :                                 if (UNEXPECTED(Z_OPT_COPYABLE_P(EX(return_value)))) {
    3137          97 :                                         zval_copy_ctor_func(EX(return_value));
    3138             :                                 }
    3139             :                         }
    3140             :                 } else if (IS_CONST == IS_CV) {
    3141             :                         ZVAL_DEREF(retval_ptr);
    3142             :                         ZVAL_COPY(EX(return_value), retval_ptr);
    3143             :                 } else /* if (IS_CONST == IS_VAR) */ {
    3144             :                         if (UNEXPECTED(Z_ISREF_P(retval_ptr))) {
    3145             :                                 zend_refcounted *ref = Z_COUNTED_P(retval_ptr);
    3146             : 
    3147             :                                 retval_ptr = Z_REFVAL_P(retval_ptr);
    3148             :                                 ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    3149             :                                 if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    3150             :                                         efree_size(ref, sizeof(zend_reference));
    3151             :                                 } else if (Z_OPT_REFCOUNTED_P(retval_ptr)) {
    3152             :                                         Z_ADDREF_P(retval_ptr);
    3153             :                                 }
    3154             :                         } else {
    3155             :                                 ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    3156             :                         }
    3157             :                 }
    3158             :         }
    3159      565385 :         ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    3160             : }
    3161             : 
    3162           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3163             : {
    3164           6 :         USE_OPLINE
    3165             :         zval *retval_ptr;
    3166             : 
    3167             : 
    3168             :         SAVE_OPLINE();
    3169             : 
    3170             :         do {
    3171             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR ||
    3172             :                     (IS_CONST == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
    3173             :                         /* Not supposed to happen, but we'll allow it */
    3174           6 :                         zend_error(E_NOTICE, "Only variable references should be returned by reference");
    3175             : 
    3176           6 :                         retval_ptr = EX_CONSTANT(opline->op1);
    3177           6 :                         if (!EX(return_value)) {
    3178             :                                 if (IS_CONST == IS_TMP_VAR) {
    3179             : 
    3180             :                                 }
    3181             :                         } else {
    3182           6 :                                 ZVAL_COPY_VALUE(EX(return_value), retval_ptr);
    3183           6 :                                 Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    3184             :                                 if (IS_CONST != IS_TMP_VAR) {
    3185           6 :                                         zval_opt_copy_ctor_no_imm(EX(return_value));
    3186             :                                 }
    3187             :                         }
    3188           6 :                         break;
    3189             :                 }
    3190             : 
    3191             :                 retval_ptr = NULL;
    3192             : 
    3193             :                 if (IS_CONST == IS_VAR && UNEXPECTED(retval_ptr == NULL)) {
    3194             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot return string offsets by reference");
    3195             :                         HANDLE_EXCEPTION();
    3196             :                 }
    3197             : 
    3198             :                 if (IS_CONST == IS_VAR) {
    3199             :                         if (retval_ptr == &EG(uninitialized_zval) ||
    3200             :                             (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    3201             :                              !(Z_VAR_FLAGS_P(retval_ptr) & IS_VAR_RET_REF))) {
    3202             :                                 zend_error(E_NOTICE, "Only variable references should be returned by reference");
    3203             :                                 if (EX(return_value)) {
    3204             :                                         ZVAL_NEW_REF(EX(return_value), retval_ptr);
    3205             :                                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    3206             :                                         if (Z_REFCOUNTED_P(retval_ptr)) Z_ADDREF_P(retval_ptr);
    3207             :                                 }
    3208             :                                 break;
    3209             :                         }
    3210             :                 }
    3211             : 
    3212             :                 if (EX(return_value)) {
    3213             :                         ZVAL_MAKE_REF(retval_ptr);
    3214             :                         Z_ADDREF_P(retval_ptr);
    3215             :                         ZVAL_REF(EX(return_value), Z_REF_P(retval_ptr));
    3216             :                         Z_VAR_FLAGS_P(EX(return_value)) = IS_VAR_RET_REF;
    3217             :                 }
    3218             :         } while (0);
    3219             : 
    3220           6 :         ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    3221             : }
    3222             : 
    3223       50096 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3224             : {
    3225       50096 :         USE_OPLINE
    3226             :         zval *retval;
    3227             : 
    3228             : 
    3229       50096 :         zend_generator *generator = zend_get_running_generator(execute_data);
    3230             : 
    3231             :         SAVE_OPLINE();
    3232       50096 :         retval = EX_CONSTANT(opline->op1);
    3233             : 
    3234             :         /* Copy return value into generator->retval */
    3235             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    3236       50096 :                 ZVAL_COPY_VALUE(&generator->retval, retval);
    3237             :                 if (IS_CONST == IS_CONST) {
    3238       50096 :                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->retval))) {
    3239           0 :                                 zval_copy_ctor_func(&generator->retval);
    3240             :                         }
    3241             :                 }
    3242             :         } else if (IS_CONST == IS_CV) {
    3243             :                 ZVAL_DEREF(retval);
    3244             :                 ZVAL_COPY(&generator->retval, retval);
    3245             :         } else /* if (IS_CONST == IS_VAR) */ {
    3246             :                 if (UNEXPECTED(Z_ISREF_P(retval))) {
    3247             :                         zend_refcounted *ref = Z_COUNTED_P(retval);
    3248             : 
    3249             :                         retval = Z_REFVAL_P(retval);
    3250             :                         ZVAL_COPY_VALUE(&generator->retval, retval);
    3251             :                         if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    3252             :                                 efree_size(ref, sizeof(zend_reference));
    3253             :                         } else if (Z_OPT_REFCOUNTED_P(retval)) {
    3254             :                                 Z_ADDREF_P(retval);
    3255             :                         }
    3256             :                 } else {
    3257             :                         ZVAL_COPY_VALUE(&generator->retval, retval);
    3258             :                 }
    3259             :         }
    3260             : 
    3261             :         /* Close the generator to free up resources */
    3262       50096 :         zend_generator_close(generator, 1);
    3263             : 
    3264             :         /* Pass execution back to handling code */
    3265       50096 :         ZEND_VM_RETURN();
    3266             : }
    3267             : 
    3268           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3269             : {
    3270           2 :         USE_OPLINE
    3271             :         zval *value;
    3272             : 
    3273             : 
    3274             :         SAVE_OPLINE();
    3275           2 :         value = EX_CONSTANT(opline->op1);
    3276             : 
    3277             :         do {
    3278             :                 if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
    3279           2 :                         if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    3280             :                                 value = Z_REFVAL_P(value);
    3281             :                                 if (EXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
    3282             :                                         break;
    3283             :                                 }
    3284             :                         }
    3285           2 :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
    3286             :                                 GET_OP1_UNDEF_CV(value, BP_VAR_R);
    3287             :                         }
    3288           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3289           0 :                                 HANDLE_EXCEPTION();
    3290             :                         }
    3291           2 :                         zend_error(E_EXCEPTION | E_ERROR, "Can only throw objects");
    3292             : 
    3293           2 :                         HANDLE_EXCEPTION();
    3294             :                 }
    3295             :         } while (0);
    3296             : 
    3297             :         zend_exception_save();
    3298             :         if (IS_CONST != IS_TMP_VAR) {
    3299             :                 if (Z_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    3300             :         }
    3301             : 
    3302             :         zend_throw_exception_object(value);
    3303             :         zend_exception_restore();
    3304             : 
    3305             :         HANDLE_EXCEPTION();
    3306             : }
    3307             : 
    3308     9701892 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3309             : {
    3310     9701892 :         USE_OPLINE
    3311             :         zval *value, *arg;
    3312             : 
    3313             : 
    3314     9701892 :         value = EX_CONSTANT(opline->op1);
    3315     9701892 :         arg = ZEND_CALL_VAR(EX(call), opline->result.var);
    3316     9701892 :         ZVAL_COPY_VALUE(arg, value);
    3317             :         if (IS_CONST == IS_CONST) {
    3318     9701892 :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    3319       90043 :                         zval_copy_ctor_func(arg);
    3320             :                 }
    3321             :         }
    3322     9701892 :         ZEND_VM_NEXT_OPCODE();
    3323             : }
    3324             : 
    3325      254955 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3326             : {
    3327      254955 :         USE_OPLINE
    3328             :         zval *value, *arg;
    3329             : 
    3330             : 
    3331      254955 :         if (EXPECTED(opline->op2.num <= MAX_ARG_FLAG_NUM)) {
    3332      254937 :                 if (QUICK_ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
    3333           3 :                         goto send_val_by_ref;
    3334             :                 }
    3335          36 :         } else if (ARG_MUST_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
    3336             : send_val_by_ref:
    3337             :                 SAVE_OPLINE();
    3338           3 :                 zend_error(E_EXCEPTION | E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
    3339             : 
    3340           3 :                 arg = ZEND_CALL_VAR(EX(call), opline->result.var);
    3341           3 :                 ZVAL_UNDEF(arg);
    3342           3 :                 HANDLE_EXCEPTION();
    3343             :         }
    3344      254952 :         value = EX_CONSTANT(opline->op1);
    3345      254952 :         arg = ZEND_CALL_VAR(EX(call), opline->result.var);
    3346      254952 :         ZVAL_COPY_VALUE(arg, value);
    3347             :         if (IS_CONST == IS_CONST) {
    3348      254952 :                 if (UNEXPECTED(Z_OPT_COPYABLE_P(arg))) {
    3349        1251 :                         zval_copy_ctor_func(arg);
    3350             :                 }
    3351             :         }
    3352      254952 :         ZEND_VM_NEXT_OPCODE();
    3353             : }
    3354             : 
    3355          17 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3356             : {
    3357          17 :         USE_OPLINE
    3358             :         zval *val;
    3359             : 
    3360             : 
    3361          17 :         val = EX_CONSTANT(opline->op1);
    3362          17 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    3363           6 :                 ZVAL_TRUE(EX_VAR(opline->result.var));
    3364          11 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    3365           9 :                 if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_UNDEF)) {
    3366             :                         SAVE_OPLINE();
    3367           0 :                         GET_OP1_UNDEF_CV(val, BP_VAR_R);
    3368             :                         CHECK_EXCEPTION();
    3369             :                 }
    3370           9 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3371             :         } else {
    3372             :                 SAVE_OPLINE();
    3373           4 :                 ZVAL_BOOL(EX_VAR(opline->result.var), i_zend_is_true(val));
    3374             : 
    3375             :                 CHECK_EXCEPTION();
    3376             :         }
    3377          17 :         ZEND_VM_NEXT_OPCODE();
    3378             : }
    3379             : 
    3380      470468 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3381             : {
    3382      470468 :         USE_OPLINE
    3383             :         zval object_zval;
    3384             :         zend_function *constructor;
    3385             :         zend_class_entry *ce;
    3386             : 
    3387             :         SAVE_OPLINE();
    3388             :         if (IS_CONST == IS_CONST) {
    3389      470468 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    3390      458450 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    3391             :                 } else {
    3392       12018 :                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    3393       12016 :                         if (UNEXPECTED(ce == NULL)) {
    3394             :                                 CHECK_EXCEPTION();
    3395          12 :                                 ZEND_VM_NEXT_OPCODE();
    3396             :                         }
    3397       12004 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    3398             :                 }
    3399             :         } else {
    3400             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    3401             :         }
    3402      470454 :         if (UNEXPECTED(object_init_ex(&object_zval, ce) != SUCCESS)) {
    3403           6 :                 HANDLE_EXCEPTION();
    3404             :         }
    3405      470447 :         constructor = Z_OBJ_HT(object_zval)->get_constructor(Z_OBJ(object_zval));
    3406             : 
    3407      470447 :         if (constructor == NULL) {
    3408      184559 :                 if (EXPECTED(RETURN_VALUE_USED(opline))) {
    3409      184545 :                         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), &object_zval);
    3410             :                 } else {
    3411          14 :                         OBJ_RELEASE(Z_OBJ(object_zval));
    3412             :                 }
    3413      184559 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3414             :         } else {
    3415             :                 /* We are not handling overloaded classes right now */
    3416      571776 :                 zend_execute_data *call = zend_vm_stack_push_call_frame(
    3417             :                                 ZEND_CALL_FUNCTION | ZEND_CALL_RELEASE_THIS | ZEND_CALL_CTOR |
    3418      285888 :                                 (EXPECTED(RETURN_VALUE_USED(opline)) ? 0 : ZEND_CALL_CTOR_RESULT_UNUSED),
    3419             :                         constructor,
    3420             :                         opline->extended_value,
    3421             :                         ce,
    3422      285888 :                         Z_OBJ(object_zval));
    3423      285888 :                 call->prev_execute_data = EX(call);
    3424      285888 :                 EX(call) = call;
    3425             : 
    3426      285888 :                 if (EXPECTED(RETURN_VALUE_USED(opline))) {
    3427      275694 :                         ZVAL_COPY(EX_VAR(opline->result.var), &object_zval);
    3428             :                 }
    3429             : 
    3430             :                 CHECK_EXCEPTION();
    3431      285888 :                 ZEND_VM_NEXT_OPCODE();
    3432             :         }
    3433             : }
    3434             : 
    3435           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3436             : {
    3437           4 :         USE_OPLINE
    3438             : 
    3439             :         zval *obj;
    3440             :         zend_class_entry *ce;
    3441             :         zend_function *clone;
    3442             :         zend_object_clone_obj_t clone_call;
    3443             : 
    3444             :         SAVE_OPLINE();
    3445           4 :         obj = EX_CONSTANT(opline->op1);
    3446             : 
    3447           4 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(obj) == NULL)) {
    3448             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    3449             :                 HANDLE_EXCEPTION();
    3450             :         }
    3451             : 
    3452             :         do {
    3453             :                 if (IS_CONST == IS_CONST ||
    3454             :                     (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT))) {
    3455           4 :                     if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(obj)) {
    3456             :                         obj = Z_REFVAL_P(obj);
    3457             :                         if (EXPECTED(Z_TYPE_P(obj) == IS_OBJECT)) {
    3458             :                                 break;
    3459             :                                 }
    3460             :                         }
    3461           4 :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(obj) == IS_UNDEF)) {
    3462             :                                 GET_OP1_UNDEF_CV(obj, BP_VAR_R);
    3463             :                         }
    3464           4 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3465           0 :                                 HANDLE_EXCEPTION();
    3466             :                         }
    3467           4 :                         zend_error(E_EXCEPTION | E_ERROR, "__clone method called on non-object");
    3468             : 
    3469           4 :                         HANDLE_EXCEPTION();
    3470             :                 }
    3471             :         } while (0);
    3472             : 
    3473             :         ce = Z_OBJCE_P(obj);
    3474             :         clone = ce ? ce->clone : NULL;
    3475             :         clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
    3476             :         if (UNEXPECTED(clone_call == NULL)) {
    3477             :                 if (ce) {
    3478             :                         zend_error(E_EXCEPTION | E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name->val);
    3479             :                 } else {
    3480             :                         zend_error(E_EXCEPTION | E_ERROR, "Trying to clone an uncloneable object");
    3481             :                 }
    3482             : 
    3483             :                 HANDLE_EXCEPTION();
    3484             :         }
    3485             : 
    3486             :         if (ce && clone) {
    3487             :                 if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
    3488             :                         /* Ensure that if we're calling a private function, we're allowed to do so.
    3489             :                          */
    3490             :                         if (UNEXPECTED(ce != EG(scope))) {
    3491             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name->val, EG(scope) ? EG(scope)->name->val : "");
    3492             : 
    3493             :                                 HANDLE_EXCEPTION();
    3494             :                         }
    3495             :                 } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
    3496             :                         /* Ensure that if we're calling a protected function, we're allowed to do so.
    3497             :                          */
    3498             :                         if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
    3499             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name->val, EG(scope) ? EG(scope)->name->val : "");
    3500             : 
    3501             :                                 HANDLE_EXCEPTION();
    3502             :                         }
    3503             :                 }
    3504             :         }
    3505             : 
    3506             :         if (EXPECTED(EG(exception) == NULL)) {
    3507             :                 ZVAL_OBJ(EX_VAR(opline->result.var), clone_call(obj));
    3508             :                 if (UNEXPECTED(!RETURN_VALUE_USED(opline)) || UNEXPECTED(EG(exception) != NULL)) {
    3509             :                         OBJ_RELEASE(Z_OBJ_P(EX_VAR(opline->result.var)));
    3510             :                 }
    3511             :         }
    3512             : 
    3513             :         CHECK_EXCEPTION();
    3514             :         ZEND_VM_NEXT_OPCODE();
    3515             : }
    3516             : 
    3517         311 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3518             : {
    3519         311 :         USE_OPLINE
    3520             : 
    3521             :         zval *expr;
    3522         311 :         zval *result = EX_VAR(opline->result.var);
    3523             : 
    3524             :         SAVE_OPLINE();
    3525         311 :         expr = EX_CONSTANT(opline->op1);
    3526             : 
    3527         311 :         switch (opline->extended_value) {
    3528             :                 case IS_NULL:
    3529             :                         /* This code is taken from convert_to_null. However, it does not seems very useful,
    3530             :                          * because a conversion to null always results in the same value. This could only
    3531             :                          * be relevant if a cast_object handler for IS_NULL has some kind of side-effect. */
    3532             : #if 0
    3533             :                         if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3534             :                                 ZVAL_DEREF(expr);
    3535             :                         }
    3536             :                         if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->cast_object) {
    3537             :                                 if (Z_OBJ_HT_P(expr)->cast_object(expr, result, IS_NULL) == SUCCESS) {
    3538             :                                         break;
    3539             :                                 }
    3540             :                         }
    3541             : #endif
    3542             : 
    3543           0 :                         ZVAL_NULL(result);
    3544           0 :                         break;
    3545             :                 case _IS_BOOL:
    3546           2 :                         ZVAL_BOOL(result, zend_is_true(expr));
    3547           2 :                         break;
    3548             :                 case IS_LONG:
    3549          12 :                         ZVAL_LONG(result, zval_get_long(expr));
    3550           6 :                         break;
    3551             :                 case IS_DOUBLE:
    3552          20 :                         ZVAL_DOUBLE(result, zval_get_double(expr));
    3553          10 :                         break;
    3554             :                 case IS_STRING:
    3555         434 :                         ZVAL_STR(result, zval_get_string(expr));
    3556         217 :                         break;
    3557             :                 default:
    3558          76 :                         if (IS_CONST & (IS_VAR|IS_CV)) {
    3559             :                                 ZVAL_DEREF(expr);
    3560             :                         }
    3561             :                         /* If value is already of correct type, return it directly */
    3562          76 :                         if (Z_TYPE_P(expr) == opline->extended_value) {
    3563           0 :                                 ZVAL_COPY_VALUE(result, expr);
    3564             :                                 if (IS_CONST == IS_CONST) {
    3565           0 :                                         if (UNEXPECTED(Z_OPT_COPYABLE_P(result))) {
    3566           0 :                                                 zval_copy_ctor_func(result);
    3567             :                                         }
    3568             :                                 } else if (IS_CONST != IS_TMP_VAR) {
    3569             :                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    3570             :                                 }
    3571             : 
    3572             :                                 CHECK_EXCEPTION();
    3573           0 :                                 ZEND_VM_NEXT_OPCODE();
    3574             :                         }
    3575             : 
    3576          76 :                         if (opline->extended_value == IS_ARRAY) {
    3577           5 :                                 if (Z_TYPE_P(expr) != IS_OBJECT) {
    3578           5 :                                         ZVAL_NEW_ARR(result);
    3579           5 :                                         zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
    3580           5 :                                         if (Z_TYPE_P(expr) != IS_NULL) {
    3581           4 :                                                 expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
    3582             :                                                 if (IS_CONST == IS_CONST) {
    3583           4 :                                                         if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
    3584           0 :                                                                 zval_copy_ctor_func(expr);
    3585             :                                                         }
    3586             :                                                 } else {
    3587             :                                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    3588             :                                                 }
    3589             :                                         }
    3590             :                                 } else {
    3591           0 :                                         ZVAL_COPY_VALUE(result, expr);
    3592             :                                         Z_ADDREF_P(result);
    3593           0 :                                         convert_to_array(result);
    3594             :                                 }
    3595             :                         } else {
    3596          71 :                                 if (Z_TYPE_P(expr) != IS_ARRAY) {
    3597           5 :                                         object_init(result);
    3598           5 :                                         if (Z_TYPE_P(expr) != IS_NULL) {
    3599           5 :                                                 expr = zend_hash_str_add_new(Z_OBJPROP_P(result), "scalar", sizeof("scalar")-1, expr);
    3600             :                                                 if (IS_CONST == IS_CONST) {
    3601           5 :                                                         if (UNEXPECTED(Z_OPT_COPYABLE_P(expr))) {
    3602           0 :                                                                 zval_copy_ctor_func(expr);
    3603             :                                                         }
    3604             :                                                 } else {
    3605             :                                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    3606             :                                                 }
    3607             :                                         }
    3608             :                                 } else {
    3609          66 :                                         ZVAL_COPY(result, expr);
    3610          66 :                                         convert_to_object(result);
    3611             :                                 }
    3612             :                         }
    3613             :         }
    3614             : 
    3615             :         CHECK_EXCEPTION();
    3616         311 :         ZEND_VM_NEXT_OPCODE();
    3617             : }
    3618             : 
    3619        6006 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3620             : {
    3621        6006 :         USE_OPLINE
    3622        6006 :         zend_op_array *new_op_array=NULL;
    3623             : 
    3624             :         zval *inc_filename;
    3625             :         zval tmp_inc_filename;
    3626        6006 :         zend_bool failure_retval=0;
    3627             : 
    3628             :         SAVE_OPLINE();
    3629        6006 :         inc_filename = EX_CONSTANT(opline->op1);
    3630             : 
    3631        6006 :         ZVAL_UNDEF(&tmp_inc_filename);
    3632        6006 :         if (Z_TYPE_P(inc_filename) != IS_STRING) {
    3633           0 :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(inc_filename) == IS_UNDEF)) {
    3634             :                         inc_filename = GET_OP1_UNDEF_CV(inc_filename, BP_VAR_R);
    3635             :                 }
    3636           0 :                 ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename));
    3637           0 :                 inc_filename = &tmp_inc_filename;
    3638             :         }
    3639             : 
    3640        6006 :         if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
    3641           0 :                 if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
    3642           0 :                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
    3643             :                 } else {
    3644           0 :                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
    3645             :                 }
    3646             :         } else {
    3647        6006 :                 switch (opline->extended_value) {
    3648             :                         case ZEND_INCLUDE_ONCE:
    3649             :                         case ZEND_REQUIRE_ONCE: {
    3650             :                                         zend_file_handle file_handle;
    3651             :                                         zend_string *resolved_path;
    3652             : 
    3653        3874 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), (int)Z_STRLEN_P(inc_filename));
    3654        3874 :                                         if (resolved_path) {
    3655        3870 :                                                 failure_retval = zend_hash_exists(&EG(included_files), resolved_path);
    3656             :                                         } else {
    3657           8 :                                                 resolved_path = zend_string_copy(Z_STR_P(inc_filename));
    3658             :                                         }
    3659             : 
    3660        3874 :                                         if (failure_retval) {
    3661             :                                                 /* do nothing, file already included */
    3662        3321 :                                         } else if (SUCCESS == zend_stream_open(resolved_path->val, &file_handle)) {
    3663             : 
    3664        3319 :                                                 if (!file_handle.opened_path) {
    3665           4 :                                                         file_handle.opened_path = zend_string_copy(resolved_path);
    3666             :                                                 }
    3667             : 
    3668        3319 :                                                 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
    3669        3318 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
    3670        3318 :                                                         zend_destroy_file_handle(&file_handle);
    3671             :                                                 } else {
    3672           1 :                                                         zend_file_handle_dtor(&file_handle);
    3673           1 :                                                         failure_retval=1;
    3674             :                                                 }
    3675             :                                         } else {
    3676           2 :                                                 if (opline->extended_value == ZEND_INCLUDE_ONCE) {
    3677           0 :                                                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename));
    3678             :                                                 } else {
    3679           2 :                                                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename));
    3680             :                                                 }
    3681             :                                         }
    3682             :                                         zend_string_release(resolved_path);
    3683             :                                 }
    3684        3872 :                                 break;
    3685             :                         case ZEND_INCLUDE:
    3686             :                         case ZEND_REQUIRE:
    3687        2066 :                                 new_op_array = compile_filename(opline->extended_value, inc_filename);
    3688        2064 :                                 break;
    3689             :                         case ZEND_EVAL: {
    3690          66 :                                         char *eval_desc = zend_make_compiled_string_description("eval()'d code");
    3691             : 
    3692          66 :                                         new_op_array = zend_compile_string(inc_filename, eval_desc);
    3693          64 :                                         efree(eval_desc);
    3694             :                                 }
    3695             :                                 break;
    3696             :                         EMPTY_SWITCH_DEFAULT_CASE()
    3697             :                 }
    3698             :         }
    3699        6000 :         if (Z_TYPE(tmp_inc_filename) != IS_UNDEF) {
    3700           0 :                 zend_string_release(Z_STR(tmp_inc_filename));
    3701             :         }
    3702             : 
    3703        6000 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3704           4 :                 HANDLE_EXCEPTION();
    3705        5996 :         } else if (EXPECTED(new_op_array != NULL)) {
    3706        5431 :                 zval *return_value = NULL;
    3707             :                 zend_execute_data *call;
    3708             : 
    3709        5431 :                 if (RETURN_VALUE_USED(opline)) {
    3710           0 :                         return_value = EX_VAR(opline->result.var);
    3711             :                 }
    3712             : 
    3713        5431 :                 new_op_array->scope = EG(scope);
    3714             : 
    3715       10862 :                 call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE,
    3716             :                         (zend_function*)new_op_array, 0, EX(called_scope), Z_OBJ(EX(This)));
    3717             : 
    3718        5431 :                 if (EX(symbol_table)) {
    3719        5397 :                         call->symbol_table = EX(symbol_table);
    3720             :                 } else {
    3721          34 :                         call->symbol_table = zend_rebuild_symbol_table();
    3722             :                 }
    3723             : 
    3724        5431 :                 call->prev_execute_data = execute_data;
    3725             :             i_init_code_execute_data(call, new_op_array, return_value);
    3726        5431 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    3727        5431 :                         ZEND_VM_ENTER();
    3728             :                 } else {
    3729           0 :                         ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
    3730           0 :                         zend_execute_ex(call);
    3731             :                         zend_vm_stack_free_call_frame(call);
    3732             :                 }
    3733             : 
    3734           0 :                 destroy_op_array(new_op_array);
    3735           0 :                 efree_size(new_op_array, sizeof(zend_op_array));
    3736           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    3737           0 :                         zend_throw_exception_internal(NULL);
    3738           0 :                         HANDLE_EXCEPTION();
    3739             :                 }
    3740             : 
    3741         565 :         } else if (RETURN_VALUE_USED(opline)) {
    3742           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), failure_retval);
    3743             :         }
    3744             :         ZEND_VM_INTERRUPT_CHECK();
    3745         565 :         ZEND_VM_NEXT_OPCODE();
    3746             : }
    3747             : 
    3748       13779 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3749             : {
    3750       13779 :         USE_OPLINE
    3751             : 
    3752             :         zval *array_ptr, *result;
    3753             :         HashTable *fe_ht;
    3754             : 
    3755             :         SAVE_OPLINE();
    3756             : 
    3757       13779 :         array_ptr = EX_CONSTANT(opline->op1);
    3758       13779 :         if (EXPECTED(Z_TYPE_P(array_ptr) == IS_ARRAY)) {
    3759       13779 :                 result = EX_VAR(opline->result.var);
    3760       13779 :                 ZVAL_COPY_VALUE(result, array_ptr);
    3761       13779 :                 if (IS_CONST != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(result)) {
    3762             :                         Z_ADDREF_P(array_ptr);
    3763             :                 }
    3764       13779 :                 Z_FE_POS_P(result) = 0;
    3765             : 
    3766             :                 CHECK_EXCEPTION();
    3767       13779 :                 ZEND_VM_NEXT_OPCODE();
    3768           0 :         } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
    3769             :                 if (!Z_OBJCE_P(array_ptr)->get_iterator) {
    3770             :                         HashPosition pos = 0;
    3771             :                         Bucket *p;
    3772             : 
    3773             :                         result = EX_VAR(opline->result.var);
    3774             :                         ZVAL_COPY_VALUE(result, array_ptr);
    3775             :                         if (IS_CONST != IS_TMP_VAR) {
    3776             :                                 Z_ADDREF_P(array_ptr);
    3777             :                         }
    3778             :                         fe_ht = Z_OBJPROP_P(array_ptr);
    3779             :                         pos = 0;
    3780             :                         p = fe_ht->arData;
    3781             :                         while (1) {
    3782             :                                 if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
    3783             : 
    3784             :                                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3785             :                                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3786             :                                 }
    3787             :                                 if ((EXPECTED(Z_TYPE(p->val) != IS_UNDEF) &&
    3788             :                                      (EXPECTED(Z_TYPE(p->val) != IS_INDIRECT) ||
    3789             :                                       EXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) != IS_UNDEF))) &&
    3790             :                                     (UNEXPECTED(!p->key) ||
    3791             :                                      EXPECTED(zend_check_property_access(Z_OBJ_P(array_ptr), p->key) == SUCCESS))) {
    3792             :                                         break;
    3793             :                                 }
    3794             :                                 pos++;
    3795             :                                 p++;
    3796             :                         }
    3797             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
    3798             : 
    3799             :                         CHECK_EXCEPTION();
    3800             :                         ZEND_VM_NEXT_OPCODE();
    3801             :                 } else {
    3802             :                         zend_class_entry *ce = Z_OBJCE_P(array_ptr);
    3803             :                         zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
    3804             :                         zend_bool is_empty;
    3805             : 
    3806             :                         if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
    3807             : 
    3808             :                                 if (!EG(exception)) {
    3809             :                                         zend_throw_exception_ex(NULL, 0, "Object of type %s did not create an Iterator", ce->name->val);
    3810             :                                 }
    3811             :                                 zend_throw_exception_internal(NULL);
    3812             :                                 HANDLE_EXCEPTION();
    3813             :                         }
    3814             : 
    3815             :                         iter->index = 0;
    3816             :                         if (iter->funcs->rewind) {
    3817             :                                 iter->funcs->rewind(iter);
    3818             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3819             :                                         OBJ_RELEASE(&iter->std);
    3820             : 
    3821             :                                         HANDLE_EXCEPTION();
    3822             :                                 }
    3823             :                         }
    3824             : 
    3825             :                         is_empty = iter->funcs->valid(iter) != SUCCESS;
    3826             : 
    3827             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3828             :                                 OBJ_RELEASE(&iter->std);
    3829             : 
    3830             :                                 HANDLE_EXCEPTION();
    3831             :                         }
    3832             :                         iter->index = -1; /* will be set to 0 before using next handler */
    3833             : 
    3834             :                         ZVAL_OBJ(EX_VAR(opline->result.var), &iter->std);
    3835             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3836             : 
    3837             :                         if (is_empty) {
    3838             :                                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3839             :                         } else {
    3840             :                                 CHECK_EXCEPTION();
    3841             :                                 ZEND_VM_NEXT_OPCODE();
    3842             :                         }
    3843             :                 }
    3844             :         } else {
    3845           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    3846           0 :                 ZVAL_UNDEF(EX_VAR(opline->result.var));
    3847           0 :                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3848             : 
    3849           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3850             :         }
    3851             : }
    3852             : 
    3853           3 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3854             : {
    3855           3 :         USE_OPLINE
    3856             : 
    3857             :         zval *array_ptr, *array_ref;
    3858             :         HashTable *fe_ht;
    3859           3 :         HashPosition pos = 0;
    3860             :         Bucket *p;
    3861             : 
    3862             :         SAVE_OPLINE();
    3863             : 
    3864           3 :         if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3865             :                 array_ref = array_ptr = NULL;
    3866             :                 if (Z_ISREF_P(array_ref)) {
    3867             :                         array_ptr = Z_REFVAL_P(array_ref);
    3868             :                 }
    3869             :         } else {
    3870           3 :                 array_ref = array_ptr = EX_CONSTANT(opline->op1);
    3871             :         }
    3872             : 
    3873           3 :         if (EXPECTED(Z_TYPE_P(array_ptr) == IS_ARRAY)) {
    3874           3 :                 if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3875             :                         if (array_ptr == array_ref) {
    3876             :                                 ZVAL_NEW_REF(array_ref, array_ref);
    3877             :                                 array_ptr = Z_REFVAL_P(array_ref);
    3878             :                         }
    3879             :                         Z_ADDREF_P(array_ref);
    3880             :                         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
    3881             :                 } else {
    3882           3 :                         array_ptr = EX_VAR(opline->result.var);
    3883           3 :                         ZVAL_COPY_VALUE(array_ptr, array_ref);
    3884             :                 }
    3885             :                 if (IS_CONST == IS_CONST) {
    3886           3 :                         zval_copy_ctor_func(array_ptr);
    3887             :                 } else {
    3888             :                         SEPARATE_ARRAY(array_ptr);
    3889             :                 }
    3890           3 :                 fe_ht = Z_ARRVAL_P(array_ptr);
    3891           3 :                 p = fe_ht->arData;
    3892             :                 while (1) {
    3893           3 :                         if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
    3894             : 
    3895           0 :                                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3896           0 :                                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3897             :                         }
    3898           9 :                         if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) &&
    3899           6 :                             (EXPECTED(Z_TYPE(p->val) != IS_INDIRECT) ||
    3900           0 :                              EXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) != IS_UNDEF))) {
    3901             :                                 break;
    3902             :                         }
    3903           0 :                         pos++;
    3904           0 :                         p++;
    3905           0 :                 }
    3906           3 :                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
    3907             : 
    3908             :                 CHECK_EXCEPTION();
    3909           3 :                 ZEND_VM_NEXT_OPCODE();
    3910           0 :         } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
    3911             :                 if (!Z_OBJCE_P(array_ptr)->get_iterator) {
    3912             :                         if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3913             :                                 if (array_ptr == array_ref) {
    3914             :                                         ZVAL_NEW_REF(array_ref, array_ref);
    3915             :                                         array_ptr = Z_REFVAL_P(array_ref);
    3916             :                                 }
    3917             :                                 Z_ADDREF_P(array_ref);
    3918             :                                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
    3919             :                         } else {
    3920             :                                 array_ptr = EX_VAR(opline->result.var);
    3921             :                                 ZVAL_COPY_VALUE(array_ptr, array_ref);
    3922             :                         }
    3923             :                         fe_ht = Z_OBJPROP_P(array_ptr);
    3924             :                         p = fe_ht->arData;
    3925             :                         while (1) {
    3926             :                                 if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
    3927             : 
    3928             :                                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3929             :                                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3930             :                                 }
    3931             :                                 if ((EXPECTED(Z_TYPE(p->val) != IS_UNDEF) &&
    3932             :                                      (EXPECTED(Z_TYPE(p->val) != IS_INDIRECT) ||
    3933             :                                       EXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) != IS_UNDEF))) &&
    3934             :                                     (UNEXPECTED(!p->key) ||
    3935             :                                      EXPECTED(zend_check_property_access(Z_OBJ_P(array_ptr), p->key) == SUCCESS))) {
    3936             :                                         break;
    3937             :                                 }
    3938             :                                 pos++;
    3939             :                                 p++;
    3940             :                         }
    3941             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
    3942             : 
    3943             :                         CHECK_EXCEPTION();
    3944             :                         ZEND_VM_NEXT_OPCODE();
    3945             :                 } else {
    3946             :                         zend_class_entry *ce = Z_OBJCE_P(array_ptr);
    3947             :                         zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
    3948             :                         zend_bool is_empty;
    3949             : 
    3950             :                         if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
    3951             :                                 if (IS_CONST == IS_VAR) {
    3952             : 
    3953             :                                 } else {
    3954             : 
    3955             :                                 }
    3956             :                                 if (!EG(exception)) {
    3957             :                                         zend_throw_exception_ex(NULL, 0, "Object of type %s did not create an Iterator", ce->name->val);
    3958             :                                 }
    3959             :                                 zend_throw_exception_internal(NULL);
    3960             :                                 HANDLE_EXCEPTION();
    3961             :                         }
    3962             : 
    3963             :                         iter->index = 0;
    3964             :                         if (iter->funcs->rewind) {
    3965             :                                 iter->funcs->rewind(iter);
    3966             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3967             :                                         OBJ_RELEASE(&iter->std);
    3968             :                                         if (IS_CONST == IS_VAR) {
    3969             : 
    3970             :                                         } else {
    3971             : 
    3972             :                                         }
    3973             :                                         HANDLE_EXCEPTION();
    3974             :                                 }
    3975             :                         }
    3976             : 
    3977             :                         is_empty = iter->funcs->valid(iter) != SUCCESS;
    3978             : 
    3979             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3980             :                                 OBJ_RELEASE(&iter->std);
    3981             :                                 if (IS_CONST == IS_VAR) {
    3982             : 
    3983             :                                 } else {
    3984             : 
    3985             :                                 }
    3986             :                                 HANDLE_EXCEPTION();
    3987             :                         }
    3988             :                         iter->index = -1; /* will be set to 0 before using next handler */
    3989             : 
    3990             :                         ZVAL_OBJ(EX_VAR(opline->result.var), &iter->std);
    3991             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3992             : 
    3993             :                         if (IS_CONST == IS_VAR) {
    3994             : 
    3995             :                         } else {
    3996             : 
    3997             :                         }
    3998             :                         if (is_empty) {
    3999             :                                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    4000             :                         } else {
    4001             :                                 CHECK_EXCEPTION();
    4002             :                                 ZEND_VM_NEXT_OPCODE();
    4003             :                         }
    4004             :                 }
    4005             :         } else {
    4006           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    4007           0 :                 ZVAL_UNDEF(EX_VAR(opline->result.var));
    4008           0 :                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    4009             :                 if (IS_CONST == IS_VAR) {
    4010             : 
    4011             :                 } else {
    4012             : 
    4013             :                 }
    4014           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    4015             :         }
    4016             : }
    4017             : 
    4018         840 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4019             : {
    4020             : #if 0 || (IS_CONST != IS_UNUSED)
    4021         840 :         USE_OPLINE
    4022             : 
    4023             :         SAVE_OPLINE();
    4024             :         if (IS_CONST != IS_UNUSED) {
    4025             : 
    4026         840 :                 zval *ptr = EX_CONSTANT(opline->op1);
    4027             : 
    4028             :                 do {
    4029         840 :                         if (Z_TYPE_P(ptr) == IS_LONG) {
    4030          34 :                                 EG(exit_status) = Z_LVAL_P(ptr);
    4031             :                         } else {
    4032         806 :                                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(ptr)) {
    4033             :                                         ptr = Z_REFVAL_P(ptr);
    4034             :                                         if (Z_TYPE_P(ptr) == IS_LONG) {
    4035             :                                                 EG(exit_status) = Z_LVAL_P(ptr);
    4036             :                                                 break;
    4037             :                                         }
    4038             :                                 }
    4039         806 :                                 zend_print_variable(ptr);
    4040             :                         }
    4041             :                 } while (0);
    4042             : 
    4043             :         }
    4044             : #endif
    4045         840 :         zend_bailout();
    4046           0 :         ZEND_VM_NEXT_OPCODE(); /* Never reached */
    4047             : }
    4048             : 
    4049           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4050             : {
    4051           5 :         USE_OPLINE
    4052             : 
    4053             :         zval *value;
    4054           5 :         zval *ref = NULL;
    4055             : 
    4056             :         SAVE_OPLINE();
    4057           5 :         value = EX_CONSTANT(opline->op1);
    4058             : 
    4059           5 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    4060             :                 if (IS_CONST == IS_VAR) {
    4061             :                         ref = value;
    4062             :                 }
    4063             :                 value = Z_REFVAL_P(value);
    4064             :         }
    4065           5 :         if (i_zend_is_true(value)) {
    4066           3 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    4067             :                 if (IS_CONST == IS_CONST) {
    4068           3 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
    4069           0 :                                 zval_copy_ctor_func(EX_VAR(opline->result.var));
    4070             :                         }
    4071             :                 } else if (IS_CONST == IS_CV) {
    4072             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4073             :                 } else if (IS_CONST == IS_VAR && ref) {
    4074             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4075             :                         if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    4076             :                                 efree_size(ref, sizeof(zend_reference));
    4077             :                         }
    4078             :                 }
    4079           3 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    4080             :         }
    4081             : 
    4082             :         CHECK_EXCEPTION();
    4083           2 :         ZEND_VM_NEXT_OPCODE();
    4084             : }
    4085             : 
    4086           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4087             : {
    4088           0 :         USE_OPLINE
    4089             : 
    4090             :         zval *value;
    4091           0 :         zval *ref = NULL;
    4092             : 
    4093             :         SAVE_OPLINE();
    4094           0 :         value = EX_CONSTANT(opline->op1);
    4095             : 
    4096           0 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    4097             :                 if (IS_CONST == IS_VAR) {
    4098             :                         ref = value;
    4099             :                 }
    4100             :                 value = Z_REFVAL_P(value);
    4101             :         }
    4102             : 
    4103           0 :         if (Z_TYPE_P(value) > IS_NULL) {
    4104           0 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    4105             :                 if (IS_CONST == IS_CONST) {
    4106           0 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
    4107           0 :                                 zval_copy_ctor_func(EX_VAR(opline->result.var));
    4108             :                         }
    4109             :                 } else if (IS_CONST == IS_CV) {
    4110             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4111             :                 } else if (IS_CONST == IS_VAR && ref) {
    4112             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4113             :                         if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    4114             :                                 efree_size(ref, sizeof(zend_reference));
    4115             :                         }
    4116             :                 }
    4117           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    4118             :         }
    4119             : 
    4120             :         CHECK_EXCEPTION();
    4121           0 :         ZEND_VM_NEXT_OPCODE();
    4122             : }
    4123             : 
    4124      483663 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4125             : {
    4126      483663 :         USE_OPLINE
    4127             : 
    4128             :         zval *value;
    4129             : 
    4130      483663 :         value = EX_CONSTANT(opline->op1);
    4131      483663 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
    4132             :                 SAVE_OPLINE();
    4133             :                 value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
    4134             :                 CHECK_EXCEPTION();
    4135             :         }
    4136             : 
    4137      483663 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    4138             :                 ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(value));
    4139             :                 if (IS_CONST == IS_VAR) {
    4140             :                         if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
    4141             :                                 efree_size(Z_REF_P(value), sizeof(zend_reference));
    4142             :                         }
    4143             :                 }
    4144             :         } else {
    4145      483663 :                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    4146             :                 if (IS_CONST == IS_CONST) {
    4147      483663 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
    4148           6 :                                 zval_copy_ctor_func(EX_VAR(opline->result.var));
    4149             :                         }
    4150             :                 } else if (IS_CONST == IS_CV) {
    4151             :                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    4152             :                 }
    4153             :         }
    4154      483663 :         ZEND_VM_NEXT_OPCODE();
    4155             : }
    4156             : 
    4157           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4158             : {
    4159           2 :         USE_OPLINE
    4160             : 
    4161           2 :         zend_generator *generator = zend_get_running_generator(execute_data);
    4162             : 
    4163             :         zval *val;
    4164             : 
    4165             : 
    4166             :         SAVE_OPLINE();
    4167           2 :         val = EX_CONSTANT(opline->op1);
    4168             : 
    4169           2 :         if (Z_TYPE_P(val) == IS_ARRAY) {
    4170           2 :                 ZVAL_COPY_VALUE(&generator->values, val);
    4171           2 :                 if (IS_CONST != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
    4172             :                         Z_ADDREF_P(val);
    4173             :                 }
    4174           2 :                 Z_FE_POS(generator->values) = 0;
    4175             : 
    4176           0 :         } else if (IS_CONST != IS_CONST && Z_TYPE_P(val) == IS_OBJECT && Z_OBJCE_P(val)->get_iterator) {
    4177             :                 zend_class_entry *ce = Z_OBJCE_P(val);
    4178             :                 if (ce == zend_ce_generator) {
    4179             :                         zend_generator *new_gen = (zend_generator *) Z_OBJ_P(val);
    4180             : 
    4181             :                         if (IS_CONST != IS_TMP_VAR) {
    4182             :                                 Z_ADDREF_P(val);
    4183             :                         }
    4184             : 
    4185             :                         if (Z_ISUNDEF(new_gen->retval)) {
    4186             :                                 if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
    4187             :                                         zend_error(E_ERROR | E_EXCEPTION, "Impossible to yield from the Generator being currently run");
    4188             :                                         HANDLE_EXCEPTION();
    4189             :                                 } else {
    4190             :                                         zend_generator_yield_from(generator, new_gen);
    4191             :                                 }
    4192             :                         } else if (UNEXPECTED(new_gen->execute_data == NULL)) {
    4193             :                                 zend_error(E_ERROR | E_EXCEPTION, "Generator passed to yield from was aborted without proper return and is unable to continue");
    4194             :                                 HANDLE_EXCEPTION();
    4195             :                         } else {
    4196             :                                 if (RETURN_VALUE_USED(opline)) {
    4197             :                                         ZVAL_COPY(EX_VAR(opline->result.var), &new_gen->retval);
    4198             :                                 }
    4199             :                                 ZEND_VM_NEXT_OPCODE();
    4200             :                         }
    4201             :                 } else {
    4202             :                         zend_object_iterator *iter = ce->get_iterator(ce, val, 0);
    4203             : 
    4204             :                         if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
    4205             :                                 if (!EG(exception)) {
    4206             :                                         zend_error(E_ERROR | E_EXCEPTION, "Object of type %s did not create an Iterator", ce->name->val);
    4207             :                                 }
    4208             :                                 HANDLE_EXCEPTION();
    4209             :                         }
    4210             : 
    4211             :                         iter->index = 0;
    4212             :                         if (iter->funcs->rewind) {
    4213             :                                 iter->funcs->rewind(iter);
    4214             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4215             :                                         OBJ_RELEASE(&iter->std);
    4216             :                                         HANDLE_EXCEPTION();
    4217             :                                 }
    4218             :                         }
    4219             : 
    4220             :                         ZVAL_OBJ(&generator->values, &iter->std);
    4221             :                 }
    4222             :         } else {
    4223           0 :                 zend_error(E_ERROR | E_EXCEPTION, "Can use \"yield from\" only with arrays and Traversables", 0);
    4224           0 :                 HANDLE_EXCEPTION();
    4225             :         }
    4226             : 
    4227             :         /* This is the default return value
    4228             :          * when the expression is a Generator, it will be overwritten in zend_generator_resume() */
    4229           2 :         if (RETURN_VALUE_USED(opline)) {
    4230           2 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    4231             :         }
    4232             : 
    4233             :         /* We increment to the next op, so we are at the correct position when the
    4234             :          * generator is resumed. */
    4235           2 :         ZEND_VM_INC_OPCODE();
    4236             : 
    4237             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    4238             :          * variable in execute_data so we don't resume at an old position. */
    4239             :         SAVE_OPLINE();
    4240             : 
    4241           2 :         ZEND_VM_RETURN();
    4242             : }
    4243             : 
    4244           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4245             : {
    4246           4 :         USE_OPLINE
    4247             :         zval *value;
    4248             : 
    4249             : 
    4250             :         SAVE_OPLINE();
    4251           4 :         value = EX_CONSTANT(opline->op1);
    4252             : try_strlen:
    4253           4 :         if (EXPECTED(Z_TYPE_P(value) == IS_STRING)) {
    4254           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_STRLEN_P(value));
    4255             :         } else {
    4256             :                 zend_bool strict;
    4257             : 
    4258           4 :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
    4259             :                         value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
    4260             :                 }
    4261           4 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(value) == IS_REFERENCE) {
    4262             :                         value = Z_REFVAL_P(value);
    4263             :                         goto try_strlen;
    4264             :                 }
    4265           4 :                 strict = EX_USES_STRICT_TYPES();
    4266             :                 do {
    4267           4 :                         if (EXPECTED(!strict)) {
    4268             :                                 zend_string *str;
    4269             :                                 zval tmp;
    4270             : 
    4271           3 :                                 ZVAL_COPY(&tmp, value);
    4272           3 :                                 if (zend_parse_arg_str_weak(&tmp, &str)) {
    4273           3 :                                         ZVAL_LONG(EX_VAR(opline->result.var), str->len);
    4274             :                                         zval_ptr_dtor(&tmp);
    4275           3 :                                         break;
    4276             :                                 }
    4277             :                                 zval_ptr_dtor(&tmp);
    4278             :                         }
    4279           1 :                         zend_internal_type_error(strict, "strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
    4280           1 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    4281             :                 } while (0);
    4282             :         }
    4283             : 
    4284             :         CHECK_EXCEPTION();
    4285           4 :         ZEND_VM_NEXT_OPCODE();
    4286             : }
    4287             : 
    4288           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4289             : {
    4290           5 :         USE_OPLINE
    4291             :         zval *value;
    4292           5 :         int result = 0;
    4293             : 
    4294             : 
    4295             :         SAVE_OPLINE();
    4296           5 :         value = EX_CONSTANT(opline->op1);
    4297           5 :         if (EXPECTED(Z_TYPE_P(value) == opline->extended_value)) {
    4298           5 :                 if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(value) == IS_OBJECT)) {
    4299             :                         zend_class_entry *ce = Z_OBJCE_P(value);
    4300             : 
    4301             :                         if (UNEXPECTED(ce->name->len != sizeof("__PHP_Incomplete_Class") - 1) ||
    4302             :                             EXPECTED(memcmp(ce->name->val, "__PHP_Incomplete_Class", sizeof("__PHP_Incomplete_Class") - 1) != 0)) {
    4303             :                                 result = 1;
    4304             :                         }
    4305           5 :                 } else if (UNEXPECTED(Z_TYPE_P(value) == IS_RESOURCE)) {
    4306           0 :                         const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(value));
    4307             : 
    4308           0 :                         if (EXPECTED(type_name != NULL)) {
    4309           0 :                                 result = 1;
    4310             :                         }
    4311             :                 } else {
    4312           5 :                         result = 1;
    4313             :                 }
    4314           0 :         } else if (UNEXPECTED(opline->extended_value == _IS_BOOL) &&
    4315             :                            EXPECTED(Z_TYPE_P(value) == IS_TRUE || Z_TYPE_P(value) == IS_FALSE)) {
    4316           0 :                 result = 1;
    4317             :         }
    4318             : 
    4319           5 :         ZEND_VM_SMART_BRANCH(result, 1);
    4320           1 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4321             :         CHECK_EXCEPTION();
    4322           1 :         ZEND_VM_NEXT_OPCODE();
    4323             : }
    4324             : 
    4325         169 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DEFINED_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4326             : {
    4327         169 :         USE_OPLINE
    4328             :         zend_constant *c;
    4329             :         int result;
    4330             : 
    4331         169 :         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    4332           1 :                 result = 1;
    4333         168 :         } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op1), 0)) == NULL) {
    4334          16 :                 result = 0;
    4335          16 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    4336             :         } else {
    4337         152 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), c);
    4338         152 :                 result = 1;
    4339             :         }
    4340         169 :         ZEND_VM_SMART_BRANCH(result, 0);
    4341         135 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4342         135 :         ZEND_VM_NEXT_OPCODE();
    4343             : }
    4344             : 
    4345           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4346             : {
    4347           0 :         USE_OPLINE
    4348             : 
    4349             :         zval *op1, *op2, *result;
    4350             : 
    4351           0 :         op1 = EX_CONSTANT(opline->op1);
    4352           0 :         op2 = EX_CONSTANT(opline->op2);
    4353           0 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4354           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4355           0 :                         result = EX_VAR(opline->result.var);
    4356             :                         fast_long_add_function(result, op1, op2);
    4357           0 :                         ZEND_VM_NEXT_OPCODE();
    4358           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4359           0 :                         result = EX_VAR(opline->result.var);
    4360           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2));
    4361           0 :                         ZEND_VM_NEXT_OPCODE();
    4362             :                 }
    4363           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4364           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4365           0 :                         result = EX_VAR(opline->result.var);
    4366           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
    4367           0 :                         ZEND_VM_NEXT_OPCODE();
    4368           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4369           0 :                         result = EX_VAR(opline->result.var);
    4370           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2)));
    4371           0 :                         ZEND_VM_NEXT_OPCODE();
    4372             :                 }
    4373             :         }
    4374             : 
    4375             :         SAVE_OPLINE();
    4376           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4377             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4378             :         }
    4379           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4380             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4381             :         }
    4382           0 :         add_function(EX_VAR(opline->result.var), op1, op2);
    4383             : 
    4384             : 
    4385             :         CHECK_EXCEPTION();
    4386           0 :         ZEND_VM_NEXT_OPCODE();
    4387             : }
    4388             : 
    4389           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4390             : {
    4391           0 :         USE_OPLINE
    4392             : 
    4393             :         zval *op1, *op2, *result;
    4394             : 
    4395           0 :         op1 = EX_CONSTANT(opline->op1);
    4396           0 :         op2 = EX_CONSTANT(opline->op2);
    4397           0 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4398           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4399           0 :                         result = EX_VAR(opline->result.var);
    4400             :                         fast_long_sub_function(result, op1, op2);
    4401           0 :                         ZEND_VM_NEXT_OPCODE();
    4402           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4403           0 :                         result = EX_VAR(opline->result.var);
    4404           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2));
    4405           0 :                         ZEND_VM_NEXT_OPCODE();
    4406             :                 }
    4407           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4408           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4409           0 :                         result = EX_VAR(opline->result.var);
    4410           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
    4411           0 :                         ZEND_VM_NEXT_OPCODE();
    4412           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4413           0 :                         result = EX_VAR(opline->result.var);
    4414           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2)));
    4415           0 :                         ZEND_VM_NEXT_OPCODE();
    4416             :                 }
    4417             :         }
    4418             : 
    4419             :         SAVE_OPLINE();
    4420           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4421             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4422             :         }
    4423           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4424             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4425             :         }
    4426           0 :         sub_function(EX_VAR(opline->result.var), op1, op2);
    4427             : 
    4428             : 
    4429             :         CHECK_EXCEPTION();
    4430           0 :         ZEND_VM_NEXT_OPCODE();
    4431             : }
    4432             : 
    4433           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4434             : {
    4435           0 :         USE_OPLINE
    4436             : 
    4437             :         zval *op1, *op2, *result;
    4438             : 
    4439           0 :         op1 = EX_CONSTANT(opline->op1);
    4440           0 :         op2 = EX_CONSTANT(opline->op2);
    4441           0 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4442           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4443             :                         zend_long overflow;
    4444             : 
    4445           0 :                         result = EX_VAR(opline->result.var);
    4446           0 :                         ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
    4447           0 :                         Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
    4448           0 :                         ZEND_VM_NEXT_OPCODE();
    4449           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4450           0 :                         result = EX_VAR(opline->result.var);
    4451           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2));
    4452           0 :                         ZEND_VM_NEXT_OPCODE();
    4453             :                 }
    4454           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4455           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4456           0 :                         result = EX_VAR(opline->result.var);
    4457           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
    4458           0 :                         ZEND_VM_NEXT_OPCODE();
    4459           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4460           0 :                         result = EX_VAR(opline->result.var);
    4461           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2)));
    4462           0 :                         ZEND_VM_NEXT_OPCODE();
    4463             :                 }
    4464             :         }
    4465             : 
    4466             :         SAVE_OPLINE();
    4467           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4468             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4469             :         }
    4470           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4471             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4472             :         }
    4473           0 :         mul_function(EX_VAR(opline->result.var), op1, op2);
    4474             : 
    4475             : 
    4476             :         CHECK_EXCEPTION();
    4477           0 :         ZEND_VM_NEXT_OPCODE();
    4478             : }
    4479             : 
    4480           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4481             : {
    4482           1 :         USE_OPLINE
    4483             : 
    4484             :         zval *op1, *op2;
    4485             : 
    4486             :         SAVE_OPLINE();
    4487           1 :         op1 = EX_CONSTANT(opline->op1);
    4488           1 :         op2 = EX_CONSTANT(opline->op2);
    4489           1 :         fast_div_function(EX_VAR(opline->result.var), op1, op2);
    4490             : 
    4491             : 
    4492             :         CHECK_EXCEPTION();
    4493           1 :         ZEND_VM_NEXT_OPCODE();
    4494             : }
    4495             : 
    4496           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4497             : {
    4498           0 :         USE_OPLINE
    4499             : 
    4500             :         zval *op1, *op2, *result;
    4501             : 
    4502           0 :         op1 = EX_CONSTANT(opline->op1);
    4503           0 :         op2 = EX_CONSTANT(opline->op2);
    4504           0 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4505           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4506           0 :                         result = EX_VAR(opline->result.var);
    4507           0 :                         if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
    4508             :                                 SAVE_OPLINE();
    4509           0 :                                 zend_throw_exception_ex(NULL, 0, "Division by zero");
    4510           0 :                                 HANDLE_EXCEPTION();
    4511           0 :                         } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
    4512             :                                 /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
    4513           0 :                                 ZVAL_LONG(result, 0);
    4514             :                         } else {
    4515           0 :                                 ZVAL_LONG(result, Z_LVAL_P(op1) % Z_LVAL_P(op2));
    4516             :                         }
    4517           0 :                         ZEND_VM_NEXT_OPCODE();
    4518             :                 }
    4519             :         }
    4520             : 
    4521             :         SAVE_OPLINE();
    4522           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4523             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4524             :         }
    4525           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4526             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4527             :         }
    4528           0 :         mod_function(EX_VAR(opline->result.var), op1, op2);
    4529             : 
    4530             : 
    4531             :         CHECK_EXCEPTION();
    4532           0 :         ZEND_VM_NEXT_OPCODE();
    4533             : }
    4534             : 
    4535           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4536             : {
    4537           0 :         USE_OPLINE
    4538             : 
    4539             :         zval *op1, *op2;
    4540             : 
    4541             :         SAVE_OPLINE();
    4542           0 :         op1 = EX_CONSTANT(opline->op1);
    4543           0 :         op2 = EX_CONSTANT(opline->op2);
    4544           0 :         shift_left_function(EX_VAR(opline->result.var), op1, op2);
    4545             : 
    4546             : 
    4547             :         CHECK_EXCEPTION();
    4548           0 :         ZEND_VM_NEXT_OPCODE();
    4549             : }
    4550             : 
    4551           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4552             : {
    4553           0 :         USE_OPLINE
    4554             : 
    4555             :         zval *op1, *op2;
    4556             : 
    4557             :         SAVE_OPLINE();
    4558           0 :         op1 = EX_CONSTANT(opline->op1);
    4559           0 :         op2 = EX_CONSTANT(opline->op2);
    4560           0 :         shift_right_function(EX_VAR(opline->result.var), op1, op2);
    4561             : 
    4562             : 
    4563             :         CHECK_EXCEPTION();
    4564           0 :         ZEND_VM_NEXT_OPCODE();
    4565             : }
    4566             : 
    4567           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4568             : {
    4569           0 :         USE_OPLINE
    4570             : 
    4571             :         zval *op1, *op2;
    4572             : 
    4573             :         SAVE_OPLINE();
    4574           0 :         op1 = EX_CONSTANT(opline->op1);
    4575           0 :         op2 = EX_CONSTANT(opline->op2);
    4576             : 
    4577             :         do {
    4578             :                 if ((IS_CONST == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) &&
    4579             :                     (IS_CONST == IS_CONST || EXPECTED(Z_TYPE_P(op2) == IS_STRING))) {
    4580           0 :                         zend_string *op1_str = Z_STR_P(op1);
    4581           0 :                         zend_string *op2_str = Z_STR_P(op2);
    4582             :                         zend_string *str;
    4583             : 
    4584           0 :                         if (IS_CONST != IS_CONST) {
    4585             :                                 if (UNEXPECTED(op1_str->len == 0)) {
    4586             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op2_str);
    4587             : 
    4588             :                                         break;
    4589             :                                 }
    4590             :                         }
    4591           0 :                         if (IS_CONST != IS_CONST) {
    4592             :                                 if (UNEXPECTED(op2_str->len == 0)) {
    4593             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op1_str);
    4594             : 
    4595             :                                         break;
    4596             :                                 }
    4597             :                         }
    4598           0 :                         if (IS_CONST != IS_CONST && IS_CONST != IS_CV &&
    4599             :                             !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
    4600             :                             size_t len = op1_str->len;
    4601             : 
    4602             :                                 str = zend_string_realloc(op1_str, len + op2_str->len, 0);
    4603             :                                 memcpy(str->val + len, op2_str->val, op2_str->len+1);
    4604             :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    4605             :                                 break;
    4606             :                         } else {
    4607           0 :                                 str = zend_string_alloc(op1_str->len + op2_str->len, 0);
    4608           0 :                                 memcpy(str->val, op1_str->val, op1_str->len);
    4609           0 :                                 memcpy(str->val + op1_str->len, op2_str->val, op2_str->len+1);
    4610           0 :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    4611             :                         }
    4612             :                 } else {
    4613             :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    4614             :                                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4615             :                         }
    4616             :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    4617             :                                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4618             :                         }
    4619             :                         concat_function(EX_VAR(opline->result.var), op1, op2);
    4620             :                 }
    4621             : 
    4622             :         } while (0);
    4623             : 
    4624             :         CHECK_EXCEPTION();
    4625           0 :         ZEND_VM_NEXT_OPCODE();
    4626             : }
    4627             : 
    4628           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4629             : {
    4630           0 :         USE_OPLINE
    4631             : 
    4632             :         zval *op1, *op2;
    4633             :         int result;
    4634             : 
    4635             :         SAVE_OPLINE();
    4636           0 :         op1 = EX_CONSTANT(opline->op1);
    4637           0 :         op2 = EX_CONSTANT(opline->op2);
    4638           0 :         result = fast_is_identical_function(op1, op2);
    4639             : 
    4640             : 
    4641           0 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
    4642           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4643             :         if ((IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
    4644             :                 CHECK_EXCEPTION();
    4645             :         }
    4646           0 :         ZEND_VM_NEXT_OPCODE();
    4647             : }
    4648             : 
    4649           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4650             : {
    4651           0 :         USE_OPLINE
    4652             : 
    4653             :         zval *op1, *op2;
    4654             :         int result;
    4655             : 
    4656             :         SAVE_OPLINE();
    4657           0 :         op1 = EX_CONSTANT(opline->op1);
    4658           0 :         op2 = EX_CONSTANT(opline->op2);
    4659           0 :         result = fast_is_not_identical_function(op1, op2);
    4660             : 
    4661             : 
    4662           0 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR));
    4663           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4664             :         if ((IS_CONST|IS_CONST) & (IS_VAR|IS_TMP_VAR)) {
    4665             :                 CHECK_EXCEPTION();
    4666             :         }
    4667           0 :         ZEND_VM_NEXT_OPCODE();
    4668             : }
    4669             : 
    4670           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4671             : {
    4672           0 :         USE_OPLINE
    4673             : 
    4674             :         zval *op1, *op2, *result;
    4675             : 
    4676           0 :         op1 = EX_CONSTANT(opline->op1);
    4677           0 :         op2 = EX_CONSTANT(opline->op2);
    4678             :         do {
    4679             :                 int result;
    4680             : 
    4681           0 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    4682           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4683           0 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    4684           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4685           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    4686             :                         } else {
    4687           0 :                                 break;
    4688             :                         }
    4689           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    4690           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4691           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    4692           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4693           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    4694             :                         } else {
    4695           0 :                                 break;
    4696             :                         }
    4697           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    4698           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    4699           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    4700           0 :                                         result = 1;
    4701           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    4702           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    4703           0 :                                                 result = 0;
    4704             :                                         } else {
    4705           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    4706             :                                         }
    4707             :                                 } else {
    4708           0 :                                         result = (zendi_smart_strcmp(op1, op2) == 0);
    4709             :                                 }
    4710             : 
    4711             : 
    4712             :                         } else {
    4713           0 :                                 break;
    4714             :                         }
    4715             :                 } else {
    4716           0 :                         break;
    4717             :                 }
    4718           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4719           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4720           0 :                 ZEND_VM_NEXT_OPCODE();
    4721             :         } while (0);
    4722             : 
    4723             :         SAVE_OPLINE();
    4724           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    4725             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4726             :         }
    4727           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    4728             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4729             :         }
    4730           0 :         result = EX_VAR(opline->result.var);
    4731           0 :         compare_function(result, op1, op2);
    4732           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    4733             : 
    4734             : 
    4735             :         CHECK_EXCEPTION();
    4736           0 :         ZEND_VM_NEXT_OPCODE();
    4737             : }
    4738             : 
    4739           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4740             : {
    4741           0 :         USE_OPLINE
    4742             : 
    4743             :         zval *op1, *op2, *result;
    4744             : 
    4745           0 :         op1 = EX_CONSTANT(opline->op1);
    4746           0 :         op2 = EX_CONSTANT(opline->op2);
    4747             :         do {
    4748             :                 int result;
    4749             : 
    4750           0 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    4751           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4752           0 :                                 result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
    4753           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4754           0 :                                 result = ((double)Z_LVAL_P(op1) != Z_DVAL_P(op2));
    4755             :                         } else {
    4756           0 :                                 break;
    4757             :                         }
    4758           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    4759           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4760           0 :                                 result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
    4761           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4762           0 :                                 result = (Z_DVAL_P(op1) != ((double)Z_LVAL_P(op2)));
    4763             :                         } else {
    4764           0 :                                 break;
    4765             :                         }
    4766           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    4767           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    4768           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    4769           0 :                                         result = 0;
    4770           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    4771           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    4772           0 :                                                 result = 1;
    4773             :                                         } else {
    4774           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
    4775             :                                         }
    4776             :                                 } else {
    4777           0 :                                         result = (zendi_smart_strcmp(op1, op2) != 0);
    4778             :                                 }
    4779             : 
    4780             : 
    4781             :                         } else {
    4782           0 :                                 break;
    4783             :                         }
    4784             :                 } else {
    4785           0 :                         break;
    4786             :                 }
    4787           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4788           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4789           0 :                 ZEND_VM_NEXT_OPCODE();
    4790             :         } while (0);
    4791             : 
    4792             :         SAVE_OPLINE();
    4793           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    4794             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4795             :         }
    4796           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    4797             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4798             :         }
    4799           0 :         result = EX_VAR(opline->result.var);
    4800           0 :         compare_function(result, op1, op2);
    4801           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
    4802             : 
    4803             : 
    4804             :         CHECK_EXCEPTION();
    4805           0 :         ZEND_VM_NEXT_OPCODE();
    4806             : }
    4807             : 
    4808           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4809             : {
    4810           0 :         USE_OPLINE
    4811             : 
    4812             :         zval *op1, *op2, *result;
    4813             : 
    4814           0 :         op1 = EX_CONSTANT(opline->op1);
    4815           0 :         op2 = EX_CONSTANT(opline->op2);
    4816             :         do {
    4817             :                 int result;
    4818             : 
    4819           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4820           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4821           0 :                                 result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
    4822           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4823           0 :                                 result = ((double)Z_LVAL_P(op1) < Z_DVAL_P(op2));
    4824             :                         } else {
    4825           0 :                                 break;
    4826             :                         }
    4827           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4828           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4829           0 :                                 result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
    4830           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4831           0 :                                 result = (Z_DVAL_P(op1) < ((double)Z_LVAL_P(op2)));
    4832             :                         } else {
    4833           0 :                                 break;
    4834             :                         }
    4835             :                 } else {
    4836           0 :                         break;
    4837             :                 }
    4838           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4839           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4840           0 :                 ZEND_VM_NEXT_OPCODE();
    4841             :         } while (0);
    4842             : 
    4843             :         SAVE_OPLINE();
    4844           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4845             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4846             :         }
    4847           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4848             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4849             :         }
    4850           0 :         result = EX_VAR(opline->result.var);
    4851           0 :         compare_function(result, op1, op2);
    4852           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
    4853             : 
    4854             : 
    4855             :         CHECK_EXCEPTION();
    4856           0 :         ZEND_VM_NEXT_OPCODE();
    4857             : }
    4858             : 
    4859           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4860             : {
    4861           0 :         USE_OPLINE
    4862             : 
    4863             :         zval *op1, *op2, *result;
    4864             : 
    4865           0 :         op1 = EX_CONSTANT(opline->op1);
    4866           0 :         op2 = EX_CONSTANT(opline->op2);
    4867             :         do {
    4868             :                 int result;
    4869             : 
    4870           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4871           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4872           0 :                                 result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
    4873           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4874           0 :                                 result = ((double)Z_LVAL_P(op1) <= Z_DVAL_P(op2));
    4875             :                         } else {
    4876           0 :                                 break;
    4877             :                         }
    4878           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4879           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4880           0 :                                 result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
    4881           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4882           0 :                                 result = (Z_DVAL_P(op1) <= ((double)Z_LVAL_P(op2)));
    4883             :                         } else {
    4884           0 :                                 break;
    4885             :                         }
    4886             :                 } else {
    4887           0 :                         break;
    4888             :                 }
    4889           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4890           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4891           0 :                 ZEND_VM_NEXT_OPCODE();
    4892             :         } while (0);
    4893             : 
    4894             :         SAVE_OPLINE();
    4895           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4896             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4897             :         }
    4898           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4899             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4900             :         }
    4901           0 :         result = EX_VAR(opline->result.var);
    4902           0 :         compare_function(result, op1, op2);
    4903           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
    4904             : 
    4905             : 
    4906             :         CHECK_EXCEPTION();
    4907           0 :         ZEND_VM_NEXT_OPCODE();
    4908             : }
    4909             : 
    4910           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4911             : {
    4912           0 :         USE_OPLINE
    4913             : 
    4914             :         zval *op1, *op2;
    4915             : 
    4916             :         SAVE_OPLINE();
    4917           0 :         op1 = EX_CONSTANT(opline->op1);
    4918           0 :         op2 = EX_CONSTANT(opline->op2);
    4919           0 :         compare_function(EX_VAR(opline->result.var), op1, op2);
    4920             : 
    4921             : 
    4922             :         CHECK_EXCEPTION();
    4923           0 :         ZEND_VM_NEXT_OPCODE();
    4924             : }
    4925             : 
    4926           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4927             : {
    4928           0 :         USE_OPLINE
    4929             : 
    4930             :         zval *op1, *op2;
    4931             : 
    4932             :         SAVE_OPLINE();
    4933           0 :         op1 = EX_CONSTANT(opline->op1);
    4934           0 :         op2 = EX_CONSTANT(opline->op2);
    4935           0 :         bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
    4936             : 
    4937             : 
    4938             :         CHECK_EXCEPTION();
    4939           0 :         ZEND_VM_NEXT_OPCODE();
    4940             : }
    4941             : 
    4942           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4943             : {
    4944           0 :         USE_OPLINE
    4945             : 
    4946             :         zval *op1, *op2;
    4947             : 
    4948             :         SAVE_OPLINE();
    4949           0 :         op1 = EX_CONSTANT(opline->op1);
    4950           0 :         op2 = EX_CONSTANT(opline->op2);
    4951           0 :         bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
    4952             : 
    4953             : 
    4954             :         CHECK_EXCEPTION();
    4955           0 :         ZEND_VM_NEXT_OPCODE();
    4956             : }
    4957             : 
    4958           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4959             : {
    4960           0 :         USE_OPLINE
    4961             : 
    4962             :         zval *op1, *op2;
    4963             : 
    4964             :         SAVE_OPLINE();
    4965           0 :         op1 = EX_CONSTANT(opline->op1);
    4966           0 :         op2 = EX_CONSTANT(opline->op2);
    4967           0 :         bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
    4968             : 
    4969             : 
    4970             :         CHECK_EXCEPTION();
    4971           0 :         ZEND_VM_NEXT_OPCODE();
    4972             : }
    4973             : 
    4974           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4975             : {
    4976           0 :         USE_OPLINE
    4977             : 
    4978             :         zval *op1, *op2;
    4979             : 
    4980             :         SAVE_OPLINE();
    4981           0 :         op1 = EX_CONSTANT(opline->op1);
    4982           0 :         op2 = EX_CONSTANT(opline->op2);
    4983           0 :         boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
    4984             : 
    4985             : 
    4986             :         CHECK_EXCEPTION();
    4987           0 :         ZEND_VM_NEXT_OPCODE();
    4988             : }
    4989             : 
    4990         350 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    4991             : {
    4992         350 :         USE_OPLINE
    4993             : 
    4994             :         zval *varname;
    4995             :         zval *retval;
    4996             :         zend_string *name;
    4997             :         HashTable *target_symbol_table;
    4998             : 
    4999             :         SAVE_OPLINE();
    5000         350 :         varname = EX_CONSTANT(opline->op1);
    5001             : 
    5002             :         if (IS_CONST == IS_CONST) {
    5003         350 :                 name = Z_STR_P(varname);
    5004             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    5005             :                 name = Z_STR_P(varname);
    5006             :                 zend_string_addref(name);
    5007             :         } else {
    5008             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    5009             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    5010             :                 }
    5011             :                 name = zval_get_string(varname);
    5012             :         }
    5013             : 
    5014             :         if (IS_CONST != IS_UNUSED) {
    5015             :                 zend_class_entry *ce;
    5016             : 
    5017             :                 if (IS_CONST == IS_CONST) {
    5018         350 :                         if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    5019             : 
    5020          75 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5021          75 :                                 retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    5022             : 
    5023             :                                 /* check if static properties were destoyed */
    5024          75 :                                 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    5025           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Access to undeclared static property: %s::$%s", ce->name->val, name->val);
    5026             : 
    5027           0 :                                         HANDLE_EXCEPTION();
    5028             :                                 }
    5029             : 
    5030          75 :                                 goto fetch_var_return;
    5031         275 :                         } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    5032           0 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    5033             :                         } else {
    5034         275 :                                 ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    5035         275 :                                 if (UNEXPECTED(ce == NULL)) {
    5036           1 :                                         if (IS_CONST != IS_CONST) {
    5037             :                                                 zend_string_release(name);
    5038             :                                         }
    5039             : 
    5040             :                                         CHECK_EXCEPTION();
    5041           1 :                                         ZEND_VM_NEXT_OPCODE();
    5042             :                                 }
    5043         274 :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    5044             :                         }
    5045             :                 } else {
    5046             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    5047             :                         if (IS_CONST == IS_CONST &&
    5048             :                             (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    5049             : 
    5050             :                                 /* check if static properties were destoyed */
    5051             :                                 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    5052             :                                         zend_error(E_EXCEPTION | E_ERROR, "Access to undeclared static property: %s::$%s", ce->name->val, name->val);
    5053             : 
    5054             :                                         HANDLE_EXCEPTION();
    5055             :                                 }
    5056             : 
    5057             :                                 goto fetch_var_return;
    5058             :                         }
    5059             :                 }
    5060         274 :                 retval = zend_std_get_static_property(ce, name, 0);
    5061         274 :                 if (UNEXPECTED(EG(exception))) {
    5062             : 
    5063          11 :                         HANDLE_EXCEPTION();
    5064             :                 }
    5065         263 :                 if (IS_CONST == IS_CONST && retval) {
    5066         263 :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
    5067             :                 }
    5068             : 
    5069             :         } else {
    5070             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    5071             :                 retval = zend_hash_find(target_symbol_table, name);
    5072             :                 if (retval == NULL) {
    5073             :                         switch (type) {
    5074             :                                 case BP_VAR_R:
    5075             :                                 case BP_VAR_UNSET:
    5076             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    5077             :                                         /* break missing intentionally */
    5078             :                                 case BP_VAR_IS:
    5079             :                                         retval = &EG(uninitialized_zval);
    5080             :                                         break;
    5081             :                                 case BP_VAR_RW:
    5082             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    5083             :                                         /* break missing intentionally */
    5084             :                                 case BP_VAR_W:
    5085             :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    5086             :                                         break;
    5087             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    5088             :                         }
    5089             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    5090             :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    5091             :                         retval = Z_INDIRECT_P(retval);
    5092             :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    5093             :                                 switch (type) {
    5094             :                                         case BP_VAR_R:
    5095             :                                         case BP_VAR_UNSET:
    5096             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    5097             :                                                 /* break missing intentionally */
    5098             :                                         case BP_VAR_IS:
    5099             :                                                 retval = &EG(uninitialized_zval);
    5100             :                                                 break;
    5101             :                                         case BP_VAR_RW:
    5102             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    5103             :                                                 /* break missing intentionally */
    5104             :                                         case BP_VAR_W:
    5105             :                                                 ZVAL_NULL(retval);
    5106             :                                                 break;
    5107             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    5108             :                                 }
    5109             :                         }
    5110             :                 }
    5111             :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    5112             :                         if (Z_CONSTANT_P(retval)) {
    5113             :                                 if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
    5114             : 
    5115             :                                         HANDLE_EXCEPTION();
    5116             :                                 }
    5117             :                         }
    5118             :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    5119             : 
    5120             :                 }
    5121             :         }
    5122             : 
    5123         263 :         if (IS_CONST != IS_CONST) {
    5124             :                 zend_string_release(name);
    5125             :         }
    5126             : 
    5127             : fetch_var_return:
    5128             :         ZEND_ASSERT(retval != NULL);
    5129         600 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    5130         296 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    5131           1 :                         ZVAL_UNREF(retval);
    5132             :                 }
    5133         262 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5134             :         } else {
    5135          76 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    5136             :         }
    5137             :         CHECK_EXCEPTION();
    5138         338 :         ZEND_VM_NEXT_OPCODE();
    5139             : }
    5140             : 
    5141         234 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5142             : {
    5143         234 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5144             : }
    5145             : 
    5146          64 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5147             : {
    5148          64 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5149             : }
    5150             : 
    5151          14 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5152             : {
    5153          14 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5154             : }
    5155             : 
    5156          36 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5157             : {
    5158          36 :         USE_OPLINE
    5159             : 
    5160          72 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    5161           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5162             :         } else {
    5163          36 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5164             :         }
    5165             : }
    5166             : 
    5167           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5168             : {
    5169           2 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5170             : }
    5171             : 
    5172           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5173             : {
    5174           0 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    5175             : }
    5176             : 
    5177          16 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5178             : {
    5179          16 :         USE_OPLINE
    5180             : 
    5181             :         zval *container;
    5182             : 
    5183             :         SAVE_OPLINE();
    5184          16 :         container = EX_CONSTANT(opline->op1);
    5185          16 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    5186             : 
    5187             : 
    5188             :         CHECK_EXCEPTION();
    5189          16 :         ZEND_VM_NEXT_OPCODE();
    5190             : }
    5191             : 
    5192           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5193             : {
    5194           2 :         USE_OPLINE
    5195             : 
    5196             :         zval *container;
    5197             : 
    5198             :         SAVE_OPLINE();
    5199           2 :         container = EX_CONSTANT(opline->op1);
    5200           2 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    5201             : 
    5202             : 
    5203             :         CHECK_EXCEPTION();
    5204           2 :         ZEND_VM_NEXT_OPCODE();
    5205             : }
    5206             : 
    5207           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5208             : {
    5209           1 :         USE_OPLINE
    5210             :         zval *container;
    5211             :         zend_free_op free_op1;
    5212             : 
    5213             :         SAVE_OPLINE();
    5214             : 
    5215           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    5216             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5217           1 :             zend_error(E_EXCEPTION | E_ERROR, "Cannot use temporary expression in write context");
    5218             : 
    5219             : 
    5220           1 :                         HANDLE_EXCEPTION();
    5221             :         }
    5222             :                 container = NULL;
    5223             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    5224             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use string offset as an array");
    5225             : 
    5226             :                         HANDLE_EXCEPTION();
    5227             :                 }
    5228             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    5229             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    5230             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5231             :                 }
    5232             : 
    5233             : 
    5234             :         } else {
    5235           0 :                 if (IS_CONST == IS_UNUSED) {
    5236             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use [] for reading");
    5237             : 
    5238             : 
    5239             :                         HANDLE_EXCEPTION();
    5240             :                 }
    5241           0 :                 container = EX_CONSTANT(opline->op1);
    5242           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    5243             : 
    5244             : 
    5245             :         }
    5246             :         CHECK_EXCEPTION();
    5247           0 :         ZEND_VM_NEXT_OPCODE();
    5248             : }
    5249             : 
    5250           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5251             : {
    5252           1 :         USE_OPLINE
    5253             : 
    5254             :         zval *container;
    5255             : 
    5256             :         zval *offset;
    5257             : 
    5258             :         SAVE_OPLINE();
    5259           1 :         container = EX_CONSTANT(opline->op1);
    5260             : 
    5261           1 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    5262             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    5263             : 
    5264             :                 HANDLE_EXCEPTION();
    5265             :         }
    5266             : 
    5267           1 :         offset = EX_CONSTANT(opline->op2);
    5268             : 
    5269             :         if (IS_CONST == IS_CONST ||
    5270             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    5271           1 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    5272             :                         container = Z_REFVAL_P(container);
    5273             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    5274             :                                 goto fetch_obj_r_no_object;
    5275             :                         }
    5276             :                 } else {
    5277           1 :                         goto fetch_obj_r_no_object;
    5278             :                 }
    5279             :         }
    5280             : 
    5281             :         /* here we are sure we are dealing with an object */
    5282             :         do {
    5283             :                 zend_object *zobj = Z_OBJ_P(container);
    5284             :                 zval *retval;
    5285             : 
    5286             :                 if (IS_CONST == IS_CONST &&
    5287             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5288             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    5289             : 
    5290             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    5291             :                                 retval = OBJ_PROP(zobj, prop_offset);
    5292             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5293             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5294             :                                         break;
    5295             :                                 }
    5296             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    5297             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5298             :                                 if (EXPECTED(retval)) {
    5299             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5300             :                                         break;
    5301             :                                 }
    5302             :                         }
    5303             :                 }
    5304             : 
    5305             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    5306             : fetch_obj_r_no_object:
    5307           1 :                         zend_error(E_NOTICE, "Trying to get property of non-object");
    5308           1 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    5309             :                 } else {
    5310             :                         retval = zobj->handlers->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var));
    5311             : 
    5312             :                         if (retval != EX_VAR(opline->result.var)) {
    5313             :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5314             :                         }
    5315             :                 }
    5316             :         } while (0);
    5317             : 
    5318             : 
    5319             :         CHECK_EXCEPTION();
    5320           1 :         ZEND_VM_NEXT_OPCODE();
    5321             : }
    5322             : 
    5323           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5324             : {
    5325           1 :         USE_OPLINE
    5326             : 
    5327             :         zval *container;
    5328             : 
    5329             :         zval *offset;
    5330             : 
    5331             :         SAVE_OPLINE();
    5332           1 :         container = EX_CONSTANT(opline->op1);
    5333             : 
    5334           1 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    5335             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    5336             : 
    5337             :                 HANDLE_EXCEPTION();
    5338             :         }
    5339             : 
    5340           1 :         offset  = EX_CONSTANT(opline->op2);
    5341             : 
    5342             :         if (IS_CONST == IS_CONST ||
    5343             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    5344           1 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    5345             :                         container = Z_REFVAL_P(container);
    5346             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    5347             :                                 goto fetch_obj_is_no_object;
    5348             :                         }
    5349             :                 } else {
    5350           1 :                         goto fetch_obj_is_no_object;
    5351             :                 }
    5352             :         }
    5353             : 
    5354             :         /* here we are sure we are dealing with an object */
    5355             :         do {
    5356             :                 zend_object *zobj = Z_OBJ_P(container);
    5357             :                 zval *retval;
    5358             : 
    5359             :                 if (IS_CONST == IS_CONST &&
    5360             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5361             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    5362             : 
    5363             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    5364             :                                 retval = OBJ_PROP(zobj, prop_offset);
    5365             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5366             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5367             :                                         break;
    5368             :                                 }
    5369             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    5370             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5371             :                                 if (EXPECTED(retval)) {
    5372             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5373             :                                         break;
    5374             :                                 }
    5375             :                         }
    5376             :                 }
    5377             : 
    5378             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    5379             : fetch_obj_is_no_object:
    5380           1 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    5381             :                 } else {
    5382             : 
    5383             :                         retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var));
    5384             : 
    5385             :                         if (retval != EX_VAR(opline->result.var)) {
    5386             :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5387             :                         }
    5388             :                 }
    5389             :         } while (0);
    5390             : 
    5391             : 
    5392             :         CHECK_EXCEPTION();
    5393           1 :         ZEND_VM_NEXT_OPCODE();
    5394             : }
    5395             : 
    5396           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5397             : {
    5398           1 :         USE_OPLINE
    5399             :         zval *container;
    5400             : 
    5401           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    5402             :                 /* Behave like FETCH_OBJ_W */
    5403             :                 zend_free_op free_op1;
    5404             :                 zval *property;
    5405             : 
    5406             :                 SAVE_OPLINE();
    5407           1 :                 property = EX_CONSTANT(opline->op2);
    5408           1 :                 container = NULL;
    5409             : 
    5410           1 :                 if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    5411             :                         zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    5412             : 
    5413             :                         HANDLE_EXCEPTION();
    5414             :                 }
    5415             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5416           1 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use temporary expression in write context");
    5417             : 
    5418             : 
    5419           1 :                         HANDLE_EXCEPTION();
    5420             :                 }
    5421             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    5422             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use string offset as an object");
    5423             : 
    5424             :                         HANDLE_EXCEPTION();
    5425             :                 }
    5426             :                 zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_CONST, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
    5427             : 
    5428             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    5429             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5430             :                 }
    5431             : 
    5432             :                 CHECK_EXCEPTION();
    5433             :                 ZEND_VM_NEXT_OPCODE();
    5434             :         } else {
    5435           0 :                 ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    5436             :         }
    5437             : }
    5438             : 
    5439          28 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5440             : {
    5441          28 :         USE_OPLINE
    5442             : 
    5443             :         zval *container;
    5444             : 
    5445             :         SAVE_OPLINE();
    5446          28 :         container = EX_CONSTANT(opline->op1);
    5447             : 
    5448             : try_fetch_list:
    5449          28 :         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    5450          21 :                 zval *value = zend_hash_index_find(Z_ARRVAL_P(container), Z_LVAL_P(EX_CONSTANT(opline->op2)));
    5451             : 
    5452          21 :                 if (UNEXPECTED(value == NULL)) {
    5453           5 :                         zend_error(E_NOTICE,"Undefined offset: " ZEND_ULONG_FMT, Z_LVAL_P(EX_CONSTANT(opline->op2)));
    5454           5 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    5455             :                 } else {
    5456          16 :                         ZVAL_COPY(EX_VAR(opline->result.var), value);
    5457             :                 }
    5458           7 :         } else if (IS_CONST != IS_CONST &&
    5459             :                    UNEXPECTED(Z_TYPE_P(container) == IS_OBJECT) &&
    5460             :                    EXPECTED(Z_OBJ_HT_P(container)->read_dimension)) {
    5461             :                 zval *result = EX_VAR(opline->result.var);
    5462             :                 zval *retval = Z_OBJ_HT_P(container)->read_dimension(container, EX_CONSTANT(opline->op2), BP_VAR_R, result);
    5463             : 
    5464             :                 if (retval) {
    5465             :                         if (result != retval) {
    5466             :                                 ZVAL_COPY(result, retval);
    5467             :                         }
    5468             :                 } else {
    5469             :                         ZVAL_NULL(result);
    5470             :                 }
    5471           7 :         } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(container) == IS_REFERENCE) {
    5472             :                 container = Z_REFVAL_P(container);
    5473             :                 goto try_fetch_list;
    5474             :         } else {
    5475           7 :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    5476             :                         GET_OP1_UNDEF_CV(container, BP_VAR_R);
    5477             :                 }
    5478           7 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    5479             :         }
    5480             :         CHECK_EXCEPTION();
    5481          28 :         ZEND_VM_NEXT_OPCODE();
    5482             : }
    5483             : 
    5484           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5485             : {
    5486           0 :         USE_OPLINE
    5487             : 
    5488             :         zval *op1, *op2;
    5489             :         zend_string *op1_str, *op2_str, *str;
    5490             : 
    5491             :         SAVE_OPLINE();
    5492           0 :         op1 = EX_CONSTANT(opline->op1);
    5493             :         if (IS_CONST == IS_CONST) {
    5494           0 :                 op1_str = Z_STR_P(op1);
    5495             :         } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    5496             :                 op1_str = zend_string_copy(Z_STR_P(op1));
    5497             :         } else {
    5498             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    5499             :                         GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    5500             :                 }
    5501             :                 op1_str = _zval_get_string_func(op1);
    5502             :         }
    5503           0 :         op2 = EX_CONSTANT(opline->op2);
    5504             :         if (IS_CONST == IS_CONST) {
    5505           0 :                 op2_str = Z_STR_P(op2);
    5506             :         } else if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    5507             :                 op2_str = zend_string_copy(Z_STR_P(op2));
    5508             :         } else {
    5509             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    5510             :                         GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    5511             :                 }
    5512             :                 op2_str = _zval_get_string_func(op2);
    5513             :         }
    5514             :         do {
    5515           0 :                 if (IS_CONST != IS_CONST) {
    5516             :                         if (UNEXPECTED(op1_str->len == 0)) {
    5517             :                                 if (IS_CONST == IS_CONST) {
    5518             :                                         zend_string_addref(op2_str);
    5519             :                                 }
    5520             :                                 ZVAL_STR(EX_VAR(opline->result.var), op2_str);
    5521             :                                 zend_string_release(op1_str);
    5522             :                                 break;
    5523             :                         }
    5524             :                 }
    5525           0 :                 if (IS_CONST != IS_CONST) {
    5526             :                         if (UNEXPECTED(op2_str->len == 0)) {
    5527             :                                 if (IS_CONST == IS_CONST) {
    5528             :                                         zend_string_addref(op1_str);
    5529             :                                 }
    5530             :                                 ZVAL_STR(EX_VAR(opline->result.var), op1_str);
    5531             :                                 zend_string_release(op2_str);
    5532             :                                 break;
    5533             :                         }
    5534             :                 }
    5535           0 :                 str = zend_string_alloc(op1_str->len + op2_str->len, 0);
    5536           0 :                 memcpy(str->val, op1_str->val, op1_str->len);
    5537           0 :                 memcpy(str->val + op1_str->len, op2_str->val, op2_str->len+1);
    5538           0 :                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    5539           0 :                 if (IS_CONST != IS_CONST) {
    5540             :                         zend_string_release(op1_str);
    5541             :                 }
    5542           0 :                 if (IS_CONST != IS_CONST) {
    5543             :                         zend_string_release(op2_str);
    5544             :                 }
    5545             :         } while (0);
    5546             : 
    5547             : 
    5548             :         CHECK_EXCEPTION();
    5549           0 :         ZEND_VM_NEXT_OPCODE();
    5550             : }
    5551             : 
    5552           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5553             : {
    5554           1 :         USE_OPLINE
    5555             :         zval *function_name;
    5556             : 
    5557             :         zval *object;
    5558             :         zend_function *fbc;
    5559             :         zend_class_entry *called_scope;
    5560             :         zend_object *obj;
    5561             :         zend_execute_data *call;
    5562             :         uint32_t call_info;
    5563             : 
    5564             :         SAVE_OPLINE();
    5565             : 
    5566           1 :         function_name = EX_CONSTANT(opline->op2);
    5567             : 
    5568           1 :         if (IS_CONST != IS_CONST &&
    5569             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5570             :                 do {
    5571             :                         if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(function_name)) {
    5572             :                                 function_name = Z_REFVAL_P(function_name);
    5573             :                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    5574             :                                         break;
    5575             :                                 }
    5576             :                         }
    5577             :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    5578             :                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    5579             :                         }
    5580             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    5581             :                                 HANDLE_EXCEPTION();
    5582             :                         }
    5583             :                         zend_error(E_EXCEPTION | E_ERROR, "Method name must be a string");
    5584             : 
    5585             : 
    5586             :                         HANDLE_EXCEPTION();
    5587             :                 } while (0);
    5588             :         }
    5589             : 
    5590           1 :         object = EX_CONSTANT(opline->op1);
    5591             : 
    5592           1 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
    5593             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    5594             : 
    5595             :                 HANDLE_EXCEPTION();
    5596             :         }
    5597             : 
    5598             :         if (IS_CONST != IS_UNUSED) {
    5599             :                 do {
    5600             :                         if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
    5601           1 :                                 if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(object))) {
    5602             :                                         object = Z_REFVAL_P(object);
    5603             :                                         if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
    5604             :                                                 break;
    5605             :                                         }
    5606             :                                 }
    5607           1 :                                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
    5608             :                                         GET_OP1_UNDEF_CV(object, BP_VAR_R);
    5609             :                                 }
    5610           1 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5611           0 :                                         HANDLE_EXCEPTION();
    5612             :                                 }
    5613           1 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
    5614             : 
    5615             : 
    5616           1 :                                 HANDLE_EXCEPTION();
    5617             :                         }
    5618             :                 } while (0);
    5619             :         }
    5620             : 
    5621             :         obj = Z_OBJ_P(object);
    5622             :         called_scope = obj->ce;
    5623             : 
    5624             :         if (IS_CONST != IS_CONST ||
    5625             :             UNEXPECTED((fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope)) == NULL)) {
    5626             :             zend_object *orig_obj = obj;
    5627             : 
    5628             :                 if (UNEXPECTED(obj->handlers->get_method == NULL)) {
    5629             :                         zend_error(E_EXCEPTION | E_ERROR, "Object does not support method calls");
    5630             : 
    5631             : 
    5632             :                         HANDLE_EXCEPTION();
    5633             :                 }
    5634             : 
    5635             :                 /* First, locate the function. */
    5636             :                 fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    5637             :                 if (UNEXPECTED(fbc == NULL)) {
    5638             :                         if (EXPECTED(!EG(exception))) {
    5639             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", obj->ce->name->val, Z_STRVAL_P(function_name));
    5640             :                         }
    5641             : 
    5642             : 
    5643             :                         HANDLE_EXCEPTION();
    5644             :                 }
    5645             :                 if (IS_CONST == IS_CONST &&
    5646             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    5647             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE))) &&
    5648             :                     EXPECTED(obj == orig_obj)) {
    5649             :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
    5650             :                 }
    5651             :         }
    5652             : 
    5653             :         call_info = ZEND_CALL_NESTED_FUNCTION;
    5654             :         if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0)) {
    5655             :                 obj = NULL;
    5656             :         } else if (IS_CONST & (IS_VAR|IS_TMP_VAR|IS_CV)) {
    5657             :                 /* CV may be changed indirectly (e.g. when it's a reference) */
    5658             :                 call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_RELEASE_THIS;
    5659             :                 GC_REFCOUNT(obj)++; /* For $this pointer */
    5660             :         }
    5661             : 
    5662             :         call = zend_vm_stack_push_call_frame(call_info,
    5663             :                 fbc, opline->extended_value, called_scope, obj);
    5664             :         call->prev_execute_data = EX(call);
    5665             :         EX(call) = call;
    5666             : 
    5667             : 
    5668             :         CHECK_EXCEPTION();
    5669             :         ZEND_VM_NEXT_OPCODE();
    5670             : }
    5671             : 
    5672        5498 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5673             : {
    5674        5498 :         USE_OPLINE
    5675             :         zval *function_name;
    5676             :         zend_class_entry *ce;
    5677             :         zend_object *object;
    5678             :         zend_function *fbc;
    5679             :         zend_execute_data *call;
    5680             : 
    5681             :         SAVE_OPLINE();
    5682             : 
    5683             :         if (IS_CONST == IS_CONST) {
    5684             :                 /* no function found. try a static method in class */
    5685        5498 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    5686        2716 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5687             :                 } else {
    5688        2782 :                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT |  ZEND_FETCH_CLASS_EXCEPTION);
    5689        2782 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    5690           2 :                                 HANDLE_EXCEPTION();
    5691             :                         }
    5692        2780 :                         if (UNEXPECTED(ce == NULL)) {
    5693           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    5694           0 :                                 HANDLE_EXCEPTION();
    5695             :                         }
    5696        2780 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    5697             :                 }
    5698             :         } else {
    5699             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    5700             :         }
    5701             : 
    5702        5496 :         if (IS_CONST == IS_CONST &&
    5703             :             IS_CONST == IS_CONST &&
    5704        5496 :             CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    5705        2705 :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    5706        2791 :         } else if (IS_CONST != IS_CONST &&
    5707             :                    IS_CONST == IS_CONST &&
    5708             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
    5709             :                 /* do nothing */
    5710             :         } else if (IS_CONST != IS_UNUSED) {
    5711             : 
    5712             : 
    5713        2791 :                 function_name = EX_CONSTANT(opline->op2);
    5714        2791 :                 if (IS_CONST != IS_CONST) {
    5715             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5716             :                                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    5717             :                                         GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    5718             :                                 }
    5719             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5720             :                                         HANDLE_EXCEPTION();
    5721             :                                 }
    5722             :                                 zend_error(E_EXCEPTION | E_ERROR, "Function name must be a string");
    5723             : 
    5724             :                                 HANDLE_EXCEPTION();
    5725             :                         }
    5726             :                 }
    5727             : 
    5728        2791 :                 if (ce->get_static_method) {
    5729           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name));
    5730             :                 } else {
    5731        2791 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    5732             :                 }
    5733        2791 :                 if (UNEXPECTED(fbc == NULL)) {
    5734          10 :                         if (EXPECTED(!EG(exception))) {
    5735           3 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    5736             :                         }
    5737             : 
    5738          10 :                         HANDLE_EXCEPTION();
    5739             :                 }
    5740        5562 :                 if (IS_CONST == IS_CONST &&
    5741        2781 :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    5742        2781 :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
    5743             :                         if (IS_CONST == IS_CONST) {
    5744        2752 :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    5745             :                         } else {
    5746             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    5747             :                         }
    5748             :                 }
    5749             :                 if (IS_CONST != IS_CONST) {
    5750             : 
    5751             :                 }
    5752             :         } else {
    5753             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    5754             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call constructor");
    5755             :                         HANDLE_EXCEPTION();
    5756             :                 }
    5757             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    5758             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    5759             :                         HANDLE_EXCEPTION();
    5760             :                 }
    5761             :                 fbc = ce->constructor;
    5762             :         }
    5763             : 
    5764        5486 :         object = NULL;
    5765        5486 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    5766          83 :                 if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
    5767          58 :                         object = Z_OBJ(EX(This));
    5768             :                 }
    5769          83 :                 if (!object) {
    5770          25 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5771             :                                 /* Allowed for PHP 4 compatibility. */
    5772          34 :                                 zend_error(
    5773             :                                         E_DEPRECATED,
    5774             :                                         "Non-static method %s::%s() should not be called statically",
    5775          34 :                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    5776             :                         } else {
    5777             :                                 /* An internal function assumes $this is present and won't check that.
    5778             :                                  * So PHP would crash by allowing the call. */
    5779          16 :                                 zend_error(
    5780             :                                         E_EXCEPTION | E_ERROR,
    5781             :                                         "Non-static method %s::%s() cannot be called statically",
    5782          16 :                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    5783           8 :                                 HANDLE_EXCEPTION();
    5784             :                         }
    5785             :                 }
    5786             :         }
    5787             : 
    5788        5478 :         if (IS_CONST != IS_CONST) {
    5789             :                 /* previous opcode is ZEND_FETCH_CLASS */
    5790             :                 if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
    5791             :                     ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
    5792             :                         ce = EX(called_scope);
    5793             :                 }
    5794             :         }
    5795             : 
    5796       10956 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    5797             :                 fbc, opline->extended_value, ce, object);
    5798        5478 :         call->prev_execute_data = EX(call);
    5799        5478 :         EX(call) = call;
    5800             : 
    5801             :         CHECK_EXCEPTION();
    5802        5478 :         ZEND_VM_NEXT_OPCODE();
    5803             : }
    5804             : 
    5805          75 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5806             : {
    5807          75 :         USE_OPLINE
    5808             : 
    5809             :         zval *function_name;
    5810             :         zend_fcall_info_cache fcc;
    5811          75 :         char *error = NULL;
    5812             :         zend_function *func;
    5813             :         zend_class_entry *called_scope;
    5814             :         zend_object *object;
    5815             :         zend_execute_data *call;
    5816          75 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
    5817             : 
    5818             :         SAVE_OPLINE();
    5819          75 :         function_name = EX_CONSTANT(opline->op2);
    5820          75 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
    5821          66 :                 func = fcc.function_handler;
    5822          66 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    5823             :                         /* Delay closure destruction until its invocation */
    5824           0 :                         if (IS_CONST & (IS_VAR|IS_CV)) {
    5825             :                                 ZVAL_DEREF(function_name);
    5826             :                         }
    5827             :                         ZEND_ASSERT(GC_TYPE(func->common.prototype) == IS_OBJECT);
    5828           0 :                         GC_REFCOUNT(func->common.prototype)++;
    5829           0 :                         call_info |= ZEND_CALL_CLOSURE;
    5830             :                 }
    5831          66 :                 called_scope = fcc.called_scope;
    5832          66 :                 object = fcc.object;
    5833          66 :                 if (object) {
    5834          20 :                         call_info |= ZEND_CALL_RELEASE_THIS;
    5835          20 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    5836             :                 }
    5837          66 :                 if (error) {
    5838           3 :                         efree(error);
    5839             :                         /* This is the only soft error is_callable() can generate */
    5840           6 :                         zend_error(E_DEPRECATED,
    5841             :                                 "Non-static method %s::%s() should not be called statically",
    5842           6 :                                 func->common.scope->name->val, func->common.function_name->val);
    5843             :                 }
    5844             :         } else {
    5845           9 :                 zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);
    5846           9 :                 efree(error);
    5847           9 :                 func = (zend_function*)&zend_pass_function;
    5848           9 :                 called_scope = NULL;
    5849           9 :                 object = NULL;
    5850             :         }
    5851             : 
    5852         150 :         call = zend_vm_stack_push_call_frame(call_info,
    5853             :                 func, opline->extended_value, called_scope, object);
    5854          75 :         call->prev_execute_data = EX(call);
    5855          75 :         EX(call) = call;
    5856             : 
    5857             :         CHECK_EXCEPTION();
    5858          75 :         ZEND_VM_NEXT_OPCODE();
    5859             : }
    5860             : 
    5861          10 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5862             : {
    5863          10 :         USE_OPLINE
    5864             : 
    5865             :         zval *op1, *op2, *result;
    5866             : 
    5867          10 :         op1 = EX_CONSTANT(opline->op1);
    5868          10 :         op2 = EX_CONSTANT(opline->op2);
    5869             :         do {
    5870             :                 int result;
    5871             : 
    5872          10 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    5873          10 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    5874          10 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    5875           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    5876           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    5877             :                         } else {
    5878           0 :                                 break;
    5879             :                         }
    5880           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    5881           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    5882           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    5883           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    5884           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    5885             :                         } else {
    5886           0 :                                 break;
    5887             :                         }
    5888           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    5889           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    5890           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    5891           0 :                                         result = 1;
    5892           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    5893           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    5894           0 :                                                 result = 0;
    5895             :                                         } else {
    5896           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    5897             :                                         }
    5898             :                                 } else {
    5899           0 :                                         result = (zendi_smart_strcmp(op1, op2) == 0);
    5900             :                                 }
    5901             : 
    5902             :                         } else {
    5903           0 :                                 break;
    5904             :                         }
    5905             :                 } else {
    5906           0 :                         break;
    5907             :                 }
    5908          10 :                 ZEND_VM_SMART_BRANCH(result, 0);
    5909           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5910           0 :                 ZEND_VM_NEXT_OPCODE();
    5911             :         } while (0);
    5912             : 
    5913             :         SAVE_OPLINE();
    5914           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    5915             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    5916             :         }
    5917           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    5918             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    5919             :         }
    5920           0 :         result = EX_VAR(opline->result.var);
    5921           0 :         compare_function(result, op1, op2);
    5922           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    5923             : 
    5924             :         CHECK_EXCEPTION();
    5925           0 :         ZEND_VM_NEXT_OPCODE();
    5926             : }
    5927             : 
    5928         384 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5929             : {
    5930         384 :         USE_OPLINE
    5931             : 
    5932             :         SAVE_OPLINE();
    5933         384 :         if (IS_CONST == IS_UNUSED) {
    5934             :                 zend_constant *c;
    5935             : 
    5936             :                 if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    5937             :                         c = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    5938             :                 } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op2) + 1, opline->extended_value)) == NULL) {
    5939             :                         if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
    5940             :                                 char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
    5941             :                                 if (!actual) {
    5942             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
    5943             :                                 } else {
    5944             :                                         actual++;
    5945             :                                         ZVAL_STRINGL(EX_VAR(opline->result.var),
    5946             :                                                         actual, Z_STRLEN_P(EX_CONSTANT(opline->op2)) - (actual - Z_STRVAL_P(EX_CONSTANT(opline->op2))));
    5947             :                                 }
    5948             :                                 /* non-qualified constant - allow text substitution */
    5949             :                                 zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
    5950             :                                                 Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
    5951             :                                 CHECK_EXCEPTION();
    5952             :                                 ZEND_VM_NEXT_OPCODE();
    5953             :                         } else {
    5954             :                                 zend_error(E_EXCEPTION | E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    5955             :                                 HANDLE_EXCEPTION();
    5956             :                         }
    5957             :                 } else {
    5958             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), c);
    5959             :                 }
    5960             : #ifdef ZTS
    5961             :                 if (c->flags & CONST_PERSISTENT) {
    5962             :                         ZVAL_DUP(EX_VAR(opline->result.var), &c->value);
    5963             :                 } else {
    5964             :                         ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
    5965             :                 }
    5966             : #else
    5967             :                 ZVAL_COPY(EX_VAR(opline->result.var), &c->value);
    5968             : #endif
    5969             :         } else {
    5970             :                 /* class constant */
    5971             :                 zend_class_entry *ce;
    5972             :                 zval *value;
    5973             : 
    5974             :                 do {
    5975             :                         if (IS_CONST == IS_CONST) {
    5976         384 :                                 if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    5977          51 :                                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    5978          51 :                                         ZVAL_DEREF(value);
    5979             : #ifdef ZTS
    5980             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5981             : #endif
    5982          51 :                                         break;
    5983         333 :                                 } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    5984           0 :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5985             :                                 } else {
    5986         333 :                                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    5987         333 :                                         if (UNEXPECTED(EG(exception) != NULL)) {
    5988           2 :                                                 HANDLE_EXCEPTION();
    5989             :                                         }
    5990         331 :                                         if (UNEXPECTED(ce == NULL)) {
    5991           0 :                                                 zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    5992           0 :                                                 HANDLE_EXCEPTION();
    5993             :                                         }
    5994         331 :                                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    5995             :                                 }
    5996             :                         } else {
    5997             :                                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    5998             :                                 if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
    5999             :                                         ZVAL_DEREF(value);
    6000             :                                         break;
    6001             :                                 }
    6002             :                         }
    6003             : 
    6004         331 :                         if (EXPECTED((value = zend_hash_find(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
    6005         329 :                                 ZVAL_DEREF(value);
    6006         329 :                                 if (Z_CONSTANT_P(value)) {
    6007          20 :                                         EG(scope) = ce;
    6008          20 :                                         zval_update_constant_ex(value, 1, NULL);
    6009          20 :                                         EG(scope) = EX(func)->op_array.scope;
    6010          20 :                                         if (UNEXPECTED(EG(exception) != NULL)) {
    6011           3 :                                                 HANDLE_EXCEPTION();
    6012             :                                         }
    6013             :                                 }
    6014             :                                 if (IS_CONST == IS_CONST) {
    6015         326 :                                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
    6016             :                                 } else {
    6017             :                                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
    6018             :                                 }
    6019             :                         } else {
    6020           2 :                                 zend_error(E_EXCEPTION | E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    6021           2 :                                 HANDLE_EXCEPTION();
    6022             :                         }
    6023             :                 } while (0);
    6024             : #ifdef ZTS
    6025             :                 if (ce->type == ZEND_INTERNAL_CLASS) {
    6026             :                         ZVAL_DUP(EX_VAR(opline->result.var), value);
    6027             :                 } else {
    6028             :                         ZVAL_COPY(EX_VAR(opline->result.var), value);
    6029             :                 }
    6030             : #else
    6031         377 :                 ZVAL_COPY(EX_VAR(opline->result.var), value);
    6032             : #endif
    6033             :         }
    6034         377 :         ZEND_VM_NEXT_OPCODE();
    6035             : }
    6036             : 
    6037        5587 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6038             : {
    6039        5587 :         USE_OPLINE
    6040             : 
    6041             :         zval *expr_ptr, new_expr;
    6042             : 
    6043             :         SAVE_OPLINE();
    6044        5587 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    6045             :             UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    6046             :                 expr_ptr = NULL;
    6047             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    6048             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot create references to/from string offsets");
    6049             :                         zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
    6050             :                         HANDLE_EXCEPTION();
    6051             :                 }
    6052             :                 ZVAL_MAKE_REF(expr_ptr);
    6053             :                 Z_ADDREF_P(expr_ptr);
    6054             : 
    6055             :         } else {
    6056        5587 :                 expr_ptr = EX_CONSTANT(opline->op1);
    6057        5587 :                 if (IS_CONST == IS_TMP_VAR) {
    6058             :                         /* pass */
    6059             :                 } else if (IS_CONST == IS_CONST) {
    6060        5587 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
    6061         438 :                                 ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    6062         438 :                                 zval_copy_ctor_func(&new_expr);
    6063         438 :                                 expr_ptr = &new_expr;
    6064             :                         }
    6065             :                 } else if (IS_CONST == IS_CV) {
    6066             :                         ZVAL_DEREF(expr_ptr);
    6067             :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    6068             :                                 Z_ADDREF_P(expr_ptr);
    6069             :                         }
    6070             :                 } else /* if (IS_CONST == IS_VAR) */ {
    6071             :                         if (UNEXPECTED(Z_ISREF_P(expr_ptr))) {
    6072             :                                 zend_refcounted *ref = Z_COUNTED_P(expr_ptr);
    6073             : 
    6074             :                                 expr_ptr = Z_REFVAL_P(expr_ptr);
    6075             :                                 if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    6076             :                                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    6077             :                                         expr_ptr = &new_expr;
    6078             :                                         efree_size(ref, sizeof(zend_reference));
    6079             :                                 } else if (Z_OPT_REFCOUNTED_P(expr_ptr)) {
    6080             :                                         Z_ADDREF_P(expr_ptr);
    6081             :                                 }
    6082             :                         }
    6083             :                 }
    6084             :         }
    6085             : 
    6086             :         if (IS_CONST != IS_UNUSED) {
    6087             : 
    6088        5587 :                 zval *offset = EX_CONSTANT(opline->op2);
    6089             :                 zend_string *str;
    6090             :                 zend_ulong hval;
    6091             : 
    6092             : add_again:
    6093        5587 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    6094        5335 :                         str = Z_STR_P(offset);
    6095        5335 :                         if (IS_CONST != IS_CONST) {
    6096             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    6097             :                                         goto num_index;
    6098             :                                 }
    6099             :                         }
    6100             : str_index:
    6101        5344 :                         zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    6102         252 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    6103         218 :                         hval = Z_LVAL_P(offset);
    6104             : num_index:
    6105         243 :                         zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    6106          34 :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
    6107             :                         offset = Z_REFVAL_P(offset);
    6108             :                         goto add_again;
    6109          34 :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    6110           9 :                         str = STR_EMPTY_ALLOC();
    6111           9 :                         goto str_index;
    6112          25 :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    6113          26 :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6114          13 :                         goto num_index;
    6115          12 :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    6116           7 :                         hval = 0;
    6117           7 :                         goto num_index;
    6118           5 :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    6119           5 :                         hval = 1;
    6120           5 :                         goto num_index;
    6121           0 :                 } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    6122             :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    6123             :                         str = STR_EMPTY_ALLOC();
    6124             :                         goto str_index;
    6125             :                 } else {
    6126           0 :                         zend_error(E_WARNING, "Illegal offset type");
    6127             :                         zval_ptr_dtor(expr_ptr);
    6128             :                 }
    6129             : 
    6130             :         } else {
    6131             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    6132             :         }
    6133             :         CHECK_EXCEPTION();
    6134        5587 :         ZEND_VM_NEXT_OPCODE();
    6135             : }
    6136             : 
    6137         588 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6138             : {
    6139             :         zval *array;
    6140             :         uint32_t size;
    6141         588 :         USE_OPLINE
    6142             : 
    6143         588 :         array = EX_VAR(opline->result.var);
    6144             :         if (IS_CONST != IS_UNUSED) {
    6145         588 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    6146             :         } else {
    6147             :                 size = 0;
    6148             :         }
    6149         588 :         ZVAL_NEW_ARR(array);
    6150         588 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    6151             : 
    6152             :         if (IS_CONST != IS_UNUSED) {
    6153             :                 /* Explicitly initialize array as not-packed if flag is set */
    6154         588 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    6155         568 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    6156             :                 }
    6157             :         }
    6158             : 
    6159         588 :         if (IS_CONST == IS_UNUSED) {
    6160             :                 ZEND_VM_NEXT_OPCODE();
    6161             : #if 0 || (IS_CONST != IS_UNUSED)
    6162             :         } else {
    6163         588 :                 ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    6164             : #endif
    6165             :         }
    6166             : }
    6167             : 
    6168           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6169             : {
    6170           2 :         USE_OPLINE
    6171             :         zval tmp, *varname;
    6172             :         HashTable *target_symbol_table;
    6173             : 
    6174             : 
    6175             :         SAVE_OPLINE();
    6176           2 :         if (IS_CONST == IS_CV &&
    6177             :             IS_CONST == IS_UNUSED &&
    6178             :             (opline->extended_value & ZEND_QUICK_SET)) {
    6179             :                 zval *var = EX_VAR(opline->op1.var);
    6180             : 
    6181             :                 if (Z_REFCOUNTED_P(var)) {
    6182             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    6183             : 
    6184             :                         if (!--GC_REFCOUNT(garbage)) {
    6185             :                                 ZVAL_UNDEF(var);
    6186             :                                 zval_dtor_func_for_ptr(garbage);
    6187             :                         } else {
    6188             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    6189             :                                 ZVAL_UNDEF(var);
    6190             :                         }
    6191             :                 } else {
    6192             :                         ZVAL_UNDEF(var);
    6193             :                 }
    6194             :                 CHECK_EXCEPTION();
    6195             :                 ZEND_VM_NEXT_OPCODE();
    6196             :         }
    6197             : 
    6198           2 :         varname = EX_CONSTANT(opline->op1);
    6199             : 
    6200           2 :         ZVAL_UNDEF(&tmp);
    6201           2 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6202             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    6203             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    6204             :                 }
    6205             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    6206             :                 varname = &tmp;
    6207             :         }
    6208             : 
    6209             :         if (IS_CONST != IS_UNUSED) {
    6210             :                 zend_class_entry *ce;
    6211             : 
    6212             :                 if (IS_CONST == IS_CONST) {
    6213           2 :                         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    6214           0 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    6215             :                         } else {
    6216           2 :                                 ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    6217           2 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    6218           1 :                                         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6219             :                                                 zend_string_release(Z_STR(tmp));
    6220             :                                         }
    6221             : 
    6222           1 :                                         HANDLE_EXCEPTION();
    6223             :                                 }
    6224           1 :                                 if (UNEXPECTED(ce == NULL)) {
    6225           0 :                                         zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    6226           0 :                                         if (IS_CONST != IS_CONST) {
    6227             :                                                 zend_string_release(Z_STR(tmp));
    6228             :                                         }
    6229           0 :                                         HANDLE_EXCEPTION();
    6230             :                                 }
    6231           1 :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    6232             :                         }
    6233             :                 } else {
    6234             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    6235             :                 }
    6236           1 :                 zend_std_unset_static_property(ce, Z_STR_P(varname));
    6237             :         } else {
    6238             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    6239             :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    6240             :         }
    6241             : 
    6242           1 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6243             :                 zend_string_release(Z_STR(tmp));
    6244             :         }
    6245             : 
    6246             :         CHECK_EXCEPTION();
    6247           1 :         ZEND_VM_NEXT_OPCODE();
    6248             : }
    6249             : 
    6250          47 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6251             : {
    6252          47 :         USE_OPLINE
    6253             :         zval *value;
    6254             :         int result;
    6255             : 
    6256          47 :         if (IS_CONST == IS_CV &&
    6257             :             IS_CONST == IS_UNUSED &&
    6258             :             (opline->extended_value & ZEND_QUICK_SET)) {
    6259             :                 value = EX_VAR(opline->op1.var);
    6260             :                 if (opline->extended_value & ZEND_ISSET) {
    6261             :                         result =
    6262             :                                 Z_TYPE_P(value) > IS_NULL &&
    6263             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    6264             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6265             :                         SAVE_OPLINE();
    6266             :                         result = !i_zend_is_true(value);
    6267             :                         if (UNEXPECTED(EG(exception))) {
    6268             :                                 HANDLE_EXCEPTION();
    6269             :                         }
    6270             :                 }
    6271             :                 ZEND_VM_SMART_BRANCH(result, 0);
    6272             :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6273             :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    6274             :                 ZEND_VM_CONTINUE();
    6275             :         } else {
    6276             : 
    6277             :                 zval tmp, *varname;
    6278             : 
    6279             :                 SAVE_OPLINE();
    6280          47 :                 varname = EX_CONSTANT(opline->op1);
    6281          47 :                 ZVAL_UNDEF(&tmp);
    6282          47 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6283             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    6284             :                         varname = &tmp;
    6285             :                 }
    6286             : 
    6287             :                 if (IS_CONST != IS_UNUSED) {
    6288             :                         zend_class_entry *ce;
    6289             : 
    6290             :                         if (IS_CONST == IS_CONST) {
    6291          47 :                                 if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    6292             : 
    6293          13 :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    6294          13 :                                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    6295             : 
    6296             :                                         /* check if static properties were destoyed */
    6297          13 :                                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6298           0 :                                                 value = NULL;
    6299             :                                         }
    6300             : 
    6301          13 :                                         goto is_var_return;
    6302          34 :                                 } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    6303           5 :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    6304             :                                 } else {
    6305          29 :                                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    6306          29 :                                         if (UNEXPECTED(ce == NULL)) {
    6307             :                                                 CHECK_EXCEPTION();
    6308           1 :                                                 ZEND_VM_NEXT_OPCODE();
    6309             :                                         }
    6310          28 :                                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    6311             :                                 }
    6312             :                         } else {
    6313             :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    6314             :                                 if (IS_CONST == IS_CONST &&
    6315             :                                     (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    6316             : 
    6317             :                                         /* check if static properties were destoyed */
    6318             :                                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6319             :                                                 value = NULL;
    6320             :                                         }
    6321             : 
    6322             :                                         goto is_var_return;
    6323             :                                 }
    6324             :                         }
    6325             : 
    6326          33 :                         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
    6327             : 
    6328          33 :                         if (IS_CONST == IS_CONST && value) {
    6329          11 :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
    6330             :                         }
    6331             :                 } else {
    6332             :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    6333             :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    6334             :                 }
    6335             : 
    6336          33 :                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6337             :                         zend_string_release(Z_STR(tmp));
    6338             :                 }
    6339             : 
    6340             : is_var_return:
    6341          46 :                 if (opline->extended_value & ZEND_ISSET) {
    6342         104 :                         result = value && Z_TYPE_P(value) > IS_NULL &&
    6343          11 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    6344             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6345           0 :                         result = !value || !i_zend_is_true(value);
    6346             :                 }
    6347             : 
    6348          46 :                 ZEND_VM_SMART_BRANCH(result, 1);
    6349          46 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6350             :                 CHECK_EXCEPTION();
    6351          46 :                 ZEND_VM_NEXT_OPCODE();
    6352             :         }
    6353             : }
    6354             : 
    6355           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6356             : {
    6357           2 :         USE_OPLINE
    6358             : 
    6359             :         zval *container;
    6360             :         int result;
    6361             :         zend_ulong hval;
    6362             :         zval *offset;
    6363             : 
    6364             :         SAVE_OPLINE();
    6365           2 :         container = EX_CONSTANT(opline->op1);
    6366             : 
    6367           2 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    6368             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    6369             : 
    6370             :                 HANDLE_EXCEPTION();
    6371             :         }
    6372             : 
    6373           2 :         offset = EX_CONSTANT(opline->op2);
    6374             : 
    6375           2 :         if (IS_CONST != IS_UNUSED && EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    6376             :                 HashTable *ht;
    6377             :                 zval *value;
    6378             :                 zend_string *str;
    6379             : 
    6380             : isset_dim_obj_array:
    6381           2 :                 ht = Z_ARRVAL_P(container);
    6382             : isset_again:
    6383           2 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    6384           0 :                         str = Z_STR_P(offset);
    6385           0 :                         if (IS_CONST != IS_CONST) {
    6386             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    6387             :                                         goto num_index_prop;
    6388             :                                 }
    6389             :                         }
    6390             : str_index_prop:
    6391           0 :                         value = zend_hash_find_ind(ht, str);
    6392           2 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    6393           2 :                         hval = Z_LVAL_P(offset);
    6394             : num_index_prop:
    6395           2 :                         value = zend_hash_index_find(ht, hval);
    6396           0 :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
    6397             :                         offset = Z_REFVAL_P(offset);
    6398             :                         goto isset_again;
    6399           0 :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    6400           0 :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6401           0 :                         goto num_index_prop;
    6402           0 :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    6403           0 :                         str = STR_EMPTY_ALLOC();
    6404           0 :                         goto str_index_prop;
    6405           0 :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    6406           0 :                         hval = 0;
    6407           0 :                         goto num_index_prop;
    6408           0 :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    6409           0 :                         hval = 1;
    6410           0 :                         goto num_index_prop;
    6411           0 :                 } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
    6412           0 :                         hval = Z_RES_HANDLE_P(offset);
    6413           0 :                         goto num_index_prop;
    6414           0 :                 } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    6415             :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    6416             :                         str = STR_EMPTY_ALLOC();
    6417             :                         goto str_index_prop;
    6418             :                 } else {
    6419           0 :                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    6420           0 :                         goto isset_not_found;
    6421             :                 }
    6422             : 
    6423           2 :                 if (opline->extended_value & ZEND_ISSET) {
    6424             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    6425           6 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    6426           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    6427             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6428           0 :                         result = (value == NULL || !i_zend_is_true(value));
    6429             :                 }
    6430           2 :                 goto isset_dim_obj_exit;
    6431           0 :         } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    6432             :                 container = Z_REFVAL_P(container);
    6433             :                 if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    6434             :                         goto isset_dim_obj_array;
    6435             :                 }
    6436             :         }
    6437             : 
    6438           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
    6439             :                 offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    6440             :         }
    6441             : 
    6442           0 :         if (IS_CONST == IS_UNUSED ||
    6443             :             (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_OBJECT))) {
    6444             :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    6445             :                         result =
    6446             :                                 ((opline->extended_value & ZEND_ISSET) == 0) ^
    6447             :                                 Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0);
    6448             :                 } else {
    6449             :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    6450             :                         goto isset_not_found;
    6451             :                 }
    6452           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    6453             :                 zend_long lval;
    6454             : 
    6455           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    6456           0 :                         lval = Z_LVAL_P(offset);
    6457             : isset_str_offset:
    6458           0 :                         if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
    6459           0 :                                 if (opline->extended_value & ZEND_ISSET) {
    6460           0 :                                         result = 1;
    6461             :                                 } else {
    6462           0 :                                         result = (Z_STRVAL_P(container)[lval] == '0');
    6463             :                                 }
    6464             :                         } else {
    6465             :                                 goto isset_not_found;
    6466             :                         }
    6467             :                 } else {
    6468           0 :                         if (IS_CONST & (IS_CV|IS_VAR)) {
    6469             :                                 ZVAL_DEREF(offset);
    6470             :                         }
    6471           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    6472             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    6473           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    6474           0 :                                 lval = zval_get_long(offset);
    6475           0 :                                 goto isset_str_offset;
    6476             :                         }
    6477           0 :                         goto isset_not_found;
    6478             :                 }
    6479             :         } else {
    6480             : isset_not_found:
    6481           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    6482             :         }
    6483             : 
    6484             : isset_dim_obj_exit:
    6485             : 
    6486             : 
    6487           2 :         ZEND_VM_SMART_BRANCH(result, 1);
    6488           2 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6489             :         CHECK_EXCEPTION();
    6490           2 :         ZEND_VM_NEXT_OPCODE();
    6491             : }
    6492             : 
    6493           3 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6494             : {
    6495           3 :         USE_OPLINE
    6496             : 
    6497             :         zval *container;
    6498             :         int result;
    6499             :         zval *offset;
    6500             : 
    6501             :         SAVE_OPLINE();
    6502           3 :         container = EX_CONSTANT(opline->op1);
    6503             : 
    6504           3 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    6505             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    6506             : 
    6507             :                 HANDLE_EXCEPTION();
    6508             :         }
    6509             : 
    6510           3 :         offset = EX_CONSTANT(opline->op2);
    6511             : 
    6512             :         if (IS_CONST == IS_CONST ||
    6513             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    6514           3 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    6515             :                         container = Z_REFVAL_P(container);
    6516             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    6517             :                                 goto isset_no_object;
    6518             :                         }
    6519             :                 } else {
    6520           3 :                         goto isset_no_object;
    6521             :                 }
    6522             :         }
    6523             :         if (UNEXPECTED(!Z_OBJ_HT_P(container)->has_property)) {
    6524             :                 zend_error(E_NOTICE, "Trying to check property of non-object");
    6525             : isset_no_object:
    6526           3 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    6527             :         } else {
    6528             :                 result =
    6529             :                         ((opline->extended_value & ZEND_ISSET) == 0) ^
    6530             :                         Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISSET) == 0, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL));
    6531             :         }
    6532             : 
    6533             : 
    6534           3 :         ZEND_VM_SMART_BRANCH(result, 1);
    6535           3 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6536             :         CHECK_EXCEPTION();
    6537           3 :         ZEND_VM_NEXT_OPCODE();
    6538             : }
    6539             : 
    6540         185 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6541             : {
    6542         185 :         USE_OPLINE
    6543             : 
    6544             :         zval *name;
    6545             :         zval *val;
    6546             :         zend_constant c;
    6547             : 
    6548             :         SAVE_OPLINE();
    6549         185 :         name  = EX_CONSTANT(opline->op1);
    6550         185 :         val   = EX_CONSTANT(opline->op2);
    6551             : 
    6552         185 :         ZVAL_COPY_VALUE(&c.value, val);
    6553         185 :         if (Z_OPT_CONSTANT(c.value)) {
    6554          29 :                 if (UNEXPECTED(zval_update_constant_ex(&c.value, 0, NULL) != SUCCESS)) {
    6555             : 
    6556             : 
    6557           1 :                         HANDLE_EXCEPTION();
    6558             :                 }
    6559             :         } else {
    6560             :                 /* IS_CONST can't be IS_OBJECT, IS_RESOURCE or IS_REFERENCE */
    6561         156 :                 if (UNEXPECTED(Z_OPT_COPYABLE(c.value))) {
    6562           5 :                         zval_copy_ctor_func(&c.value);
    6563             :                 }
    6564             :         }
    6565         184 :         c.flags = CONST_CS; /* non persistent, case sensetive */
    6566         368 :         c.name = zend_string_dup(Z_STR_P(name), 0);
    6567         184 :         c.module_number = PHP_USER_CONSTANT;
    6568             : 
    6569         184 :         if (zend_register_constant(&c) == FAILURE) {
    6570             :         }
    6571             : 
    6572             : 
    6573             :         CHECK_EXCEPTION();
    6574         184 :         ZEND_VM_NEXT_OPCODE();
    6575             : }
    6576             : 
    6577          22 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6578             : {
    6579          22 :         USE_OPLINE
    6580             : 
    6581          22 :         zend_generator *generator = zend_get_running_generator(execute_data);
    6582             : 
    6583             :         SAVE_OPLINE();
    6584          22 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    6585           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Cannot yield from finally in a force-closed generator");
    6586             : 
    6587             : 
    6588           0 :                 HANDLE_EXCEPTION();
    6589             :         }
    6590             : 
    6591             :         /* Destroy the previously yielded value */
    6592          22 :         zval_ptr_dtor(&generator->value);
    6593             : 
    6594             :         /* Destroy the previously yielded key */
    6595          22 :         zval_ptr_dtor(&generator->key);
    6596             : 
    6597             :         /* Set the new yielded value */
    6598             :         if (IS_CONST != IS_UNUSED) {
    6599             : 
    6600             : 
    6601          22 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    6602             :                         /* Constants and temporary variables aren't yieldable by reference,
    6603             :                          * but we still allow them with a notice. */
    6604             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6605             :                                 zval *value;
    6606             : 
    6607           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6608             : 
    6609           0 :                                 value = EX_CONSTANT(opline->op1);
    6610           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6611           0 :                                 if (IS_CONST != IS_CONST) {
    6612             :                                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    6613             :                                                 zval_copy_ctor_func(&generator->value);
    6614             :                                         }
    6615             :                                 }
    6616             :                         } else {
    6617             :                                 zval *value_ptr = NULL;
    6618             : 
    6619             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    6620             :                                         zend_error(E_EXCEPTION | E_ERROR, "Cannot yield string offsets by reference");
    6621             : 
    6622             :                                         HANDLE_EXCEPTION();
    6623             :                                 }
    6624             : 
    6625             :                                 /* If a function call result is yielded and the function did
    6626             :                                  * not return by reference we throw a notice. */
    6627             :                                 if (IS_CONST == IS_VAR &&
    6628             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6629             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6630             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    6631             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6632             :                                 } else {
    6633             :                                         ZVAL_MAKE_REF(value_ptr);
    6634             :                                 }
    6635             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6636             : 
    6637             :                         }
    6638             :                 } else {
    6639          22 :                         zval *value = EX_CONSTANT(opline->op1);
    6640             : 
    6641             :                         /* Consts, temporary variables and references need copying */
    6642             :                         if (IS_CONST == IS_CONST) {
    6643          22 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6644          22 :                                 if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    6645           1 :                                         zval_copy_ctor_func(&generator->value);
    6646             :                                 }
    6647             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6648             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6649             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    6650             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    6651             : 
    6652             :                         } else {
    6653             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6654             :                                 if (IS_CONST == IS_CV) {
    6655             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6656             :                                 }
    6657             :                         }
    6658             :                 }
    6659             :         } else {
    6660             :                 /* If no value was specified yield null */
    6661             :                 ZVAL_NULL(&generator->value);
    6662             :         }
    6663             : 
    6664             :         /* Set the new yielded key */
    6665             :         if (IS_CONST != IS_UNUSED) {
    6666             : 
    6667          22 :                 zval *key = EX_CONSTANT(opline->op2);
    6668             : 
    6669             :                 /* Consts, temporary variables and references need copying */
    6670             :                 if (IS_CONST == IS_CONST) {
    6671          22 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6672          22 :                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
    6673           3 :                                 zval_copy_ctor_func(&generator->key);
    6674             :                         }
    6675             :                 } else if (IS_CONST == IS_TMP_VAR) {
    6676             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6677             :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    6678             :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    6679             : 
    6680             :                 } else {
    6681             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6682             :                         if (IS_CONST == IS_CV) {
    6683             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6684             :                         }
    6685             :                 }
    6686             : 
    6687          46 :                 if (Z_TYPE(generator->key) == IS_LONG
    6688           2 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6689             :                 ) {
    6690           2 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6691             :                 }
    6692             :         } else {
    6693             :                 /* If no key was specified we use auto-increment keys */
    6694             :                 generator->largest_used_integer_key++;
    6695             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6696             :         }
    6697             : 
    6698          22 :         if (RETURN_VALUE_USED(opline)) {
    6699             :                 /* If the return value of yield is used set the send
    6700             :                  * target and initialize it to NULL */
    6701           4 :                 generator->send_target = EX_VAR(opline->result.var);
    6702           4 :                 ZVAL_NULL(generator->send_target);
    6703             :         } else {
    6704          18 :                 generator->send_target = NULL;
    6705             :         }
    6706             : 
    6707             :         /* We increment to the next op, so we are at the correct position when the
    6708             :          * generator is resumed. */
    6709          22 :         ZEND_VM_INC_OPCODE();
    6710             : 
    6711             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6712             :          * variable in execute_data so we don't resume at an old position. */
    6713             :         SAVE_OPLINE();
    6714             : 
    6715          22 :         ZEND_VM_RETURN();
    6716             : }
    6717             : 
    6718           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6719             : {
    6720           0 :         USE_OPLINE
    6721             : 
    6722             :         zval *op1, *op2;
    6723             : 
    6724             :         SAVE_OPLINE();
    6725           0 :         op1 = EX_CONSTANT(opline->op1);
    6726           0 :         op2 = EX_CONSTANT(opline->op2);
    6727           0 :         pow_function(EX_VAR(opline->result.var), op1, op2);
    6728             : 
    6729             : 
    6730             :         CHECK_EXCEPTION();
    6731           0 :         ZEND_VM_NEXT_OPCODE();
    6732             : }
    6733             : 
    6734           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6735             : {
    6736           0 :         USE_OPLINE
    6737             :         zend_free_op free_op2;
    6738             :         zval *op1, *op2;
    6739             :         int result;
    6740             : 
    6741             :         SAVE_OPLINE();
    6742           0 :         op1 = EX_CONSTANT(opline->op1);
    6743           0 :         op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6744           0 :         result = fast_is_identical_function(op1, op2);
    6745             : 
    6746           0 :         zval_ptr_dtor_nogc(free_op2);
    6747           0 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
    6748           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6749             :         if ((IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
    6750             :                 CHECK_EXCEPTION();
    6751             :         }
    6752           0 :         ZEND_VM_NEXT_OPCODE();
    6753             : }
    6754             : 
    6755           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6756             : {
    6757           0 :         USE_OPLINE
    6758             :         zend_free_op free_op2;
    6759             :         zval *op1, *op2;
    6760             :         int result;
    6761             : 
    6762             :         SAVE_OPLINE();
    6763           0 :         op1 = EX_CONSTANT(opline->op1);
    6764           0 :         op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6765           0 :         result = fast_is_not_identical_function(op1, op2);
    6766             : 
    6767           0 :         zval_ptr_dtor_nogc(free_op2);
    6768           0 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR));
    6769           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6770             :         if ((IS_CONST|IS_TMP_VAR) & (IS_VAR|IS_TMP_VAR)) {
    6771             :                 CHECK_EXCEPTION();
    6772             :         }
    6773           0 :         ZEND_VM_NEXT_OPCODE();
    6774             : }
    6775             : 
    6776           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6777             : {
    6778           0 :         USE_OPLINE
    6779             : 
    6780           0 :         zend_generator *generator = zend_get_running_generator(execute_data);
    6781             : 
    6782             :         SAVE_OPLINE();
    6783           0 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    6784           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Cannot yield from finally in a force-closed generator");
    6785           0 :                 zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
    6786             : 
    6787           0 :                 HANDLE_EXCEPTION();
    6788             :         }
    6789             : 
    6790             :         /* Destroy the previously yielded value */
    6791           0 :         zval_ptr_dtor(&generator->value);
    6792             : 
    6793             :         /* Destroy the previously yielded key */
    6794           0 :         zval_ptr_dtor(&generator->key);
    6795             : 
    6796             :         /* Set the new yielded value */
    6797             :         if (IS_CONST != IS_UNUSED) {
    6798             : 
    6799             : 
    6800           0 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    6801             :                         /* Constants and temporary variables aren't yieldable by reference,
    6802             :                          * but we still allow them with a notice. */
    6803             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6804             :                                 zval *value;
    6805             : 
    6806           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6807             : 
    6808           0 :                                 value = EX_CONSTANT(opline->op1);
    6809           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6810           0 :                                 if (IS_CONST != IS_CONST) {
    6811             :                                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    6812             :                                                 zval_copy_ctor_func(&generator->value);
    6813             :                                         }
    6814             :                                 }
    6815             :                         } else {
    6816             :                                 zval *value_ptr = NULL;
    6817             : 
    6818             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    6819             :                                         zend_error(E_EXCEPTION | E_ERROR, "Cannot yield string offsets by reference");
    6820             :                                         zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
    6821             :                                         HANDLE_EXCEPTION();
    6822             :                                 }
    6823             : 
    6824             :                                 /* If a function call result is yielded and the function did
    6825             :                                  * not return by reference we throw a notice. */
    6826             :                                 if (IS_CONST == IS_VAR &&
    6827             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6828             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6829             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    6830             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6831             :                                 } else {
    6832             :                                         ZVAL_MAKE_REF(value_ptr);
    6833             :                                 }
    6834             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6835             : 
    6836             :                         }
    6837             :                 } else {
    6838           0 :                         zval *value = EX_CONSTANT(opline->op1);
    6839             : 
    6840             :                         /* Consts, temporary variables and references need copying */
    6841             :                         if (IS_CONST == IS_CONST) {
    6842           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6843           0 :                                 if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    6844           0 :                                         zval_copy_ctor_func(&generator->value);
    6845             :                                 }
    6846             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6847             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6848             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    6849             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    6850             : 
    6851             :                         } else {
    6852             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6853             :                                 if (IS_CONST == IS_CV) {
    6854             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6855             :                                 }
    6856             :                         }
    6857             :                 }
    6858             :         } else {
    6859             :                 /* If no value was specified yield null */
    6860             :                 ZVAL_NULL(&generator->value);
    6861             :         }
    6862             : 
    6863             :         /* Set the new yielded key */
    6864             :         if (IS_TMP_VAR != IS_UNUSED) {
    6865             :                 zend_free_op free_op2;
    6866           0 :                 zval *key = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6867             : 
    6868             :                 /* Consts, temporary variables and references need copying */
    6869           0 :                 if (IS_TMP_VAR == IS_CONST) {
    6870             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6871             :                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
    6872             :                                 zval_copy_ctor_func(&generator->key);
    6873             :                         }
    6874             :                 } else if (IS_TMP_VAR == IS_TMP_VAR) {
    6875           0 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6876             :                 } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    6877             :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    6878             : 
    6879             :                 } else {
    6880             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6881             :                         if (IS_TMP_VAR == IS_CV) {
    6882             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6883             :                         }
    6884             :                 }
    6885             : 
    6886           0 :                 if (Z_TYPE(generator->key) == IS_LONG
    6887           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6888             :                 ) {
    6889           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6890             :                 }
    6891             :         } else {
    6892             :                 /* If no key was specified we use auto-increment keys */
    6893             :                 generator->largest_used_integer_key++;
    6894             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6895             :         }
    6896             : 
    6897           0 :         if (RETURN_VALUE_USED(opline)) {
    6898             :                 /* If the return value of yield is used set the send
    6899             :                  * target and initialize it to NULL */
    6900           0 :                 generator->send_target = EX_VAR(opline->result.var);
    6901           0 :                 ZVAL_NULL(generator->send_target);
    6902             :         } else {
    6903           0 :                 generator->send_target = NULL;
    6904             :         }
    6905             : 
    6906             :         /* We increment to the next op, so we are at the correct position when the
    6907             :          * generator is resumed. */
    6908           0 :         ZEND_VM_INC_OPCODE();
    6909             : 
    6910             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6911             :          * variable in execute_data so we don't resume at an old position. */
    6912             :         SAVE_OPLINE();
    6913             : 
    6914           0 :         ZEND_VM_RETURN();
    6915             : }
    6916             : 
    6917       21161 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6918             : {
    6919       21161 :         USE_OPLINE
    6920             :         zend_free_op free_op2;
    6921             :         zval *op1, *op2;
    6922             :         int result;
    6923             : 
    6924             :         SAVE_OPLINE();
    6925       21161 :         op1 = EX_CONSTANT(opline->op1);
    6926       42322 :         op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
    6927       21161 :         result = fast_is_identical_function(op1, op2);
    6928             : 
    6929       21161 :         zval_ptr_dtor_nogc(free_op2);
    6930       21161 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
    6931          19 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6932             :         if ((IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
    6933             :                 CHECK_EXCEPTION();
    6934             :         }
    6935          19 :         ZEND_VM_NEXT_OPCODE();
    6936             : }
    6937             : 
    6938        7134 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6939             : {
    6940        7134 :         USE_OPLINE
    6941             :         zend_free_op free_op2;
    6942             :         zval *op1, *op2;
    6943             :         int result;
    6944             : 
    6945             :         SAVE_OPLINE();
    6946        7134 :         op1 = EX_CONSTANT(opline->op1);
    6947       14268 :         op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
    6948        7134 :         result = fast_is_not_identical_function(op1, op2);
    6949             : 
    6950        7134 :         zval_ptr_dtor_nogc(free_op2);
    6951        7134 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR));
    6952          28 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6953             :         if ((IS_CONST|IS_VAR) & (IS_VAR|IS_TMP_VAR)) {
    6954             :                 CHECK_EXCEPTION();
    6955             :         }
    6956          28 :         ZEND_VM_NEXT_OPCODE();
    6957             : }
    6958             : 
    6959         781 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    6960             : {
    6961         781 :         USE_OPLINE
    6962             : 
    6963             :         zval *varname;
    6964             :         zval *retval;
    6965             :         zend_string *name;
    6966             :         HashTable *target_symbol_table;
    6967             : 
    6968             :         SAVE_OPLINE();
    6969         781 :         varname = EX_CONSTANT(opline->op1);
    6970             : 
    6971             :         if (IS_CONST == IS_CONST) {
    6972         781 :                 name = Z_STR_P(varname);
    6973             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    6974             :                 name = Z_STR_P(varname);
    6975             :                 zend_string_addref(name);
    6976             :         } else {
    6977             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    6978             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    6979             :                 }
    6980             :                 name = zval_get_string(varname);
    6981             :         }
    6982             : 
    6983             :         if (IS_VAR != IS_UNUSED) {
    6984             :                 zend_class_entry *ce;
    6985             : 
    6986         781 :                 if (IS_VAR == IS_CONST) {
    6987             :                         if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    6988             : 
    6989             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    6990             :                                 retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    6991             : 
    6992             :                                 /* check if static properties were destoyed */
    6993             :                                 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6994             :                                         zend_error(E_EXCEPTION | E_ERROR, "Access to undeclared static property: %s::$%s", ce->name->val, name->val);
    6995             : 
    6996             :                                         HANDLE_EXCEPTION();
    6997             :                                 }
    6998             : 
    6999             :                                 goto fetch_var_return;
    7000             :                         } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    7001             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    7002             :                         } else {
    7003             :                                 ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    7004             :                                 if (UNEXPECTED(ce == NULL)) {
    7005             :                                         if (IS_CONST != IS_CONST) {
    7006             :                                                 zend_string_release(name);
    7007             :                                         }
    7008             : 
    7009             :                                         CHECK_EXCEPTION();
    7010             :                                         ZEND_VM_NEXT_OPCODE();
    7011             :                                 }
    7012             :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7013             :                         }
    7014             :                 } else {
    7015         781 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7016        1246 :                         if (IS_CONST == IS_CONST &&
    7017        1246 :                             (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    7018             : 
    7019             :                                 /* check if static properties were destoyed */
    7020         465 :                                 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7021           2 :                                         zend_error(E_EXCEPTION | E_ERROR, "Access to undeclared static property: %s::$%s", ce->name->val, name->val);
    7022             : 
    7023           2 :                                         HANDLE_EXCEPTION();
    7024             :                                 }
    7025             : 
    7026         463 :                                 goto fetch_var_return;
    7027             :                         }
    7028             :                 }
    7029         316 :                 retval = zend_std_get_static_property(ce, name, 0);
    7030         316 :                 if (UNEXPECTED(EG(exception))) {
    7031             : 
    7032           4 :                         HANDLE_EXCEPTION();
    7033             :                 }
    7034         312 :                 if (IS_CONST == IS_CONST && retval) {
    7035         312 :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
    7036             :                 }
    7037             : 
    7038             :         } else {
    7039             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7040             :                 retval = zend_hash_find(target_symbol_table, name);
    7041             :                 if (retval == NULL) {
    7042             :                         switch (type) {
    7043             :                                 case BP_VAR_R:
    7044             :                                 case BP_VAR_UNSET:
    7045             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7046             :                                         /* break missing intentionally */
    7047             :                                 case BP_VAR_IS:
    7048             :                                         retval = &EG(uninitialized_zval);
    7049             :                                         break;
    7050             :                                 case BP_VAR_RW:
    7051             :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7052             :                                         /* break missing intentionally */
    7053             :                                 case BP_VAR_W:
    7054             :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    7055             :                                         break;
    7056             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7057             :                         }
    7058             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    7059             :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    7060             :                         retval = Z_INDIRECT_P(retval);
    7061             :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    7062             :                                 switch (type) {
    7063             :                                         case BP_VAR_R:
    7064             :                                         case BP_VAR_UNSET:
    7065             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7066             :                                                 /* break missing intentionally */
    7067             :                                         case BP_VAR_IS:
    7068             :                                                 retval = &EG(uninitialized_zval);
    7069             :                                                 break;
    7070             :                                         case BP_VAR_RW:
    7071             :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7072             :                                                 /* break missing intentionally */
    7073             :                                         case BP_VAR_W:
    7074             :                                                 ZVAL_NULL(retval);
    7075             :                                                 break;
    7076             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    7077             :                                 }
    7078             :                         }
    7079             :                 }
    7080             :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    7081             :                         if (Z_CONSTANT_P(retval)) {
    7082             :                                 if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
    7083             : 
    7084             :                                         HANDLE_EXCEPTION();
    7085             :                                 }
    7086             :                         }
    7087             :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    7088             : 
    7089             :                 }
    7090             :         }
    7091             : 
    7092         312 :         if (IS_CONST != IS_CONST) {
    7093             :                 zend_string_release(name);
    7094             :         }
    7095             : 
    7096             : fetch_var_return:
    7097             :         ZEND_ASSERT(retval != NULL);
    7098        1340 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    7099         613 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    7100           1 :                         ZVAL_UNREF(retval);
    7101             :                 }
    7102         565 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    7103             :         } else {
    7104         210 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    7105             :         }
    7106             :         CHECK_EXCEPTION();
    7107         775 :         ZEND_VM_NEXT_OPCODE();
    7108             : }
    7109             : 
    7110         547 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7111             : {
    7112         547 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7113             : }
    7114             : 
    7115         157 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7116             : {
    7117         157 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7118             : }
    7119             : 
    7120          51 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7121             : {
    7122          51 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7123             : }
    7124             : 
    7125           7 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7126             : {
    7127           7 :         USE_OPLINE
    7128             : 
    7129          14 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    7130           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7131             :         } else {
    7132           7 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7133             :         }
    7134             : }
    7135             : 
    7136           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7137             : {
    7138           6 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7139             : }
    7140             : 
    7141          13 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7142             : {
    7143          13 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7144             : }
    7145             : 
    7146           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7147             : {
    7148           0 :         USE_OPLINE
    7149             :         zval tmp, *varname;
    7150             :         HashTable *target_symbol_table;
    7151             : 
    7152             : 
    7153             :         SAVE_OPLINE();
    7154           0 :         if (IS_CONST == IS_CV &&
    7155             :             IS_VAR == IS_UNUSED &&
    7156             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7157             :                 zval *var = EX_VAR(opline->op1.var);
    7158             : 
    7159             :                 if (Z_REFCOUNTED_P(var)) {
    7160             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    7161             : 
    7162             :                         if (!--GC_REFCOUNT(garbage)) {
    7163             :                                 ZVAL_UNDEF(var);
    7164             :                                 zval_dtor_func_for_ptr(garbage);
    7165             :                         } else {
    7166             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    7167             :                                 ZVAL_UNDEF(var);
    7168             :                         }
    7169             :                 } else {
    7170             :                         ZVAL_UNDEF(var);
    7171             :                 }
    7172             :                 CHECK_EXCEPTION();
    7173             :                 ZEND_VM_NEXT_OPCODE();
    7174             :         }
    7175             : 
    7176           0 :         varname = EX_CONSTANT(opline->op1);
    7177             : 
    7178           0 :         ZVAL_UNDEF(&tmp);
    7179           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7180             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    7181             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    7182             :                 }
    7183             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7184             :                 varname = &tmp;
    7185             :         }
    7186             : 
    7187             :         if (IS_VAR != IS_UNUSED) {
    7188             :                 zend_class_entry *ce;
    7189             : 
    7190           0 :                 if (IS_VAR == IS_CONST) {
    7191             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    7192             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    7193             :                         } else {
    7194             :                                 ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    7195             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7196             :                                         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7197             :                                                 zend_string_release(Z_STR(tmp));
    7198             :                                         }
    7199             : 
    7200             :                                         HANDLE_EXCEPTION();
    7201             :                                 }
    7202             :                                 if (UNEXPECTED(ce == NULL)) {
    7203             :                                         zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    7204             :                                         if (IS_CONST != IS_CONST) {
    7205             :                                                 zend_string_release(Z_STR(tmp));
    7206             :                                         }
    7207             :                                         HANDLE_EXCEPTION();
    7208             :                                 }
    7209             :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7210             :                         }
    7211             :                 } else {
    7212           0 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7213             :                 }
    7214           0 :                 zend_std_unset_static_property(ce, Z_STR_P(varname));
    7215             :         } else {
    7216             :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7217             :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    7218             :         }
    7219             : 
    7220           0 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7221             :                 zend_string_release(Z_STR(tmp));
    7222             :         }
    7223             : 
    7224             :         CHECK_EXCEPTION();
    7225           0 :         ZEND_VM_NEXT_OPCODE();
    7226             : }
    7227             : 
    7228         173 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7229             : {
    7230         173 :         USE_OPLINE
    7231             :         zval *value;
    7232             :         int result;
    7233             : 
    7234         173 :         if (IS_CONST == IS_CV &&
    7235             :             IS_VAR == IS_UNUSED &&
    7236             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7237             :                 value = EX_VAR(opline->op1.var);
    7238             :                 if (opline->extended_value & ZEND_ISSET) {
    7239             :                         result =
    7240             :                                 Z_TYPE_P(value) > IS_NULL &&
    7241             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7242             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7243             :                         SAVE_OPLINE();
    7244             :                         result = !i_zend_is_true(value);
    7245             :                         if (UNEXPECTED(EG(exception))) {
    7246             :                                 HANDLE_EXCEPTION();
    7247             :                         }
    7248             :                 }
    7249             :                 ZEND_VM_SMART_BRANCH(result, 0);
    7250             :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7251             :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    7252             :                 ZEND_VM_CONTINUE();
    7253             :         } else {
    7254             : 
    7255             :                 zval tmp, *varname;
    7256             : 
    7257             :                 SAVE_OPLINE();
    7258         173 :                 varname = EX_CONSTANT(opline->op1);
    7259         173 :                 ZVAL_UNDEF(&tmp);
    7260         173 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7261             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    7262             :                         varname = &tmp;
    7263             :                 }
    7264             : 
    7265             :                 if (IS_VAR != IS_UNUSED) {
    7266             :                         zend_class_entry *ce;
    7267             : 
    7268         173 :                         if (IS_VAR == IS_CONST) {
    7269             :                                 if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    7270             : 
    7271             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    7272             :                                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    7273             : 
    7274             :                                         /* check if static properties were destoyed */
    7275             :                                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7276             :                                                 value = NULL;
    7277             :                                         }
    7278             : 
    7279             :                                         goto is_var_return;
    7280             :                                 } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    7281             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    7282             :                                 } else {
    7283             :                                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    7284             :                                         if (UNEXPECTED(ce == NULL)) {
    7285             :                                                 CHECK_EXCEPTION();
    7286             :                                                 ZEND_VM_NEXT_OPCODE();
    7287             :                                         }
    7288             :                                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7289             :                                 }
    7290             :                         } else {
    7291         173 :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    7292         231 :                                 if (IS_CONST == IS_CONST &&
    7293         231 :                                     (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    7294             : 
    7295             :                                         /* check if static properties were destoyed */
    7296          58 :                                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7297           1 :                                                 value = NULL;
    7298             :                                         }
    7299             : 
    7300          58 :                                         goto is_var_return;
    7301             :                                 }
    7302             :                         }
    7303             : 
    7304         115 :                         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
    7305             : 
    7306         115 :                         if (IS_CONST == IS_CONST && value) {
    7307         115 :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
    7308             :                         }
    7309             :                 } else {
    7310             :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7311             :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    7312             :                 }
    7313             : 
    7314         115 :                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7315             :                         zend_string_release(Z_STR(tmp));
    7316             :                 }
    7317             : 
    7318             : is_var_return:
    7319         173 :                 if (opline->extended_value & ZEND_ISSET) {
    7320         402 :                         result = value && Z_TYPE_P(value) > IS_NULL &&
    7321           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7322             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7323           0 :                         result = !value || !i_zend_is_true(value);
    7324             :                 }
    7325             : 
    7326         173 :                 ZEND_VM_SMART_BRANCH(result, 1);
    7327         170 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7328             :                 CHECK_EXCEPTION();
    7329         170 :                 ZEND_VM_NEXT_OPCODE();
    7330             :         }
    7331             : }
    7332             : 
    7333           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7334             : {
    7335           2 :         USE_OPLINE
    7336             : 
    7337           2 :         zend_generator *generator = zend_get_running_generator(execute_data);
    7338             : 
    7339             :         SAVE_OPLINE();
    7340           2 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    7341           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Cannot yield from finally in a force-closed generator");
    7342           0 :                 zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
    7343             : 
    7344           0 :                 HANDLE_EXCEPTION();
    7345             :         }
    7346             : 
    7347             :         /* Destroy the previously yielded value */
    7348           2 :         zval_ptr_dtor(&generator->value);
    7349             : 
    7350             :         /* Destroy the previously yielded key */
    7351           2 :         zval_ptr_dtor(&generator->key);
    7352             : 
    7353             :         /* Set the new yielded value */
    7354             :         if (IS_CONST != IS_UNUSED) {
    7355             : 
    7356             : 
    7357           2 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    7358             :                         /* Constants and temporary variables aren't yieldable by reference,
    7359             :                          * but we still allow them with a notice. */
    7360             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7361             :                                 zval *value;
    7362             : 
    7363           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7364             : 
    7365           0 :                                 value = EX_CONSTANT(opline->op1);
    7366           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7367           0 :                                 if (IS_CONST != IS_CONST) {
    7368             :                                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    7369             :                                                 zval_copy_ctor_func(&generator->value);
    7370             :                                         }
    7371             :                                 }
    7372             :                         } else {
    7373             :                                 zval *value_ptr = NULL;
    7374             : 
    7375             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    7376             :                                         zend_error(E_EXCEPTION | E_ERROR, "Cannot yield string offsets by reference");
    7377             :                                         zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
    7378             :                                         HANDLE_EXCEPTION();
    7379             :                                 }
    7380             : 
    7381             :                                 /* If a function call result is yielded and the function did
    7382             :                                  * not return by reference we throw a notice. */
    7383             :                                 if (IS_CONST == IS_VAR &&
    7384             :                                     (value_ptr == &EG(uninitialized_zval) ||
    7385             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    7386             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    7387             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7388             :                                 } else {
    7389             :                                         ZVAL_MAKE_REF(value_ptr);
    7390             :                                 }
    7391             :                                 ZVAL_COPY(&generator->value, value_ptr);
    7392             : 
    7393             :                         }
    7394             :                 } else {
    7395           2 :                         zval *value = EX_CONSTANT(opline->op1);
    7396             : 
    7397             :                         /* Consts, temporary variables and references need copying */
    7398             :                         if (IS_CONST == IS_CONST) {
    7399           2 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7400           2 :                                 if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    7401           0 :                                         zval_copy_ctor_func(&generator->value);
    7402             :                                 }
    7403             :                         } else if (IS_CONST == IS_TMP_VAR) {
    7404             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7405             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    7406             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    7407             : 
    7408             :                         } else {
    7409             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    7410             :                                 if (IS_CONST == IS_CV) {
    7411             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    7412             :                                 }
    7413             :                         }
    7414             :                 }
    7415             :         } else {
    7416             :                 /* If no value was specified yield null */
    7417             :                 ZVAL_NULL(&generator->value);
    7418             :         }
    7419             : 
    7420             :         /* Set the new yielded key */
    7421             :         if (IS_VAR != IS_UNUSED) {
    7422             :                 zend_free_op free_op2;
    7423           4 :                 zval *key = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    7424             : 
    7425             :                 /* Consts, temporary variables and references need copying */
    7426           2 :                 if (IS_VAR == IS_CONST) {
    7427             :                         ZVAL_COPY_VALUE(&generator->key, key);
    7428             :                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
    7429             :                                 zval_copy_ctor_func(&generator->key);
    7430             :                         }
    7431           2 :                 } else if (IS_VAR == IS_TMP_VAR) {
    7432             :                         ZVAL_COPY_VALUE(&generator->key, key);
    7433           2 :                 } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    7434           0 :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    7435           0 :                         zval_ptr_dtor_nogc(free_op2);
    7436             :                 } else {
    7437           2 :                         ZVAL_COPY_VALUE(&generator->key, key);
    7438           2 :                         if (IS_VAR == IS_CV) {
    7439             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    7440             :                         }
    7441             :                 }
    7442             : 
    7443           5 :                 if (Z_TYPE(generator->key) == IS_LONG
    7444           1 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    7445             :                 ) {
    7446           1 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    7447             :                 }
    7448             :         } else {
    7449             :                 /* If no key was specified we use auto-increment keys */
    7450             :                 generator->largest_used_integer_key++;
    7451             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    7452             :         }
    7453             : 
    7454           2 :         if (RETURN_VALUE_USED(opline)) {
    7455             :                 /* If the return value of yield is used set the send
    7456             :                  * target and initialize it to NULL */
    7457           0 :                 generator->send_target = EX_VAR(opline->result.var);
    7458           0 :                 ZVAL_NULL(generator->send_target);
    7459             :         } else {
    7460           2 :                 generator->send_target = NULL;
    7461             :         }
    7462             : 
    7463             :         /* We increment to the next op, so we are at the correct position when the
    7464             :          * generator is resumed. */
    7465           2 :         ZEND_VM_INC_OPCODE();
    7466             : 
    7467             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    7468             :          * variable in execute_data so we don't resume at an old position. */
    7469             :         SAVE_OPLINE();
    7470             : 
    7471           2 :         ZEND_VM_RETURN();
    7472             : }
    7473             : 
    7474      104134 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    7475             : {
    7476      104134 :         USE_OPLINE
    7477             : 
    7478             :         zval *varname;
    7479             :         zval *retval;
    7480             :         zend_string *name;
    7481             :         HashTable *target_symbol_table;
    7482             : 
    7483             :         SAVE_OPLINE();
    7484      104134 :         varname = EX_CONSTANT(opline->op1);
    7485             : 
    7486             :         if (IS_CONST == IS_CONST) {
    7487      104134 :                 name = Z_STR_P(varname);
    7488             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    7489             :                 name = Z_STR_P(varname);
    7490             :                 zend_string_addref(name);
    7491             :         } else {
    7492             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    7493             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    7494             :                 }
    7495             :                 name = zval_get_string(varname);
    7496             :         }
    7497             : 
    7498      104134 :         if (IS_UNUSED != IS_UNUSED) {
    7499             :                 zend_class_entry *ce;
    7500             : 
    7501             :                 if (IS_UNUSED == IS_CONST) {
    7502             :                         if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    7503             : 
    7504             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    7505             :                                 retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    7506             : 
    7507             :                                 /* check if static properties were destoyed */
    7508             :                                 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7509             :                                         zend_error(E_EXCEPTION | E_ERROR, "Access to undeclared static property: %s::$%s", ce->name->val, name->val);
    7510             : 
    7511             :                                         HANDLE_EXCEPTION();
    7512             :                                 }
    7513             : 
    7514             :                                 goto fetch_var_return;
    7515             :                         } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    7516             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    7517             :                         } else {
    7518             :                                 ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    7519             :                                 if (UNEXPECTED(ce == NULL)) {
    7520             :                                         if (IS_CONST != IS_CONST) {
    7521             :                                                 zend_string_release(name);
    7522             :                                         }
    7523             : 
    7524             :                                         CHECK_EXCEPTION();
    7525             :                                         ZEND_VM_NEXT_OPCODE();
    7526             :                                 }
    7527             :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7528             :                         }
    7529             :                 } else {
    7530             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7531             :                         if (IS_CONST == IS_CONST &&
    7532             :                             (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    7533             : 
    7534             :                                 /* check if static properties were destoyed */
    7535             :                                 if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7536             :                                         zend_error(E_EXCEPTION | E_ERROR, "Access to undeclared static property: %s::$%s", ce->name->val, name->val);
    7537             : 
    7538             :                                         HANDLE_EXCEPTION();
    7539             :                                 }
    7540             : 
    7541             :                                 goto fetch_var_return;
    7542             :                         }
    7543             :                 }
    7544             :                 retval = zend_std_get_static_property(ce, name, 0);
    7545             :                 if (UNEXPECTED(EG(exception))) {
    7546             : 
    7547             :                         HANDLE_EXCEPTION();
    7548             :                 }
    7549             :                 if (IS_CONST == IS_CONST && retval) {
    7550             :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
    7551             :                 }
    7552             : 
    7553             :         } else {
    7554      208268 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7555      104134 :                 retval = zend_hash_find(target_symbol_table, name);
    7556      104134 :                 if (retval == NULL) {
    7557         788 :                         switch (type) {
    7558             :                                 case BP_VAR_R:
    7559             :                                 case BP_VAR_UNSET:
    7560         783 :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7561             :                                         /* break missing intentionally */
    7562             :                                 case BP_VAR_IS:
    7563         783 :                                         retval = &EG(uninitialized_zval);
    7564         783 :                                         break;
    7565             :                                 case BP_VAR_RW:
    7566           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7567             :                                         /* break missing intentionally */
    7568             :                                 case BP_VAR_W:
    7569           5 :                                         retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    7570             :                                         break;
    7571             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7572             :                         }
    7573             :                 /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    7574      103346 :                 } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    7575       88382 :                         retval = Z_INDIRECT_P(retval);
    7576       88382 :                         if (Z_TYPE_P(retval) == IS_UNDEF) {
    7577         680 :                                 switch (type) {
    7578             :                                         case BP_VAR_R:
    7579             :                                         case BP_VAR_UNSET:
    7580         679 :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7581             :                                                 /* break missing intentionally */
    7582             :                                         case BP_VAR_IS:
    7583         679 :                                                 retval = &EG(uninitialized_zval);
    7584         679 :                                                 break;
    7585             :                                         case BP_VAR_RW:
    7586           0 :                                                 zend_error(E_NOTICE,"Undefined variable: %s", name->val);
    7587             :                                                 /* break missing intentionally */
    7588             :                                         case BP_VAR_W:
    7589           1 :                                                 ZVAL_NULL(retval);
    7590             :                                                 break;
    7591             :                                         EMPTY_SWITCH_DEFAULT_CASE()
    7592             :                                 }
    7593             :                         }
    7594             :                 }
    7595      104134 :                 if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) == ZEND_FETCH_STATIC) {
    7596        1416 :                         if (Z_CONSTANT_P(retval)) {
    7597           6 :                                 if (UNEXPECTED(zval_update_constant_ex(retval, 1, NULL) != SUCCESS)) {
    7598             : 
    7599           0 :                                         HANDLE_EXCEPTION();
    7600             :                                 }
    7601             :                         }
    7602      102718 :                 } else if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    7603             : 
    7604             :                 }
    7605             :         }
    7606             : 
    7607      104134 :         if (IS_CONST != IS_CONST) {
    7608             :                 zend_string_release(name);
    7609             :         }
    7610             : 
    7611             : fetch_var_return:
    7612             :         ZEND_ASSERT(retval != NULL);
    7613      206347 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    7614      102703 :                 if (/*type == BP_VAR_R &&*/ Z_ISREF_P(retval) && Z_REFCOUNT_P(retval) == 1) {
    7615         168 :                         ZVAL_UNREF(retval);
    7616             :                 }
    7617      102213 :                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    7618             :         } else {
    7619        1921 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    7620             :         }
    7621             :         CHECK_EXCEPTION();
    7622      104134 :         ZEND_VM_NEXT_OPCODE();
    7623             : }
    7624             : 
    7625      102192 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7626             : {
    7627      102192 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7628             : }
    7629             : 
    7630        1888 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7631             : {
    7632        1888 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7633             : }
    7634             : 
    7635           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7636             : {
    7637           5 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7638             : }
    7639             : 
    7640           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7641             : {
    7642           4 :         USE_OPLINE
    7643             : 
    7644           8 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    7645           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7646             :         } else {
    7647           4 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7648             :         }
    7649             : }
    7650             : 
    7651          28 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7652             : {
    7653          28 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7654             : }
    7655             : 
    7656          17 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7657             : {
    7658          17 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7659             : }
    7660             : 
    7661           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7662             : {
    7663           0 :         USE_OPLINE
    7664             :         zval *container;
    7665             :         zend_free_op free_op1;
    7666             : 
    7667             :         SAVE_OPLINE();
    7668             : 
    7669           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    7670             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7671           0 :             zend_error(E_EXCEPTION | E_ERROR, "Cannot use temporary expression in write context");
    7672             : 
    7673             : 
    7674           0 :                         HANDLE_EXCEPTION();
    7675             :         }
    7676             :                 container = NULL;
    7677             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    7678             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use string offset as an array");
    7679             : 
    7680             :                         HANDLE_EXCEPTION();
    7681             :                 }
    7682             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
    7683             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    7684             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    7685             :                 }
    7686             : 
    7687             : 
    7688             :         } else {
    7689             :                 if (IS_UNUSED == IS_UNUSED) {
    7690           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use [] for reading");
    7691             : 
    7692             : 
    7693           0 :                         HANDLE_EXCEPTION();
    7694             :                 }
    7695             :                 container = EX_CONSTANT(opline->op1);
    7696             :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
    7697             : 
    7698             : 
    7699             :         }
    7700             :         CHECK_EXCEPTION();
    7701             :         ZEND_VM_NEXT_OPCODE();
    7702             : }
    7703             : 
    7704           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7705             : {
    7706           2 :         USE_OPLINE
    7707             :         zval *function_name;
    7708             :         zend_class_entry *ce;
    7709             :         zend_object *object;
    7710             :         zend_function *fbc;
    7711             :         zend_execute_data *call;
    7712             : 
    7713             :         SAVE_OPLINE();
    7714             : 
    7715             :         if (IS_CONST == IS_CONST) {
    7716             :                 /* no function found. try a static method in class */
    7717           2 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    7718           0 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    7719             :                 } else {
    7720           2 :                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT |  ZEND_FETCH_CLASS_EXCEPTION);
    7721           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    7722           0 :                                 HANDLE_EXCEPTION();
    7723             :                         }
    7724           2 :                         if (UNEXPECTED(ce == NULL)) {
    7725           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    7726           0 :                                 HANDLE_EXCEPTION();
    7727             :                         }
    7728           2 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    7729             :                 }
    7730             :         } else {
    7731             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    7732             :         }
    7733             : 
    7734           2 :         if (IS_CONST == IS_CONST &&
    7735             :             IS_UNUSED == IS_CONST &&
    7736             :             CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    7737             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    7738           2 :         } else if (IS_CONST != IS_CONST &&
    7739             :                    IS_UNUSED == IS_CONST &&
    7740             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
    7741             :                 /* do nothing */
    7742           2 :         } else if (IS_UNUSED != IS_UNUSED) {
    7743             : 
    7744             : 
    7745             :                 function_name = NULL;
    7746             :                 if (IS_UNUSED != IS_CONST) {
    7747             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    7748             :                                 if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    7749             :                                         GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    7750             :                                 }
    7751             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7752             :                                         HANDLE_EXCEPTION();
    7753             :                                 }
    7754             :                                 zend_error(E_EXCEPTION | E_ERROR, "Function name must be a string");
    7755             : 
    7756             :                                 HANDLE_EXCEPTION();
    7757             :                         }
    7758             :                 }
    7759             : 
    7760             :                 if (ce->get_static_method) {
    7761             :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name));
    7762             :                 } else {
    7763             :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    7764             :                 }
    7765             :                 if (UNEXPECTED(fbc == NULL)) {
    7766             :                         if (EXPECTED(!EG(exception))) {
    7767             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    7768             :                         }
    7769             : 
    7770             :                         HANDLE_EXCEPTION();
    7771             :                 }
    7772             :                 if (IS_UNUSED == IS_CONST &&
    7773             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    7774             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
    7775             :                         if (IS_CONST == IS_CONST) {
    7776             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    7777             :                         } else {
    7778             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    7779             :                         }
    7780             :                 }
    7781             :                 if (IS_UNUSED != IS_CONST) {
    7782             : 
    7783             :                 }
    7784             :         } else {
    7785           2 :                 if (UNEXPECTED(ce->constructor == NULL)) {
    7786           1 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call constructor");
    7787           1 :                         HANDLE_EXCEPTION();
    7788             :                 }
    7789           1 :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    7790           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    7791           0 :                         HANDLE_EXCEPTION();
    7792             :                 }
    7793           1 :                 fbc = ce->constructor;
    7794             :         }
    7795             : 
    7796           1 :         object = NULL;
    7797           1 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    7798           1 :                 if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
    7799           1 :                         object = Z_OBJ(EX(This));
    7800             :                 }
    7801           1 :                 if (!object) {
    7802           0 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    7803             :                                 /* Allowed for PHP 4 compatibility. */
    7804           0 :                                 zend_error(
    7805             :                                         E_DEPRECATED,
    7806             :                                         "Non-static method %s::%s() should not be called statically",
    7807           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    7808             :                         } else {
    7809             :                                 /* An internal function assumes $this is present and won't check that.
    7810             :                                  * So PHP would crash by allowing the call. */
    7811           0 :                                 zend_error(
    7812             :                                         E_EXCEPTION | E_ERROR,
    7813             :                                         "Non-static method %s::%s() cannot be called statically",
    7814           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    7815           0 :                                 HANDLE_EXCEPTION();
    7816             :                         }
    7817             :                 }
    7818             :         }
    7819             : 
    7820           1 :         if (IS_CONST != IS_CONST) {
    7821             :                 /* previous opcode is ZEND_FETCH_CLASS */
    7822             :                 if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
    7823             :                     ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
    7824             :                         ce = EX(called_scope);
    7825             :                 }
    7826             :         }
    7827             : 
    7828           2 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    7829             :                 fbc, opline->extended_value, ce, object);
    7830           1 :         call->prev_execute_data = EX(call);
    7831           1 :         EX(call) = call;
    7832             : 
    7833             :         CHECK_EXCEPTION();
    7834           1 :         ZEND_VM_NEXT_OPCODE();
    7835             : }
    7836             : 
    7837           8 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7838             : {
    7839           8 :         USE_OPLINE
    7840             : 
    7841             :         SAVE_OPLINE();
    7842           8 :         if (IS_CONST == IS_UNUSED) {
    7843             :                 zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
    7844             :         } else {
    7845             : /* prevents "undefined variable opline" errors */
    7846             : #if 0 || (IS_CONST != IS_UNUSED)
    7847             :                 zval *retval_ref, *retval_ptr;
    7848             : 
    7849           8 :                 zend_arg_info *ret_info = EX(func)->common.arg_info - 1;
    7850             : 
    7851           8 :                 retval_ref = retval_ptr = EX_CONSTANT(opline->op1);
    7852             : 
    7853             :                 if (IS_CONST == IS_CONST) {
    7854           8 :                         ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
    7855           8 :                         retval_ref = retval_ptr = EX_VAR(opline->result.var);
    7856             :                 } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    7857             :                         ZVAL_DEREF(retval_ptr);
    7858             :                 }
    7859             : 
    7860          15 :                 if (UNEXPECTED(!ret_info->class_name
    7861             :                         && ret_info->type_hint != IS_CALLABLE
    7862             :                         && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
    7863             :                         && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
    7864             :                         && retval_ref != retval_ptr)
    7865             :                 ) {
    7866             :                         /* A cast might happen - unwrap the reference if this is a by-value return */
    7867           0 :                         if (Z_REFCOUNT_P(retval_ref) == 1) {
    7868           0 :                                 ZVAL_UNREF(retval_ref);
    7869             :                         } else {
    7870             :                                 Z_DELREF_P(retval_ref);
    7871           0 :                                 ZVAL_COPY(retval_ref, retval_ptr);
    7872             :                         }
    7873           0 :                         retval_ptr = retval_ref;
    7874             :                 }
    7875           8 :                 zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
    7876             : 
    7877           8 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7878             : 
    7879             :                 }
    7880             : #endif
    7881             :         }
    7882             :         CHECK_EXCEPTION();
    7883           8 :         ZEND_VM_NEXT_OPCODE();
    7884             : }
    7885             : 
    7886       13691 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7887             : {
    7888       13691 :         USE_OPLINE
    7889             : 
    7890             :         zval *expr_ptr, new_expr;
    7891             : 
    7892             :         SAVE_OPLINE();
    7893       13691 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    7894             :             UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    7895             :                 expr_ptr = NULL;
    7896             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr == NULL)) {
    7897             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot create references to/from string offsets");
    7898             :                         zend_array_destroy(Z_ARRVAL_P(EX_VAR(opline->result.var)));
    7899             :                         HANDLE_EXCEPTION();
    7900             :                 }
    7901             :                 ZVAL_MAKE_REF(expr_ptr);
    7902             :                 Z_ADDREF_P(expr_ptr);
    7903             : 
    7904             :         } else {
    7905       13691 :                 expr_ptr = EX_CONSTANT(opline->op1);
    7906       13691 :                 if (IS_CONST == IS_TMP_VAR) {
    7907             :                         /* pass */
    7908             :                 } else if (IS_CONST == IS_CONST) {
    7909       13691 :                         if (UNEXPECTED(Z_OPT_COPYABLE_P(expr_ptr))) {
    7910        1975 :                                 ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    7911        1975 :                                 zval_copy_ctor_func(&new_expr);
    7912        1975 :                                 expr_ptr = &new_expr;
    7913             :                         }
    7914             :                 } else if (IS_CONST == IS_CV) {
    7915             :                         ZVAL_DEREF(expr_ptr);
    7916             :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    7917             :                                 Z_ADDREF_P(expr_ptr);
    7918             :                         }
    7919             :                 } else /* if (IS_CONST == IS_VAR) */ {
    7920             :                         if (UNEXPECTED(Z_ISREF_P(expr_ptr))) {
    7921             :                                 zend_refcounted *ref = Z_COUNTED_P(expr_ptr);
    7922             : 
    7923             :                                 expr_ptr = Z_REFVAL_P(expr_ptr);
    7924             :                                 if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    7925             :                                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    7926             :                                         expr_ptr = &new_expr;
    7927             :                                         efree_size(ref, sizeof(zend_reference));
    7928             :                                 } else if (Z_OPT_REFCOUNTED_P(expr_ptr)) {
    7929             :                                         Z_ADDREF_P(expr_ptr);
    7930             :                                 }
    7931             :                         }
    7932             :                 }
    7933             :         }
    7934             : 
    7935       13691 :         if (IS_UNUSED != IS_UNUSED) {
    7936             : 
    7937             :                 zval *offset = NULL;
    7938             :                 zend_string *str;
    7939             :                 zend_ulong hval;
    7940             : 
    7941             : add_again:
    7942             :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    7943             :                         str = Z_STR_P(offset);
    7944             :                         if (IS_UNUSED != IS_CONST) {
    7945             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    7946             :                                         goto num_index;
    7947             :                                 }
    7948             :                         }
    7949             : str_index:
    7950             :                         zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    7951             :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    7952             :                         hval = Z_LVAL_P(offset);
    7953             : num_index:
    7954             :                         zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    7955             :                 } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
    7956             :                         offset = Z_REFVAL_P(offset);
    7957             :                         goto add_again;
    7958             :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    7959             :                         str = STR_EMPTY_ALLOC();
    7960             :                         goto str_index;
    7961             :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    7962             :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7963             :                         goto num_index;
    7964             :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    7965             :                         hval = 0;
    7966             :                         goto num_index;
    7967             :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    7968             :                         hval = 1;
    7969             :                         goto num_index;
    7970             :                 } else if (IS_UNUSED == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    7971             :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    7972             :                         str = STR_EMPTY_ALLOC();
    7973             :                         goto str_index;
    7974             :                 } else {
    7975             :                         zend_error(E_WARNING, "Illegal offset type");
    7976             :                         zval_ptr_dtor(expr_ptr);
    7977             :                 }
    7978             : 
    7979             :         } else {
    7980       13691 :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    7981             :         }
    7982             :         CHECK_EXCEPTION();
    7983       13691 :         ZEND_VM_NEXT_OPCODE();
    7984             : }
    7985             : 
    7986        1171 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7987             : {
    7988             :         zval *array;
    7989             :         uint32_t size;
    7990        1171 :         USE_OPLINE
    7991             : 
    7992        1171 :         array = EX_VAR(opline->result.var);
    7993             :         if (IS_CONST != IS_UNUSED) {
    7994        1171 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    7995             :         } else {
    7996             :                 size = 0;
    7997             :         }
    7998        1171 :         ZVAL_NEW_ARR(array);
    7999        1171 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    8000             : 
    8001             :         if (IS_CONST != IS_UNUSED) {
    8002             :                 /* Explicitly initialize array as not-packed if flag is set */
    8003        1171 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    8004          12 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    8005             :                 }
    8006             :         }
    8007             : 
    8008        1171 :         if (IS_CONST == IS_UNUSED) {
    8009             :                 ZEND_VM_NEXT_OPCODE();
    8010             : #if 0 || (IS_CONST != IS_UNUSED)
    8011             :         } else {
    8012        1171 :                 ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    8013             : #endif
    8014             :         }
    8015             : }
    8016             : 
    8017           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8018             : {
    8019           5 :         USE_OPLINE
    8020             :         zval tmp, *varname;
    8021             :         HashTable *target_symbol_table;
    8022             : 
    8023             : 
    8024             :         SAVE_OPLINE();
    8025           5 :         if (IS_CONST == IS_CV &&
    8026             :             IS_UNUSED == IS_UNUSED &&
    8027             :             (opline->extended_value & ZEND_QUICK_SET)) {
    8028             :                 zval *var = EX_VAR(opline->op1.var);
    8029             : 
    8030             :                 if (Z_REFCOUNTED_P(var)) {
    8031             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    8032             : 
    8033             :                         if (!--GC_REFCOUNT(garbage)) {
    8034             :                                 ZVAL_UNDEF(var);
    8035             :                                 zval_dtor_func_for_ptr(garbage);
    8036             :                         } else {
    8037             :                                 GC_ZVAL_CHECK_POSSIBLE_ROOT(var);
    8038             :                                 ZVAL_UNDEF(var);
    8039             :                         }
    8040             :                 } else {
    8041             :                         ZVAL_UNDEF(var);
    8042             :                 }
    8043             :                 CHECK_EXCEPTION();
    8044             :                 ZEND_VM_NEXT_OPCODE();
    8045             :         }
    8046             : 
    8047           5 :         varname = EX_CONSTANT(opline->op1);
    8048             : 
    8049           5 :         ZVAL_UNDEF(&tmp);
    8050           5 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    8051             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    8052             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    8053             :                 }
    8054             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    8055             :                 varname = &tmp;
    8056             :         }
    8057             : 
    8058           5 :         if (IS_UNUSED != IS_UNUSED) {
    8059             :                 zend_class_entry *ce;
    8060             : 
    8061             :                 if (IS_UNUSED == IS_CONST) {
    8062             :                         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    8063             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    8064             :                         } else {
    8065             :                                 ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    8066             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    8067             :                                         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    8068             :                                                 zend_string_release(Z_STR(tmp));
    8069             :                                         }
    8070             : 
    8071             :                                         HANDLE_EXCEPTION();
    8072             :                                 }
    8073             :                                 if (UNEXPECTED(ce == NULL)) {
    8074             :                                         zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    8075             :                                         if (IS_CONST != IS_CONST) {
    8076             :                                                 zend_string_release(Z_STR(tmp));
    8077             :                                         }
    8078             :                                         HANDLE_EXCEPTION();
    8079             :                                 }
    8080             :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    8081             :                         }
    8082             :                 } else {
    8083             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    8084             :                 }
    8085             :                 zend_std_unset_static_property(ce, Z_STR_P(varname));
    8086             :         } else {
    8087          10 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    8088           5 :                 zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    8089             :         }
    8090             : 
    8091           5 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    8092             :                 zend_string_release(Z_STR(tmp));
    8093             :         }
    8094             : 
    8095             :         CHECK_EXCEPTION();
    8096           5 :         ZEND_VM_NEXT_OPCODE();
    8097             : }
    8098             : 
    8099          11 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8100             : {
    8101          11 :         USE_OPLINE
    8102             :         zval *value;
    8103             :         int result;
    8104             : 
    8105          11 :         if (IS_CONST == IS_CV &&
    8106             :             IS_UNUSED == IS_UNUSED &&
    8107             :             (opline->extended_value & ZEND_QUICK_SET)) {
    8108             :                 value = EX_VAR(opline->op1.var);
    8109             :                 if (opline->extended_value & ZEND_ISSET) {
    8110             :                         result =
    8111             :                                 Z_TYPE_P(value) > IS_NULL &&
    8112             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    8113             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8114             :                         SAVE_OPLINE();
    8115             :                         result = !i_zend_is_true(value);
    8116             :                         if (UNEXPECTED(EG(exception))) {
    8117             :                                 HANDLE_EXCEPTION();
    8118             :                         }
    8119             :                 }
    8120             :                 ZEND_VM_SMART_BRANCH(result, 0);
    8121             :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8122             :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    8123             :                 ZEND_VM_CONTINUE();
    8124             :         } else {
    8125             : 
    8126             :                 zval tmp, *varname;
    8127             : 
    8128             :                 SAVE_OPLINE();
    8129          11 :                 varname = EX_CONSTANT(opline->op1);
    8130          11 :                 ZVAL_UNDEF(&tmp);
    8131          11 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    8132             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    8133             :                         varname = &tmp;
    8134             :                 }
    8135             : 
    8136          11 :                 if (IS_UNUSED != IS_UNUSED) {
    8137             :                         zend_class_entry *ce;
    8138             : 
    8139             :                         if (IS_UNUSED == IS_CONST) {
    8140             :                                 if (IS_CONST == IS_CONST && CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    8141             : 
    8142             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    8143             :                                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    8144             : 
    8145             :                                         /* check if static properties were destoyed */
    8146             :                                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    8147             :                                                 value = NULL;
    8148             :                                         }
    8149             : 
    8150             :                                         goto is_var_return;
    8151             :                                 } else if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    8152             :                                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    8153             :                                 } else {
    8154             :                                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION);
    8155             :                                         if (UNEXPECTED(ce == NULL)) {
    8156             :                                                 CHECK_EXCEPTION();
    8157             :                                                 ZEND_VM_NEXT_OPCODE();
    8158             :                                         }
    8159             :                                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    8160             :                                 }
    8161             :                         } else {
    8162             :                                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    8163             :                                 if (IS_CONST == IS_CONST &&
    8164             :                                     (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    8165             : 
    8166             :                                         /* check if static properties were destoyed */
    8167             :                                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    8168             :                                                 value = NULL;
    8169             :                                         }
    8170             : 
    8171             :                                         goto is_var_return;
    8172             :                                 }
    8173             :                         }
    8174             : 
    8175             :                         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
    8176             : 
    8177             :                         if (IS_CONST == IS_CONST && value) {
    8178             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
    8179             :                         }
    8180             :                 } else {
    8181          22 :                         HashTable *target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    8182          22 :                         value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    8183             :                 }
    8184             : 
    8185          11 :                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    8186             :                         zend_string_release(Z_STR(tmp));
    8187             :                 }
    8188             : 
    8189             : is_var_return:
    8190          11 :                 if (opline->extended_value & ZEND_ISSET) {
    8191          23 :                         result = value && Z_TYPE_P(value) > IS_NULL &&
    8192           2 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    8193             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8194           8 :                         result = !value || !i_zend_is_true(value);
    8195             :                 }
    8196             : 
    8197          11 :                 ZEND_VM_SMART_BRANCH(result, 1);
    8198          10 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8199             :                 CHECK_EXCEPTION();
    8200          10 :                 ZEND_VM_NEXT_OPCODE();
    8201             :         }
    8202             : }
    8203             : 
    8204         398 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8205             : {
    8206         398 :         USE_OPLINE
    8207             :         zval *zfunc;
    8208             : 
    8209             :         SAVE_OPLINE();
    8210             : 
    8211         398 :         zfunc = zend_hash_find(EG(function_table), Z_STR_P(EX_CONSTANT(opline->op1)));
    8212             :         ZEND_ASSERT(zfunc != NULL && Z_FUNC_P(zfunc)->type == ZEND_USER_FUNCTION);
    8213             : 
    8214         421 :         if (UNEXPECTED((Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC) ||
    8215             :                                 (EX(func)->common.fn_flags & ZEND_ACC_STATIC))) {
    8216          23 :                 zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
    8217             :                         EG(scope), EX(called_scope), NULL);
    8218             :         } else {
    8219         375 :                 zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
    8220         375 :                         EG(scope), EX(called_scope), Z_OBJ(EX(This)) ? &EX(This) : NULL);
    8221             :         }
    8222             : 
    8223             :         CHECK_EXCEPTION();
    8224         398 :         ZEND_VM_NEXT_OPCODE();
    8225             : }
    8226             : 
    8227          54 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8228             : {
    8229          54 :         USE_OPLINE
    8230             : 
    8231          54 :         zend_generator *generator = zend_get_running_generator(execute_data);
    8232             : 
    8233             :         SAVE_OPLINE();
    8234          54 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    8235           0 :                 zend_error(E_EXCEPTION | E_ERROR, "Cannot yield from finally in a force-closed generator");
    8236             : 
    8237             : 
    8238           0 :                 HANDLE_EXCEPTION();
    8239             :         }
    8240             : 
    8241             :         /* Destroy the previously yielded value */
    8242          54 :         zval_ptr_dtor(&generator->value);
    8243             : 
    8244             :         /* Destroy the previously yielded key */
    8245          54 :         zval_ptr_dtor(&generator->key);
    8246             : 
    8247             :         /* Set the new yielded value */
    8248             :         if (IS_CONST != IS_UNUSED) {
    8249             : 
    8250             : 
    8251          54 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    8252             :                         /* Constants and temporary variables aren't yieldable by reference,
    8253             :                          * but we still allow them with a notice. */
    8254             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    8255             :                                 zval *value;
    8256             : 
    8257           1 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8258             : 
    8259           1 :                                 value = EX_CONSTANT(opline->op1);
    8260           1 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8261           1 :                                 if (IS_CONST != IS_CONST) {
    8262             :                                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    8263             :                                                 zval_copy_ctor_func(&generator->value);
    8264             :                                         }
    8265             :                                 }
    8266             :                         } else {
    8267             :                                 zval *value_ptr = NULL;
    8268             : 
    8269             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    8270             :                                         zend_error(E_EXCEPTION | E_ERROR, "Cannot yield string offsets by reference");
    8271             : 
    8272             :                                         HANDLE_EXCEPTION();
    8273             :                                 }
    8274             : 
    8275             :                                 /* If a function call result is yielded and the function did
    8276             :                                  * not return by reference we throw a notice. */
    8277             :                                 if (IS_CONST == IS_VAR &&
    8278             :                                     (value_ptr == &EG(uninitialized_zval) ||
    8279             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    8280             :                                       !(Z_VAR_FLAGS_P(value_ptr) & IS_VAR_RET_REF)))) {
    8281             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8282             :                                 } else {
    8283             :                                         ZVAL_MAKE_REF(value_ptr);
    8284             :                                 }
    8285             :                                 ZVAL_COPY(&generator->value, value_ptr);
    8286             : 
    8287             :                         }
    8288             :                 } else {
    8289          53 :                         zval *value = EX_CONSTANT(opline->op1);
    8290             : 
    8291             :                         /* Consts, temporary variables and references need copying */
    8292             :                         if (IS_CONST == IS_CONST) {
    8293          53 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8294          53 :                                 if (UNEXPECTED(Z_OPT_COPYABLE(generator->value))) {
    8295           0 :                                         zval_copy_ctor_func(&generator->value);
    8296             :                                 }
    8297             :                         } else if (IS_CONST == IS_TMP_VAR) {
    8298             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8299             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    8300             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    8301             : 
    8302             :                         } else {
    8303             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8304             :                                 if (IS_CONST == IS_CV) {
    8305             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    8306             :                                 }
    8307             :                         }
    8308             :                 }
    8309             :         } else {
    8310             :                 /* If no value was specified yield null */
    8311             :                 ZVAL_NULL(&generator->value);
    8312             :         }
    8313             : 
    8314             :         /* Set the new yielded key */
    8315          54 :         if (IS_UNUSED != IS_UNUSED) {
    8316             : 
    8317             :                 zval *key = NULL;
    8318             : 
    8319             :                 /* Consts, temporary variables and references need copying */
    8320             :                 if (IS_UNUSED == IS_CONST) {
    8321             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8322             :                         if (UNEXPECTED(Z_OPT_COPYABLE(generator->key))) {
    8323             :                                 zval_copy_ctor_func(&generator->key);
    8324             :                         }
    8325             :                 } else if (IS_UNUSED == IS_TMP_VAR) {
    8326             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8327             :                 } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    8328             :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    8329             : 
    8330             :                 } else {
    8331             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8332             :                         if (IS_UNUSED == IS_CV) {
    8333             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    8334             :                         }
    8335             :                 }
    8336             : 
    8337             :                 if (Z_TYPE(generator->key) == IS_LONG
    8338             :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    8339             :                 ) {
    8340             :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    8341             :                 }
    8342             :         } else {
    8343             :                 /* If no key was specified we use auto-increment keys */
    8344          54 :                 generator->largest_used_integer_key++;
    8345          54 :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    8346             :         }
    8347             : 
    8348          54 :         if (RETURN_VALUE_USED(opline)) {
    8349             :                 /* If the return value of yield is used set the send
    8350             :                  * target and initialize it to NULL */
    8351           7 :                 generator->send_target = EX_VAR(opline->result.var);
    8352           7 :                 ZVAL_NULL(generator->send_target);
    8353             :         } else {
    8354          47 :                 generator->send_target = NULL;
    8355             :         }
    8356             : 
    8357             :         /* We increment to the next op, so we are at the correct position when the
    8358             :          * generator is resumed. */
    8359          54 :         ZEND_VM_INC_OPCODE();
    8360             : 
    8361             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    8362             :          * variable in execute_data so we don't resume at an old position. */
    8363             :         SAVE_OPLINE();
    8364             : 
    8365          54 :         ZEND_VM_RETURN();
    8366             : }
    8367             : 
    8368          70 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8369             : {
    8370          70 :         USE_OPLINE
    8371             : 
    8372             :         zval *op1, *op2, *result;
    8373             : 
    8374          70 :         op1 = EX_CONSTANT(opline->op1);
    8375         140 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8376          70 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8377          70 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8378          38 :                         result = EX_VAR(opline->result.var);
    8379             :                         fast_long_add_function(result, op1, op2);
    8380          38 :                         ZEND_VM_NEXT_OPCODE();
    8381          32 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8382          30 :                         result = EX_VAR(opline->result.var);
    8383          30 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2));
    8384          30 :                         ZEND_VM_NEXT_OPCODE();
    8385             :                 }
    8386           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8387           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8388           0 :                         result = EX_VAR(opline->result.var);
    8389           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
    8390           0 :                         ZEND_VM_NEXT_OPCODE();
    8391           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8392           0 :                         result = EX_VAR(opline->result.var);
    8393           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2)));
    8394           0 :                         ZEND_VM_NEXT_OPCODE();
    8395             :                 }
    8396             :         }
    8397             : 
    8398             :         SAVE_OPLINE();
    8399           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8400             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8401             :         }
    8402           2 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8403           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8404             :         }
    8405           2 :         add_function(EX_VAR(opline->result.var), op1, op2);
    8406             : 
    8407             : 
    8408             :         CHECK_EXCEPTION();
    8409           2 :         ZEND_VM_NEXT_OPCODE();
    8410             : }
    8411             : 
    8412         116 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8413             : {
    8414         116 :         USE_OPLINE
    8415             : 
    8416             :         zval *op1, *op2, *result;
    8417             : 
    8418         116 :         op1 = EX_CONSTANT(opline->op1);
    8419         232 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8420         116 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8421         116 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8422          97 :                         result = EX_VAR(opline->result.var);
    8423             :                         fast_long_sub_function(result, op1, op2);
    8424          97 :                         ZEND_VM_NEXT_OPCODE();
    8425          19 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8426           2 :                         result = EX_VAR(opline->result.var);
    8427           2 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2));
    8428           2 :                         ZEND_VM_NEXT_OPCODE();
    8429             :                 }
    8430           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8431           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8432           0 :                         result = EX_VAR(opline->result.var);
    8433           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
    8434           0 :                         ZEND_VM_NEXT_OPCODE();
    8435           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8436           0 :                         result = EX_VAR(opline->result.var);
    8437           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2)));
    8438           0 :                         ZEND_VM_NEXT_OPCODE();
    8439             :                 }
    8440             :         }
    8441             : 
    8442             :         SAVE_OPLINE();
    8443          17 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8444             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8445             :         }
    8446          17 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8447           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8448             :         }
    8449          17 :         sub_function(EX_VAR(opline->result.var), op1, op2);
    8450             : 
    8451             : 
    8452             :         CHECK_EXCEPTION();
    8453          17 :         ZEND_VM_NEXT_OPCODE();
    8454             : }
    8455             : 
    8456        2116 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8457             : {
    8458        2116 :         USE_OPLINE
    8459             : 
    8460             :         zval *op1, *op2, *result;
    8461             : 
    8462        2116 :         op1 = EX_CONSTANT(opline->op1);
    8463        4232 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8464        2116 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8465        2109 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8466             :                         zend_long overflow;
    8467             : 
    8468        2108 :                         result = EX_VAR(opline->result.var);
    8469        2108 :                         ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
    8470        2108 :                         Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
    8471        2108 :                         ZEND_VM_NEXT_OPCODE();
    8472           1 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8473           0 :                         result = EX_VAR(opline->result.var);
    8474           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2));
    8475           0 :                         ZEND_VM_NEXT_OPCODE();
    8476             :                 }
    8477           7 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8478           7 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8479           0 :                         result = EX_VAR(opline->result.var);
    8480           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
    8481           0 :                         ZEND_VM_NEXT_OPCODE();
    8482           7 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8483           7 :                         result = EX_VAR(opline->result.var);
    8484           7 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2)));
    8485           7 :                         ZEND_VM_NEXT_OPCODE();
    8486             :                 }
    8487             :         }
    8488             : 
    8489             :         SAVE_OPLINE();
    8490           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8491             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8492             :         }
    8493           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8494           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8495             :         }
    8496           1 :         mul_function(EX_VAR(opline->result.var), op1, op2);
    8497             : 
    8498             : 
    8499             :         CHECK_EXCEPTION();
    8500           1 :         ZEND_VM_NEXT_OPCODE();
    8501             : }
    8502             : 
    8503           3 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8504             : {
    8505           3 :         USE_OPLINE
    8506             : 
    8507             :         zval *op1, *op2;
    8508             : 
    8509             :         SAVE_OPLINE();
    8510           3 :         op1 = EX_CONSTANT(opline->op1);
    8511           6 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8512           3 :         fast_div_function(EX_VAR(opline->result.var), op1, op2);
    8513             : 
    8514             : 
    8515             :         CHECK_EXCEPTION();
    8516           3 :         ZEND_VM_NEXT_OPCODE();
    8517             : }
    8518             : 
    8519           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8520             : {
    8521           1 :         USE_OPLINE
    8522             : 
    8523             :         zval *op1, *op2, *result;
    8524             : 
    8525           1 :         op1 = EX_CONSTANT(opline->op1);
    8526           2 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8527           1 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8528           1 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8529           0 :                         result = EX_VAR(opline->result.var);
    8530           0 :                         if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
    8531             :                                 SAVE_OPLINE();
    8532           0 :                                 zend_throw_exception_ex(NULL, 0, "Division by zero");
    8533           0 :                                 HANDLE_EXCEPTION();
    8534           0 :                         } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
    8535             :                                 /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
    8536           0 :                                 ZVAL_LONG(result, 0);
    8537             :                         } else {
    8538           0 :                                 ZVAL_LONG(result, Z_LVAL_P(op1) % Z_LVAL_P(op2));
    8539             :                         }
    8540           0 :                         ZEND_VM_NEXT_OPCODE();
    8541             :                 }
    8542             :         }
    8543             : 
    8544             :         SAVE_OPLINE();
    8545           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8546             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8547             :         }
    8548           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8549           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8550             :         }
    8551           1 :         mod_function(EX_VAR(opline->result.var), op1, op2);
    8552             : 
    8553             : 
    8554             :         CHECK_EXCEPTION();
    8555           1 :         ZEND_VM_NEXT_OPCODE();
    8556             : }
    8557             : 
    8558         172 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8559             : {
    8560         172 :         USE_OPLINE
    8561             : 
    8562             :         zval *op1, *op2;
    8563             : 
    8564             :         SAVE_OPLINE();
    8565         172 :         op1 = EX_CONSTANT(opline->op1);
    8566         344 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8567         172 :         shift_left_function(EX_VAR(opline->result.var), op1, op2);
    8568             : 
    8569             : 
    8570             :         CHECK_EXCEPTION();
    8571         172 :         ZEND_VM_NEXT_OPCODE();
    8572             : }
    8573             : 
    8574           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8575             : {
    8576           0 :         USE_OPLINE
    8577             : 
    8578             :         zval *op1, *op2;
    8579             : 
    8580             :         SAVE_OPLINE();
    8581           0 :         op1 = EX_CONSTANT(opline->op1);
    8582           0 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8583           0 :         shift_right_function(EX_VAR(opline->result.var), op1, op2);
    8584             : 
    8585             : 
    8586             :         CHECK_EXCEPTION();
    8587           0 :         ZEND_VM_NEXT_OPCODE();
    8588             : }
    8589             : 
    8590      239478 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8591             : {
    8592      239478 :         USE_OPLINE
    8593             : 
    8594             :         zval *op1, *op2;
    8595             : 
    8596             :         SAVE_OPLINE();
    8597      239478 :         op1 = EX_CONSTANT(opline->op1);
    8598      478956 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8599             : 
    8600             :         do {
    8601      239478 :                 if ((IS_CONST == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) &&
    8602             :                     (IS_CV == IS_CONST || EXPECTED(Z_TYPE_P(op2) == IS_STRING))) {
    8603      227168 :                         zend_string *op1_str = Z_STR_P(op1);
    8604      227168 :                         zend_string *op2_str = Z_STR_P(op2);
    8605             :                         zend_string *str;
    8606             : 
    8607      227168 :                         if (IS_CONST != IS_CONST) {
    8608             :                                 if (UNEXPECTED(op1_str->len == 0)) {
    8609             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op2_str);
    8610             : 
    8611             :                                         break;
    8612             :                                 }
    8613             :                         }
    8614             :                         if (IS_CV != IS_CONST) {
    8615      227168 :                                 if (UNEXPECTED(op2_str->len == 0)) {
    8616        8745 :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op1_str);
    8617             : 
    8618        8745 :                                         break;
    8619             :                                 }
    8620             :                         }
    8621      218423 :                         if (IS_CONST != IS_CONST && IS_CONST != IS_CV &&
    8622             :                             !IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
    8623             :                             size_t len = op1_str->len;
    8624             : 
    8625             :                                 str = zend_string_realloc(op1_str, len + op2_str->len, 0);
    8626             :                                 memcpy(str->val + len, op2_str->val, op2_str->len+1);
    8627             :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    8628             :                                 break;
    8629             :                         } else {
    8630      436846 :                                 str = zend_string_alloc(op1_str->len + op2_str->len, 0);
    8631      218423 :                                 memcpy(str->val, op1_str->val, op1_str->len);
    8632      218423 :                                 memcpy(str->val + op1_str->len, op2_str->val, op2_str->len+1);
    8633      218423 :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    8634             :                         }
    8635             :                 } else {
    8636       12310 :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    8637             :                                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8638             :                         }
    8639       12310 :                         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    8640           0 :                                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8641             :                         }
    8642       12310 :                         concat_function(EX_VAR(opline->result.var), op1, op2);
    8643             :                 }
    8644             : 
    8645             :         } while (0);
    8646             : 
    8647             :         CHECK_EXCEPTION();
    8648      239478 :         ZEND_VM_NEXT_OPCODE();
    8649             : }
    8650             : 
    8651          60 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8652             : {
    8653          60 :         USE_OPLINE
    8654             : 
    8655             :         zval *op1, *op2;
    8656             :         int result;
    8657             : 
    8658             :         SAVE_OPLINE();
    8659          60 :         op1 = EX_CONSTANT(opline->op1);
    8660         120 :         op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
    8661          60 :         result = fast_is_identical_function(op1, op2);
    8662             : 
    8663             : 
    8664          60 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
    8665          16 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8666             :         if ((IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
    8667             :                 CHECK_EXCEPTION();
    8668             :         }
    8669          16 :         ZEND_VM_NEXT_OPCODE();
    8670             : }
    8671             : 
    8672         133 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8673             : {
    8674         133 :         USE_OPLINE
    8675             : 
    8676             :         zval *op1, *op2;
    8677             :         int result;
    8678             : 
    8679             :         SAVE_OPLINE();
    8680         133 :         op1 = EX_CONSTANT(opline->op1);
    8681         266 :         op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
    8682         133 :         result = fast_is_not_identical_function(op1, op2);
    8683             : 
    8684             : 
    8685         133 :         ZEND_VM_SMART_BRANCH(result, (IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR));
    8686          10 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8687             :         if ((IS_CONST|IS_CV) & (IS_VAR|IS_TMP_VAR)) {
    8688             :                 CHECK_EXCEPTION();
    8689             :         }
    8690          10 :         ZEND_VM_NEXT_OPCODE();
    8691             : }
    8692             : 
    8693        2799 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8694             : {
    8695        2799 :         USE_OPLINE
    8696             : 
    8697             :         zval *op1, *op2, *result;
    8698             : 
    8699        2799 :         op1 = EX_CONSTANT(opline->op1);
    8700        5598 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8701             :         do {
    8702             :                 int result;
    8703             : 
    8704        2799 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    8705        2785 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8706        2785 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    8707           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8708           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    8709             :                         } else {
    8710           0 :                                 break;
    8711             :                         }
    8712          14 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    8713           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8714           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    8715           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8716           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    8717             :                         } else {
    8718           0 :                                 break;
    8719             :                         }
    8720          14 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    8721          14 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    8722          13 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    8723           2 :                                         result = 1;
    8724          21 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    8725          10 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    8726           9 :                                                 result = 0;
    8727             :                                         } else {
    8728           1 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    8729             :                                         }
    8730             :                                 } else {
    8731           1 :                                         result = (zendi_smart_strcmp(op1, op2) == 0);
    8732             :                                 }
    8733             : 
    8734             : 
    8735             :                         } else {
    8736           1 :                                 break;
    8737             :                         }
    8738             :                 } else {
    8739           0 :                         break;
    8740             :                 }
    8741        2798 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8742           6 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8743           6 :                 ZEND_VM_NEXT_OPCODE();
    8744             :         } while (0);
    8745             : 
    8746             :         SAVE_OPLINE();
    8747           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    8748             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8749             :         }
    8750           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    8751           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8752             :         }
    8753           1 :         result = EX_VAR(opline->result.var);
    8754           1 :         compare_function(result, op1, op2);
    8755           1 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    8756             : 
    8757             : 
    8758             :         CHECK_EXCEPTION();
    8759           1 :         ZEND_VM_NEXT_OPCODE();
    8760             : }
    8761             : 
    8762         138 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8763             : {
    8764         138 :         USE_OPLINE
    8765             : 
    8766             :         zval *op1, *op2, *result;
    8767             : 
    8768         138 :         op1 = EX_CONSTANT(opline->op1);
    8769         276 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8770             :         do {
    8771             :                 int result;
    8772             : 
    8773         138 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    8774          17 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8775           1 :                                 result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
    8776          16 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8777           0 :                                 result = ((double)Z_LVAL_P(op1) != Z_DVAL_P(op2));
    8778             :                         } else {
    8779          16 :                                 break;
    8780             :                         }
    8781         121 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    8782           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8783           0 :                                 result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
    8784           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8785           0 :                                 result = (Z_DVAL_P(op1) != ((double)Z_LVAL_P(op2)));
    8786             :                         } else {
    8787           0 :                                 break;
    8788             :                         }
    8789         121 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    8790         121 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    8791         119 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    8792           0 :                                         result = 0;
    8793         232 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    8794         113 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    8795           6 :                                                 result = 1;
    8796             :                                         } else {
    8797         107 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
    8798             :                                         }
    8799             :                                 } else {
    8800           6 :                                         result = (zendi_smart_strcmp(op1, op2) != 0);
    8801             :                                 }
    8802             : 
    8803             : 
    8804             :                         } else {
    8805           2 :                                 break;
    8806             :                         }
    8807             :                 } else {
    8808           0 :                         break;
    8809             :                 }
    8810         120 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8811           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8812           0 :                 ZEND_VM_NEXT_OPCODE();
    8813             :         } while (0);
    8814             : 
    8815             :         SAVE_OPLINE();
    8816          18 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    8817             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8818             :         }
    8819          18 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    8820           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8821             :         }
    8822          18 :         result = EX_VAR(opline->result.var);
    8823          18 :         compare_function(result, op1, op2);
    8824          18 :         ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
    8825             : 
    8826             : 
    8827             :         CHECK_EXCEPTION();
    8828          18 :         ZEND_VM_NEXT_OPCODE();
    8829             : }
    8830             : 
    8831     1025831 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8832             : {
    8833     1025831 :         USE_OPLINE
    8834             : 
    8835             :         zval *op1, *op2, *result;
    8836             : 
    8837     1025831 :         op1 = EX_CONSTANT(opline->op1);
    8838     2051662 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8839             :         do {
    8840             :                 int result;
    8841             : 
    8842     1025831 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8843     1025830 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8844      989471 :                                 result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
    8845       36359 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8846         281 :                                 result = ((double)Z_LVAL_P(op1) < Z_DVAL_P(op2));
    8847             :                         } else {
    8848       36078 :                                 break;
    8849             :                         }
    8850           1 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8851           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8852           0 :                                 result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
    8853           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8854           0 :                                 result = (Z_DVAL_P(op1) < ((double)Z_LVAL_P(op2)));
    8855             :                         } else {
    8856           0 :                                 break;
    8857             :                         }
    8858             :                 } else {
    8859           1 :                         break;
    8860             :                 }
    8861      989752 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8862       14658 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8863       14658 :                 ZEND_VM_NEXT_OPCODE();
    8864             :         } while (0);
    8865             : 
    8866             :         SAVE_OPLINE();
    8867       36079 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8868             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8869             :         }
    8870       36079 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8871           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8872             :         }
    8873       36079 :         result = EX_VAR(opline->result.var);
    8874       36079 :         compare_function(result, op1, op2);
    8875       36079 :         ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
    8876             : 
    8877             : 
    8878             :         CHECK_EXCEPTION();
    8879       36079 :         ZEND_VM_NEXT_OPCODE();
    8880             : }
    8881             : 
    8882      158234 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8883             : {
    8884      158234 :         USE_OPLINE
    8885             : 
    8886             :         zval *op1, *op2, *result;
    8887             : 
    8888      158234 :         op1 = EX_CONSTANT(opline->op1);
    8889      316468 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8890             :         do {
    8891             :                 int result;
    8892             : 
    8893      158234 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8894      158234 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8895      157781 :                                 result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
    8896         453 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8897         452 :                                 result = ((double)Z_LVAL_P(op1) <= Z_DVAL_P(op2));
    8898             :                         } else {
    8899           1 :                                 break;
    8900             :                         }
    8901           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8902           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8903           0 :                                 result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
    8904           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8905           0 :                                 result = (Z_DVAL_P(op1) <= ((double)Z_LVAL_P(op2)));
    8906             :                         } else {
    8907           0 :                                 break;
    8908             :                         }
    8909             :                 } else {
    8910           0 :                         break;
    8911             :                 }
    8912      158233 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8913      134790 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8914      134790 :                 ZEND_VM_NEXT_OPCODE();
    8915             :         } while (0);
    8916             : 
    8917             :         SAVE_OPLINE();
    8918           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8919             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8920             :         }
    8921           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8922           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8923             :         }
    8924           1 :         result = EX_VAR(opline->result.var);
    8925           1 :         compare_function(result, op1, op2);
    8926           1 :         ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
    8927             : 
    8928             : 
    8929             :         CHECK_EXCEPTION();
    8930           1 :         ZEND_VM_NEXT_OPCODE();
    8931             : }
    8932             : 
    8933           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8934             : {
    8935           0 :         USE_OPLINE
    8936             : 
    8937             :         zval *op1, *op2;
    8938             : 
    8939             :         SAVE_OPLINE();
    8940           0 :         op1 = EX_CONSTANT(opline->op1);
    8941           0 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8942           0 :         compare_function(EX_VAR(opline->result.var), op1, op2);
    8943             : 
    8944             : 
    8945             :         CHECK_EXCEPTION();
    8946           0 :         ZEND_VM_NEXT_OPCODE();
    8947             : }
    8948             : 
    8949           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8950             : {
    8951           1 :         USE_OPLINE
    8952             : 
    8953             :         zval *op1, *op2;
    8954             : 
    8955             :         SAVE_OPLINE();
    8956           1 :         op1 = EX_CONSTANT(opline->op1);
    8957           2 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8958           1 :         bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
    8959             : 
    8960             : 
    8961             :         CHECK_EXCEPTION();
    8962           1 :         ZEND_VM_NEXT_OPCODE();
    8963             : }
    8964             : 
    8965           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8966             : {
    8967           1 :         USE_OPLINE
    8968             : 
    8969             :         zval *op1, *op2;
    8970             : 
    8971             :         SAVE_OPLINE();
    8972           1 :         op1 = EX_CONSTANT(opline->op1);
    8973           2 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8974           1 :         bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
    8975             : 
    8976             : 
    8977             :         CHECK_EXCEPTION();
    8978           1 :         ZEND_VM_NEXT_OPCODE();
    8979             : }
    8980             : 
    8981           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8982             : {
    8983           1 :         USE_OPLINE
    8984             : 
    8985             :         zval *op1, *op2;
    8986             : 
    8987             :         SAVE_OPLINE();
    8988           1 :         op1 = EX_CONSTANT(opline->op1);
    8989           2 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8990           1 :         bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
    8991             : 
    8992             : 
    8993             :         CHECK_EXCEPTION();
    8994           1 :         ZEND_VM_NEXT_OPCODE();
    8995             : }
    8996             : 
    8997           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8998             : {
    8999           0 :         USE_OPLINE
    9000             : 
    9001             :         zval *op1, *op2;
    9002             : 
    9003             :         SAVE_OPLINE();
    9004           0 :         op1 = EX_CONSTANT(opline->op1);
    9005           0 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9006           0 :         boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
    9007             : 
    9008             : 
    9009             :         CHECK_EXCEPTION();
    9010           0 :         ZEND_VM_NEXT_OPCODE();
    9011             : }
    9012             : 
    9013           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9014             : {
    9015           0 :         USE_OPLINE
    9016             : 
    9017             :         zval *container;
    9018             : 
    9019             :         SAVE_OPLINE();
    9020           0 :         container = EX_CONSTANT(opline->op1);
    9021           0 :         zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
    9022             : 
    9023             : 
    9024             :         CHECK_EXCEPTION();
    9025           0 :         ZEND_VM_NEXT_OPCODE();
    9026             : }
    9027             : 
    9028           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9029             : {
    9030           0 :         USE_OPLINE
    9031             : 
    9032             :         zval *container;
    9033             : 
    9034             :         SAVE_OPLINE();
    9035           0 :         container = EX_CONSTANT(opline->op1);
    9036           0 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
    9037             : 
    9038             : 
    9039             :         CHECK_EXCEPTION();
    9040           0 :         ZEND_VM_NEXT_OPCODE();
    9041             : }
    9042             : 
    9043           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9044             : {
    9045           0 :         USE_OPLINE
    9046             :         zval *container;
    9047             :         zend_free_op free_op1;
    9048             : 
    9049             :         SAVE_OPLINE();
    9050             : 
    9051           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    9052             :         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    9053           0 :             zend_error(E_EXCEPTION | E_ERROR, "Cannot use temporary expression in write context");
    9054             : 
    9055             : 
    9056           0 :                         HANDLE_EXCEPTION();
    9057             :         }
    9058             :                 container = NULL;
    9059             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    9060             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use string offset as an array");
    9061             : 
    9062             :                         HANDLE_EXCEPTION();
    9063             :                 }
    9064             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
    9065             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    9066             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    9067             :                 }
    9068             : 
    9069             : 
    9070             :         } else {
    9071           0 :                 if (IS_CV == IS_UNUSED) {
    9072             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use [] for reading");
    9073             : 
    9074             : 
    9075             :                         HANDLE_EXCEPTION();
    9076             :                 }
    9077           0 :                 container = EX_CONSTANT(opline->op1);
    9078           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var), IS_CV);
    9079             : 
    9080             : 
    9081             :         }
    9082             :         CHECK_EXCEPTION();
    9083           0 :         ZEND_VM_NEXT_OPCODE();
    9084             : }
    9085             : 
    9086           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9087             : {
    9088           0 :         USE_OPLINE
    9089             : 
    9090             :         zval *container;
    9091             : 
    9092             :         zval *offset;
    9093             : 
    9094             :         SAVE_OPLINE();
    9095           0 :         container = EX_CONSTANT(opline->op1);
    9096             : 
    9097           0 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    9098             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    9099             : 
    9100             :                 HANDLE_EXCEPTION();
    9101             :         }
    9102             : 
    9103           0 :         offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9104             : 
    9105             :         if (IS_CONST == IS_CONST ||
    9106             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    9107           0 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    9108             :                         container = Z_REFVAL_P(container);
    9109             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    9110             :                                 goto fetch_obj_r_no_object;
    9111             :                         }
    9112             :                 } else {
    9113           0 :                         goto fetch_obj_r_no_object;
    9114             :                 }
    9115             :         }
    9116             : 
    9117             :         /* here we are sure we are dealing with an object */
    9118             :         do {
    9119             :                 zend_object *zobj = Z_OBJ_P(container);
    9120             :                 zval *retval;
    9121             : 
    9122             :                 if (IS_CV == IS_CONST &&
    9123             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    9124             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    9125             : 
    9126             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    9127             :                                 retval = OBJ_PROP(zobj, prop_offset);
    9128             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    9129             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9130             :                                         break;
    9131             :                                 }
    9132             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    9133             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    9134             :                                 if (EXPECTED(retval)) {
    9135             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9136             :                                         break;
    9137             :                                 }
    9138             :                         }
    9139             :                 }
    9140             : 
    9141             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    9142             : fetch_obj_r_no_object:
    9143           0 :                         zend_error(E_NOTICE, "Trying to get property of non-object");
    9144           0 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    9145             :                 } else {
    9146             :                         retval = zobj->handlers->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var));
    9147             : 
    9148             :                         if (retval != EX_VAR(opline->result.var)) {
    9149             :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9150             :                         }
    9151             :                 }
    9152             :         } while (0);
    9153             : 
    9154             : 
    9155             :         CHECK_EXCEPTION();
    9156           0 :         ZEND_VM_NEXT_OPCODE();
    9157             : }
    9158             : 
    9159           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9160             : {
    9161           0 :         USE_OPLINE
    9162             : 
    9163             :         zval *container;
    9164             : 
    9165             :         zval *offset;
    9166             : 
    9167             :         SAVE_OPLINE();
    9168           0 :         container = EX_CONSTANT(opline->op1);
    9169             : 
    9170           0 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    9171             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    9172             : 
    9173             :                 HANDLE_EXCEPTION();
    9174             :         }
    9175             : 
    9176           0 :         offset  = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9177             : 
    9178             :         if (IS_CONST == IS_CONST ||
    9179             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    9180           0 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    9181             :                         container = Z_REFVAL_P(container);
    9182             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    9183             :                                 goto fetch_obj_is_no_object;
    9184             :                         }
    9185             :                 } else {
    9186           0 :                         goto fetch_obj_is_no_object;
    9187             :                 }
    9188             :         }
    9189             : 
    9190             :         /* here we are sure we are dealing with an object */
    9191             :         do {
    9192             :                 zend_object *zobj = Z_OBJ_P(container);
    9193             :                 zval *retval;
    9194             : 
    9195             :                 if (IS_CV == IS_CONST &&
    9196             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    9197             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    9198             : 
    9199             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    9200             :                                 retval = OBJ_PROP(zobj, prop_offset);
    9201             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    9202             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9203             :                                         break;
    9204             :                                 }
    9205             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    9206             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    9207             :                                 if (EXPECTED(retval)) {
    9208             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9209             :                                         break;
    9210             :                                 }
    9211             :                         }
    9212             :                 }
    9213             : 
    9214             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    9215             : fetch_obj_is_no_object:
    9216           0 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    9217             :                 } else {
    9218             : 
    9219             :                         retval = zobj->handlers->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var));
    9220             : 
    9221             :                         if (retval != EX_VAR(opline->result.var)) {
    9222             :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9223             :                         }
    9224             :                 }
    9225             :         } while (0);
    9226             : 
    9227             : 
    9228             :         CHECK_EXCEPTION();
    9229           0 :         ZEND_VM_NEXT_OPCODE();
    9230             : }
    9231             : 
    9232           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9233             : {
    9234           0 :         USE_OPLINE
    9235             :         zval *container;
    9236             : 
    9237           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    9238             :                 /* Behave like FETCH_OBJ_W */
    9239             :                 zend_free_op free_op1;
    9240             :                 zval *property;
    9241             : 
    9242             :                 SAVE_OPLINE();
    9243           0 :                 property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9244           0 :                 container = NULL;
    9245             : 
    9246           0 :                 if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(container) == NULL)) {
    9247             :                         zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    9248             : 
    9249             :                         HANDLE_EXCEPTION();
    9250             :                 }
    9251             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    9252           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use temporary expression in write context");
    9253             : 
    9254             : 
    9255           0 :                         HANDLE_EXCEPTION();
    9256             :                 }
    9257             :                 if (IS_CONST == IS_VAR && UNEXPECTED(container == NULL)) {
    9258             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot use string offset as an object");
    9259             : 
    9260             :                         HANDLE_EXCEPTION();
    9261             :                 }
    9262             :                 zend_fetch_property_address(EX_VAR(opline->result.var), container, IS_CONST, property, IS_CV, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), BP_VAR_W);
    9263             : 
    9264             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    9265             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    9266             :                 }
    9267             : 
    9268             :                 CHECK_EXCEPTION();
    9269             :                 ZEND_VM_NEXT_OPCODE();
    9270             :         } else {
    9271           0 :                 ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    9272             :         }
    9273             : }
    9274             : 
    9275        8979 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9276             : {
    9277        8979 :         USE_OPLINE
    9278             : 
    9279             :         zval *op1, *op2;
    9280             :         zend_string *op1_str, *op2_str, *str;
    9281             : 
    9282             :         SAVE_OPLINE();
    9283        8979 :         op1 = EX_CONSTANT(opline->op1);
    9284             :         if (IS_CONST == IS_CONST) {
    9285        8979 :                 op1_str = Z_STR_P(op1);
    9286             :         } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    9287             :                 op1_str = zend_string_copy(Z_STR_P(op1));
    9288             :         } else {
    9289             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    9290             :                         GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    9291             :                 }
    9292             :                 op1_str = _zval_get_string_func(op1);
    9293             :         }
    9294       17958 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9295        8979 :         if (IS_CV == IS_CONST) {
    9296             :                 op2_str = Z_STR_P(op2);
    9297        8979 :         } else if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    9298       10192 :                 op2_str = zend_string_copy(Z_STR_P(op2));
    9299             :         } else {
    9300        3883 :                 if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    9301           0 :                         GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    9302             :                 }
    9303        3883 :                 op2_str = _zval_get_string_func(op2);
    9304             :         }
    9305             :         do {
    9306        8979 :                 if (IS_CONST != IS_CONST) {
    9307             :                         if (UNEXPECTED(op1_str->len == 0)) {
    9308             :                                 if (IS_CV == IS_CONST) {
    9309             :                                         zend_string_addref(op2_str);
    9310             :                                 }
    9311             :                                 ZVAL_STR(EX_VAR(opline->result.var), op2_str);
    9312             :                                 zend_string_release(op1_str);
    9313             :                                 break;
    9314             :                         }
    9315             :                 }
    9316             :                 if (IS_CV != IS_CONST) {
    9317        8979 :                         if (UNEXPECTED(op2_str->len == 0)) {
    9318             :                                 if (IS_CONST == IS_CONST) {
    9319             :                                         zend_string_addref(op1_str);
    9320             :                                 }
    9321         229 :                                 ZVAL_STR(EX_VAR(opline->result.var), op1_str);
    9322             :                                 zend_string_release(op2_str);
    9323         229 :                                 break;
    9324             :                         }
    9325             :                 }
    9326       17500 :                 str = zend_string_alloc(op1_str->len + op2_str->len, 0);
    9327        8750 :                 memcpy(str->val, op1_str->val, op1_str->len);
    9328        8750 :                 memcpy(str->val + op1_str->len, op2_str->val, op2_str->len+1);
    9329        8750 :                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    9330        8750 :                 if (IS_CONST != IS_CONST) {
    9331             :                         zend_string_release(op1_str);
    9332             :                 }
    9333             :                 if (IS_CV != IS_CONST) {
    9334             :                         zend_string_release(op2_str);
    9335             :                 }
    9336             :         } while (0);
    9337             : 
    9338             : 
    9339             :         CHECK_EXCEPTION();
    9340        8979 :         ZEND_VM_NEXT_OPCODE();
    9341             : }
    9342             : 
    9343           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9344             : {
    9345           0 :         USE_OPLINE
    9346             :         zval *function_name;
    9347             : 
    9348             :         zval *object;
    9349             :         zend_function *fbc;
    9350             :         zend_class_entry *called_scope;
    9351             :         zend_object *obj;
    9352             :         zend_execute_data *call;
    9353             :         uint32_t call_info;
    9354             : 
    9355             :         SAVE_OPLINE();
    9356             : 
    9357           0 :         function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9358             : 
    9359           0 :         if (IS_CV != IS_CONST &&
    9360             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    9361             :                 do {
    9362           0 :                         if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(function_name)) {
    9363           0 :                                 function_name = Z_REFVAL_P(function_name);
    9364           0 :                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    9365           0 :                                         break;
    9366             :                                 }
    9367             :                         }
    9368           0 :                         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    9369           0 :                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    9370             :                         }
    9371           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    9372           0 :                                 HANDLE_EXCEPTION();
    9373             :                         }
    9374           0 :                         zend_error(E_EXCEPTION | E_ERROR, "Method name must be a string");
    9375             : 
    9376             : 
    9377           0 :                         HANDLE_EXCEPTION();
    9378             :                 } while (0);
    9379             :         }
    9380             : 
    9381           0 :         object = EX_CONSTANT(opline->op1);
    9382             : 
    9383           0 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_OBJ_P(object) == NULL)) {
    9384             :                 zend_error(E_EXCEPTION | E_ERROR, "Using $this when not in object context");
    9385             : 
    9386             :                 HANDLE_EXCEPTION();
    9387             :         }
    9388             : 
    9389             :         if (IS_CONST != IS_UNUSED) {
    9390             :                 do {
    9391             :                         if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
    9392           0 :                                 if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(object))) {
    9393             :                                         object = Z_REFVAL_P(object);
    9394             :                                         if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
    9395             :                                                 break;
    9396             :                                         }
    9397             :                                 }
    9398           0 :                                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
    9399             :                                         GET_OP1_UNDEF_CV(object, BP_VAR_R);
    9400             :                                 }
    9401           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9402           0 :                                         HANDLE_EXCEPTION();
    9403             :                                 }
    9404           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to a member function %s() on %s", Z_STRVAL_P(function_name), zend_get_type_by_const(Z_TYPE_P(object)));
    9405             : 
    9406             : 
    9407           0 :                                 HANDLE_EXCEPTION();
    9408             :                         }
    9409             :                 } while (0);
    9410             :         }
    9411             : 
    9412             :         obj = Z_OBJ_P(object);
    9413             :         called_scope = obj->ce;
    9414             : 
    9415             :         if (IS_CV != IS_CONST ||
    9416             :             UNEXPECTED((fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope)) == NULL)) {
    9417             :             zend_object *orig_obj = obj;
    9418             : 
    9419             :                 if (UNEXPECTED(obj->handlers->get_method == NULL)) {
    9420             :                         zend_error(E_EXCEPTION | E_ERROR, "Object does not support method calls");
    9421             : 
    9422             : 
    9423             :                         HANDLE_EXCEPTION();
    9424             :                 }
    9425             : 
    9426             :                 /* First, locate the function. */
    9427             :                 fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    9428             :                 if (UNEXPECTED(fbc == NULL)) {
    9429             :                         if (EXPECTED(!EG(exception))) {
    9430             :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", obj->ce->name->val, Z_STRVAL_P(function_name));
    9431             :                         }
    9432             : 
    9433             : 
    9434             :                         HANDLE_EXCEPTION();
    9435             :                 }
    9436             :                 if (IS_CV == IS_CONST &&
    9437             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    9438             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE))) &&
    9439             :                     EXPECTED(obj == orig_obj)) {
    9440             :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
    9441             :                 }
    9442             :         }
    9443             : 
    9444             :         call_info = ZEND_CALL_NESTED_FUNCTION;
    9445             :         if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0)) {
    9446             :                 obj = NULL;
    9447             :         } else if (IS_CONST & (IS_VAR|IS_TMP_VAR|IS_CV)) {
    9448             :                 /* CV may be changed indirectly (e.g. when it's a reference) */
    9449             :                 call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_RELEASE_THIS;
    9450             :                 GC_REFCOUNT(obj)++; /* For $this pointer */
    9451             :         }
    9452             : 
    9453             :         call = zend_vm_stack_push_call_frame(call_info,
    9454             :                 fbc, opline->extended_value, called_scope, obj);
    9455             :         call->prev_execute_data = EX(call);
    9456             :         EX(call) = call;
    9457             : 
    9458             : 
    9459             :         CHECK_EXCEPTION();
    9460             :         ZEND_VM_NEXT_OPCODE();
    9461             : }
    9462             : 
    9463          82 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9464             : {
    9465          82 :         USE_OPLINE
    9466             :         zval *function_name;
    9467             :         zend_class_entry *ce;
    9468             :         zend_object *object;
    9469             :         zend_function *fbc;
    9470             :         zend_execute_data *call;
    9471             : 
    9472             :         SAVE_OPLINE();
    9473             : 
    9474             :         if (IS_CONST == IS_CONST) {
    9475             :                 /* no function found. try a static method in class */
    9476          82 :                 if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    9477          73 :                         ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    9478             :                 } else {
    9479           9 :                         ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_DEFAULT |  ZEND_FETCH_CLASS_EXCEPTION);
    9480           9 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    9481           0 :                                 HANDLE_EXCEPTION();
    9482             :                         }
    9483           9 :                         if (UNEXPECTED(ce == NULL)) {
    9484           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    9485           0 :                                 HANDLE_EXCEPTION();
    9486             :                         }
    9487           9 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    9488             :                 }
    9489             :         } else {
    9490             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    9491             :         }
    9492             : 
    9493          82 :         if (IS_CONST == IS_CONST &&
    9494             :             IS_CV == IS_CONST &&
    9495             :             CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) {
    9496             :                 fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    9497          82 :         } else if (IS_CONST != IS_CONST &&
    9498             :                    IS_CV == IS_CONST &&
    9499             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
    9500             :                 /* do nothing */
    9501             :         } else if (IS_CV != IS_UNUSED) {
    9502             : 
    9503             : 
    9504         164 :                 function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9505             :                 if (IS_CV != IS_CONST) {
    9506          82 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    9507           2 :                                 if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    9508           1 :                                         GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    9509             :                                 }
    9510           2 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9511           1 :                                         HANDLE_EXCEPTION();
    9512             :                                 }
    9513           1 :                                 zend_error(E_EXCEPTION | E_ERROR, "Function name must be a string");
    9514             : 
    9515           1 :                                 HANDLE_EXCEPTION();
    9516             :                         }
    9517             :                 }
    9518             : 
    9519          80 :                 if (ce->get_static_method) {
    9520           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name));
    9521             :                 } else {
    9522          80 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    9523             :                 }
    9524          80 :                 if (UNEXPECTED(fbc == NULL)) {
    9525           0 :                         if (EXPECTED(!EG(exception))) {
    9526           0 :                                 zend_error(E_EXCEPTION | E_ERROR, "Call to undefined method %s::%s()", ce->name->val, Z_STRVAL_P(function_name));
    9527             :                         }
    9528             : 
    9529           0 :                         HANDLE_EXCEPTION();
    9530             :                 }
    9531          80 :                 if (IS_CV == IS_CONST &&
    9532             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    9533             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
    9534             :                         if (IS_CONST == IS_CONST) {
    9535             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    9536             :                         } else {
    9537             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    9538             :                         }
    9539             :                 }
    9540             :                 if (IS_CV != IS_CONST) {
    9541             : 
    9542             :                 }
    9543             :         } else {
    9544             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    9545             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call constructor");
    9546             :                         HANDLE_EXCEPTION();
    9547             :                 }
    9548             :                 if (Z_OBJ(EX(This)) && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    9549             :                         zend_error(E_EXCEPTION | E_ERROR, "Cannot call private %s::__construct()", ce->name->val);
    9550             :                         HANDLE_EXCEPTION();
    9551             :                 }
    9552             :                 fbc = ce->constructor;
    9553             :         }
    9554             : 
    9555          80 :         object = NULL;
    9556          80 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    9557           1 :                 if (Z_OBJ(EX(This)) && instanceof_function(Z_OBJCE(EX(This)), ce)) {
    9558           0 :                         object = Z_OBJ(EX(This));
    9559             :                 }
    9560           1 :                 if (!object) {
    9561           1 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    9562             :                                 /* Allowed for PHP 4 compatibility. */
    9563           2 :                                 zend_error(
    9564             :                                         E_DEPRECATED,
    9565             :                                         "Non-static method %s::%s() should not be called statically",
    9566           2 :                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    9567             :                         } else {
    9568             :                                 /* An internal function assumes $this is present and won't check that.
    9569             :                                  * So PHP would crash by allowing the call. */
    9570           0 :                                 zend_error(
    9571             :                                         E_EXCEPTION | E_ERROR,
    9572             :                                         "Non-static method %s::%s() cannot be called statically",
    9573           0 :                                         fbc->common.scope->name->val, fbc->common.function_name->val);
    9574           0 :                                 HANDLE_EXCEPTION();
    9575             :                         }
    9576             :                 }
    9577             :         }
    9578             : 
    9579          80 :         if (IS_CONST != IS_CONST) {
    9580             :                 /* previous opcode is ZEND_FETCH_CLASS */
    9581             :                 if (((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
    9582             :                     ((opline-1)->extended_value & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
    9583             :                         ce = EX(called_scope);
    9584             :                 }
    9585             :         }
    9586             : 
    9587         160 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    9588             :                 fbc, opline->extended_value, ce, object);
    9589          80 :         call->prev_execute_data = EX(call);
    9590          80 :         EX(call) = call;
    9591             : 
    9592             :         CHECK_EXCEPTION();
    9593          80 :         ZEND_VM_NEXT_OPCODE();
    9594             : }
    9595             : 
    9596          97 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9597             : {
    9598          97 :         USE_OPLINE
    9599             : 
    9600             :         zval *function_name;
    9601             :         zend_fcall_info_cache fcc;
    9602          97 :         char *error = NULL;
    9603             :         zend_function *func;
    9604             :         zend_class_entry *called_scope;
    9605             :         zend_object *object;
    9606             :         zend_execute_data *call;
    9607          97 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION;
    9608             : 
    9609             :         SAVE_OPLINE();
    9610         194 :         function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9611          97 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
    9612          71 :                 func = fcc.function_handler;
    9613          71 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    9614             :                         /* Delay closure destruction until its invocation */
    9615             :                         if (IS_CV & (IS_VAR|IS_CV)) {
    9616           3 :                                 ZVAL_DEREF(function_name);
    9617             :                         }
    9618             :                         ZEND_ASSERT(GC_TYPE(func->common.prototype) == IS_OBJECT);
    9619           3 :                         GC_REFCOUNT(func->common.prototype)++;
    9620           3 :                         call_info |= ZEND_CALL_CLOSURE;
    9621             :                 }
    9622          71 :                 called_scope = fcc.called_scope;
    9623          71 :                 object = fcc.object;
    9624          71 :                 if (object) {
    9625          19 :                         call_info |= ZEND_CALL_RELEASE_THIS;
    9626          19 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    9627             :                 }
    9628          71 :                 if (error) {
    9629           1 :                         efree(error);
    9630             :                         /* This is the only soft error is_callable() can generate */
    9631           2 :                         zend_error(E_DEPRECATED,
    9632             :                                 "Non-static method %s::%s() should not be called statically",
    9633           2 :                                 func->common.scope->name->val, func->common.function_name->val);
    9634             :                 }
    9635             :         } else {
    9636          26 :                 zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);
    9637          26 :                 efree(error);
    9638          26 :                 func = (zend_function*)&zend_pass_function;
    9639          26 :                 called_scope = NULL;
    9640          26 :                 object = NULL;
    9641             :         }
    9642             : 
    9643         194 :         call = zend_vm_stack_push_call_frame(call_info,
    9644             :                 func, opline->extended_value, called_scope, object);
    9645          97 :         call->prev_execute_data = EX(call);
    9646          97 :         EX(call) = call;
    9647             : 
    9648             :         CHECK_EXCEPTION();
    9649          97 :         ZEND_VM_NEXT_OPCODE();
    9650             : }
    9651             : 
    9652        1989 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9653             : {
    9654        1989 :         USE_OPLINE
    9655             :         zend_class_entry *ce, *catch_ce;
    9656             :         zend_object *exception;
    9657             : 
    9658             :         SAVE_OPLINE();
    9659             :         /* Check whether an exception has been thrown, if not, jump over code */
    9660        1989 :         zend_exception_restore();
    9661        1989 :         if (EG(exception) == NULL) {
    9662           0 :                 ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
    9663           0 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    9664             :         }
    9665        1989 :         if (CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) {
    9666         960 :                 catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    9667             :         } else {
    9668        1029 :                 catch_ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
    9669             : 
    9670        1029 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), catch_ce);
    9671             :         }
    9672        1989 :         ce = EG(exception)->ce;
    9673             : 
    9674             : #ifdef HAVE_DTRACE
    9675             :         if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
    9676             :                 DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
    9677             :         }
    9678             : #endif /* HAVE_DTRACE */
    9679             : 
    9680        1989 :         if (ce != catch_ce) {
    9681         884 :                 if (!catch_ce || !instanceof_function(ce, catch_ce)) {
    9682          81 :                         if (opline->result.num) {
    9683          13 :                                 zend_throw_exception_internal(NULL);
    9684          13 :                                 HANDLE_EXCEPTION();
    9685             :                         }
    9686          68 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->extended_value]);
    9687          68 :                         ZEND_VM_CONTINUE(); /* CHECK_ME */
    9688             :                 }
    9689             :         }
    9690             : 
    9691        1908 :         exception = EG(exception);
    9692        1908 :         zval_ptr_dtor(EX_VAR(opline->op2.var));
    9693        1908 :         ZVAL_OBJ(EX_VAR(opline->op2.var), EG(exception));
    9694        1908 :         if (UNEXPECTED(EG(exception) != exception)) {
    9695           1 :                 GC_REFCOUNT(EG(exception))++;
    9696           1 :                 HANDLE_EXCEPTION();
    9697             :         } else {
    9698        1907 :                 EG(exception) = NULL;
    9699        1907 :                 ZEND_VM_NEXT_OPCODE();
    9700             :         }
    9701             : }
    9702             : 
    9703           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9704             : {
    9705           0 :         USE_OPLINE
    9706             : 
    9707             :         zval *op1, *op2, *result;
    9708             : 
    9709           0 :         op1 = EX_CONSTANT(opline->op1);
    9710           0 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9711             :         do {
    9712             :                 int result;
    9713             : 
    9714           0 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    9715           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    9716           0 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    9717           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    9718           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    9719             :                         } else {
    9720           0 :                                 break;
    9721             :                         }
    9722           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    9723           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    9724           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    9725           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    9726           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    9727             :                         } else {
    9728           0 :                                 break;
    9729             :                         }
    9730           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    9731           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    9732           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    9733           0 :                                         result = 1;
    9734           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    9735           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    9736           0 :                                                 result = 0;
    9737             :                                         } else {
    9738           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    9739             :                                         }
    9740             :                                 } else {
    9741           0 :                                         result = (zendi_smart_strcmp(op1, op2) == 0);
    9742             :                                 }
    9743             : 
    9744             :                         } else {
    9745           0 :                                 break;
    9746             :                         }
    9747             :                 } else {
    9748           0 :                         break;
    9749             :                 }
    9750           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    9751           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9752           0 :                 ZEND_VM_NEXT_OPCODE();
    9753             :         } while (0);
    9754             : 
    9755             :         SAVE_OPLINE();
    9756           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    9757             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    9758             :         }
    9759           0 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    9760           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    9761             :         }