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: 11185 20860 53.6 %
Date: 2016-08-31 Functions: 714 1367 52.2 %
Legend: Lines: hit not hit

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