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: 11317 21178 53.4 %
Date: 2016-09-18 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     3049843 : 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     3049843 :         zend_execute_data *execute_data = ex;
     418             : #endif
     419             : 
     420             : 
     421             :         LOAD_OPLINE();
     422     3049843 :         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   316175369 :                 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    11886233 :                         if (EXPECTED(ret > 0)) {
     442     8838008 :                                 execute_data = EG(current_execute_data);
     443     8838008 :                                 ZEND_VM_LOOP_INTERRUPT_CHECK();
     444             :                         } else {
     445             : # ifdef ZEND_VM_IP_GLOBAL_REG
     446             :                                 opline = orig_opline;
     447             : # endif
     448     3048225 :                                 return;
     449             :                         }
     450             : #endif
     451             :                 }
     452             : 
     453   313125526 :         }
     454             :         zend_error_noreturn(E_CORE_ERROR, "Arrived at end of main loop which shouldn't happen");
     455             : }
     456             : 
     457       23666 : ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value)
     458             : {
     459             :         zend_execute_data *execute_data;
     460             : 
     461       23666 :         if (EG(exception) != NULL) {
     462           0 :                 return;
     463             :         }
     464             : 
     465       70998 :         execute_data = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
     466       47332 :                 (zend_function*)op_array, 0, zend_get_called_scope(EG(current_execute_data)), zend_get_this_object(EG(current_execute_data)));
     467       23666 :         if (EG(current_execute_data)) {
     468         164 :                 execute_data->symbol_table = zend_rebuild_symbol_table();
     469             :         } else {
     470       23502 :                 execute_data->symbol_table = &EG(symbol_table);
     471             :         }
     472       23666 :         EX(prev_execute_data) = EG(current_execute_data);
     473             :         i_init_execute_data(execute_data, op_array, return_value);
     474       23666 :         zend_execute_ex(execute_data);
     475             :         zend_vm_stack_free_call_frame(execute_data);
     476             : }
     477             : 
     478     4962997 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     479             : {
     480             :         zend_execute_data *old_execute_data;
     481     4962997 :         uint32_t call_info = EX_CALL_INFO();
     482             : 
     483     4962997 :         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     4355022 :                 EG(current_execute_data) = EX(prev_execute_data);
     487     4355022 :                 if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
     488      203958 :                         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      203958 :                         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     4151064 :                 } else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
     499         587 :                         OBJ_RELEASE((zend_object*)execute_data->func->op_array.prototype);
     500             :                 }
     501     4355022 :                 EG(vm_stack_top) = (zval*)execute_data;
     502     4355022 :                 execute_data = EX(prev_execute_data);
     503             : 
     504     4355022 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     505         627 :                         const zend_op *old_opline = EX(opline);
     506         627 :                         zend_throw_exception_internal(NULL);
     507         627 :                         if (RETURN_VALUE_USED(old_opline)) {
     508         272 :                                 zval_ptr_dtor(EX_VAR(old_opline->result.var));
     509             :                         }
     510         627 :                         HANDLE_EXCEPTION_LEAVE();
     511             :                 }
     512             : 
     513     4354395 :                 LOAD_NEXT_OPLINE();
     514     4354395 :                 ZEND_VM_LEAVE();
     515      607975 :         } else if (EXPECTED((call_info & (ZEND_CALL_CODE|ZEND_CALL_TOP)) == 0)) {
     516             :                 i_free_compiled_variables(execute_data);
     517             : 
     518         405 :                 if (UNEXPECTED(call_info & ZEND_CALL_HAS_SYMBOL_TABLE)) {
     519         368 :                         zend_clean_and_cache_symbol_table(EX(symbol_table));
     520             :                 }
     521         405 :                 EG(current_execute_data) = EX(prev_execute_data);
     522         405 :                 if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
     523          91 :                         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          91 :                         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         314 :                 } else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
     534          14 :                         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         405 :                 old_execute_data = execute_data;
     539         405 :                 execute_data = EX(prev_execute_data);
     540             :                 zend_vm_stack_free_call_frame_ex(call_info, old_execute_data);
     541             : 
     542         405 :                 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         385 :                 LOAD_NEXT_OPLINE();
     552         385 :                 ZEND_VM_LEAVE();
     553      607570 :         } else if (EXPECTED((call_info & ZEND_CALL_TOP) == 0)) {
     554       11082 :                 zend_detach_symbol_table(execute_data);
     555       11082 :                 destroy_op_array(&EX(func)->op_array);
     556       11082 :                 efree_size(EX(func), sizeof(zend_op_array));
     557       11082 :                 old_execute_data = execute_data;
     558       11082 :                 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       11082 :                 zend_attach_symbol_table(execute_data);
     562       11082 :                 if (UNEXPECTED(EG(exception) != NULL)) {
     563          24 :                         zend_throw_exception_internal(NULL);
     564          24 :                         HANDLE_EXCEPTION_LEAVE();
     565             :                 }
     566             : 
     567       11058 :                 LOAD_NEXT_OPLINE();
     568       11058 :                 ZEND_VM_LEAVE();
     569             :         } else {
     570      596488 :                 if (EXPECTED((call_info & ZEND_CALL_CODE) == 0)) {
     571             :                         i_free_compiled_variables(execute_data);
     572      574412 :                         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      574412 :                         EG(current_execute_data) = EX(prev_execute_data);
     579      574412 :                         if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
     580         730 :                                 OBJ_RELEASE((zend_object*)EX(func)->op_array.prototype);
     581             :                         }
     582      574412 :                         ZEND_VM_RETURN();
     583             :                 } else /* if (call_kind == ZEND_CALL_TOP_CODE) */ {
     584       22076 :                         zend_array *symbol_table = EX(symbol_table);
     585             : 
     586       22076 :                         zend_detach_symbol_table(execute_data);
     587       22076 :                         old_execute_data = EX(prev_execute_data);
     588       44317 :                         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       22076 :                         EG(current_execute_data) = EX(prev_execute_data);
     598       22076 :                         ZEND_VM_RETURN();
     599             :                 }
     600             :         }
     601             : }
     602             : 
     603     6927265 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     604             : {
     605     6927265 :         USE_OPLINE
     606             : 
     607     6927265 :         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op1));
     608     6927265 :         ZEND_VM_CONTINUE();
     609             : }
     610             : 
     611     1328954 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     612             : {
     613     1328954 :         USE_OPLINE
     614     1328954 :         zend_execute_data *call = EX(call);
     615     1328954 :         zend_function *fbc = call->func;
     616             :         zval *ret;
     617             :         zval retval;
     618             : 
     619             :         SAVE_OPLINE();
     620     1328954 :         EX(call) = call->prev_execute_data;
     621             : 
     622     1328954 :         call->prev_execute_data = execute_data;
     623     1328954 :         EG(current_execute_data) = call;
     624             : 
     625     1328954 :         ret = 0 ? EX_VAR(opline->result.var) : &retval;
     626     1328954 :         ZVAL_NULL(ret);
     627             : 
     628     1328954 :         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     1328909 :         EG(current_execute_data) = 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     1328909 :         if (UNEXPECTED(EG(exception) != NULL)) {
     647          69 :                 zend_throw_exception_internal(NULL);
     648          69 :                 if (0) {
     649             :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     650             :                 }
     651          69 :                 HANDLE_EXCEPTION();
     652             :         }
     653             : 
     654     1328840 :         ZEND_VM_SET_OPCODE(opline + 1);
     655     1328839 :         ZEND_VM_CONTINUE();
     656             : }
     657             : 
     658    26130100 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     659             : {
     660    26130100 :         USE_OPLINE
     661    26130100 :         zend_execute_data *call = EX(call);
     662    26130100 :         zend_function *fbc = call->func;
     663             :         zval *ret;
     664             :         zval retval;
     665             : 
     666             :         SAVE_OPLINE();
     667    26130100 :         EX(call) = call->prev_execute_data;
     668             : 
     669    26130100 :         call->prev_execute_data = execute_data;
     670    26130100 :         EG(current_execute_data) = call;
     671             : 
     672    26130100 :         ret = 1 ? EX_VAR(opline->result.var) : &retval;
     673    26130100 :         ZVAL_NULL(ret);
     674             : 
     675    26130100 :         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    26130138 :         EG(current_execute_data) = execute_data;
     686             :         zend_vm_stack_free_args(call);
     687             :         zend_vm_stack_free_call_frame(call);
     688             : 
     689    26130138 :         if (!1) {
     690             :                 zval_ptr_dtor(ret);
     691             :         }
     692             : 
     693    26130138 :         if (UNEXPECTED(EG(exception) != NULL)) {
     694          90 :                 zend_throw_exception_internal(NULL);
     695             :                 if (1) {
     696          90 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
     697             :                 }
     698          90 :                 HANDLE_EXCEPTION();
     699             :         }
     700             : 
     701    26130048 :         ZEND_VM_SET_OPCODE(opline + 1);
     702    26130037 :         ZEND_VM_CONTINUE();
     703             : }
     704             : 
     705     1991700 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     706             : {
     707     1991700 :         USE_OPLINE
     708     1991700 :         zend_execute_data *call = EX(call);
     709     1991700 :         zend_function *fbc = call->func;
     710             :         zval *ret;
     711             : 
     712             :         SAVE_OPLINE();
     713     1991700 :         EX(call) = call->prev_execute_data;
     714             : 
     715     1991700 :         ret = NULL;
     716     1991700 :         if (0) {
     717             :                 ret = EX_VAR(opline->result.var);
     718             :                 ZVAL_NULL(ret);
     719             :         }
     720             : 
     721     1991700 :         call->prev_execute_data = execute_data;
     722     1991700 :         i_init_func_execute_data(call, &fbc->op_array, ret);
     723             : 
     724     1991700 :         ZEND_VM_ENTER();
     725             : }
     726             : 
     727     1832187 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     728             : {
     729     1832187 :         USE_OPLINE
     730     1832187 :         zend_execute_data *call = EX(call);
     731     1832187 :         zend_function *fbc = call->func;
     732             :         zval *ret;
     733             : 
     734             :         SAVE_OPLINE();
     735     1832187 :         EX(call) = call->prev_execute_data;
     736             : 
     737     1832187 :         ret = NULL;
     738             :         if (1) {
     739     1832187 :                 ret = EX_VAR(opline->result.var);
     740     1832187 :                 ZVAL_NULL(ret);
     741             :         }
     742             : 
     743     1832187 :         call->prev_execute_data = execute_data;
     744     1832187 :         i_init_func_execute_data(call, &fbc->op_array, ret);
     745             : 
     746     1832187 :         ZEND_VM_ENTER();
     747             : }
     748             : 
     749      136495 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     750             : {
     751      136495 :         USE_OPLINE
     752      136495 :         zend_execute_data *call = EX(call);
     753      136495 :         zend_function *fbc = call->func;
     754             :         zval *ret;
     755             : 
     756             :         SAVE_OPLINE();
     757      136495 :         EX(call) = call->prev_execute_data;
     758             : 
     759      136495 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     760      136139 :                 ret = NULL;
     761      136139 :                 if (0) {
     762             :                         ret = EX_VAR(opline->result.var);
     763             :                         ZVAL_NULL(ret);
     764             :                 }
     765             : 
     766      136139 :                 call->prev_execute_data = execute_data;
     767      136139 :                 i_init_func_execute_data(call, &fbc->op_array, ret);
     768             : 
     769      136139 :                 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) = 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      238593 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     829             : {
     830      238593 :         USE_OPLINE
     831      238593 :         zend_execute_data *call = EX(call);
     832      238593 :         zend_function *fbc = call->func;
     833             :         zval *ret;
     834             : 
     835             :         SAVE_OPLINE();
     836      238593 :         EX(call) = call->prev_execute_data;
     837             : 
     838      238593 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     839      237520 :                 ret = NULL;
     840             :                 if (1) {
     841      237520 :                         ret = EX_VAR(opline->result.var);
     842      237520 :                         ZVAL_NULL(ret);
     843             :                 }
     844             : 
     845      237520 :                 call->prev_execute_data = execute_data;
     846      237520 :                 i_init_func_execute_data(call, &fbc->op_array, ret);
     847             : 
     848      237520 :                 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) = 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     1046339 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     908             : {
     909     1046339 :         USE_OPLINE
     910     1046339 :         zend_execute_data *call = EX(call);
     911     1046339 :         zend_function *fbc = call->func;
     912             :         zend_object *object;
     913             :         zval *ret;
     914             : 
     915             :         SAVE_OPLINE();
     916     1046339 :         EX(call) = call->prev_execute_data;
     917     1046339 :         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     1046335 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
     936      205506 :                 ret = NULL;
     937      205506 :                 if (0) {
     938             :                         ret = EX_VAR(opline->result.var);
     939             :                         ZVAL_NULL(ret);
     940             :                 }
     941             : 
     942      205506 :                 call->prev_execute_data = execute_data;
     943      205506 :                 i_init_func_execute_data(call, &fbc->op_array, ret);
     944             : 
     945      205506 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
     946      205506 :                         ZEND_VM_ENTER();
     947             :                 } else {
     948           0 :                         ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
     949           0 :                         zend_execute_ex(call);
     950             :                 }
     951      840829 :         } else if (EXPECTED(fbc->type < ZEND_USER_FUNCTION)) {
     952             :                 zval retval;
     953             : 
     954      840829 :                 call->prev_execute_data = execute_data;
     955      840829 :                 EG(current_execute_data) = call;
     956             : 
     957     1682319 :                 if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
     958      841490 :                   && 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      840825 :                 ret = 0 ? EX_VAR(opline->result.var) : &retval;
     966      840825 :                 ZVAL_NULL(ret);
     967             : 
     968      840825 :                 if (!zend_execute_internal) {
     969             :                         /* saves one function call if zend_execute_internal is not used */
     970      840825 :                         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      840703 :                 EG(current_execute_data) = 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      840707 :         if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
    1009      839874 :                 object = Z_OBJ(call->This);
    1010             : #if 0
    1011             :                 if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
    1012             : #else
    1013      839874 :                 if (UNEXPECTED(EG(exception) != NULL) && (ZEND_CALL_INFO(call) & ZEND_CALL_CTOR)) {
    1014             : #endif
    1015         436 :                         GC_REFCOUNT(object)--;
    1016         436 :                         zend_object_store_ctor_failed(object);
    1017             :                 }
    1018             :                 OBJ_RELEASE(object);
    1019             :         }
    1020             : 
    1021             :         zend_vm_stack_free_call_frame(call);
    1022      840707 :         if (UNEXPECTED(EG(exception) != NULL)) {
    1023         847 :                 zend_throw_exception_internal(NULL);
    1024         847 :                 if (0) {
    1025             :                         zval_ptr_dtor(EX_VAR(opline->result.var));
    1026             :                 }
    1027         847 :                 HANDLE_EXCEPTION();
    1028             :         }
    1029             : 
    1030      839860 :         ZEND_VM_SET_OPCODE(opline + 1);
    1031      839860 :         ZEND_VM_CONTINUE();
    1032             : }
    1033             : 
    1034     2594575 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1035             : {
    1036     2594575 :         USE_OPLINE
    1037     2594575 :         zend_execute_data *call = EX(call);
    1038     2594575 :         zend_function *fbc = call->func;
    1039             :         zend_object *object;
    1040             :         zval *ret;
    1041             : 
    1042             :         SAVE_OPLINE();
    1043     2594575 :         EX(call) = call->prev_execute_data;
    1044     2594575 :         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     2594575 :         if (EXPECTED(fbc->type == ZEND_USER_FUNCTION)) {
    1063        3366 :                 ret = NULL;
    1064             :                 if (1) {
    1065        3366 :                         ret = EX_VAR(opline->result.var);
    1066        3366 :                         ZVAL_NULL(ret);
    1067             :                 }
    1068             : 
    1069        3366 :                 call->prev_execute_data = execute_data;
    1070        3366 :                 i_init_func_execute_data(call, &fbc->op_array, ret);
    1071             : 
    1072        3366 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    1073        3366 :                         ZEND_VM_ENTER();
    1074             :                 } else {
    1075           0 :                         ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
    1076           0 :                         zend_execute_ex(call);
    1077             :                 }
    1078     2591209 :         } else if (EXPECTED(fbc->type < ZEND_USER_FUNCTION)) {
    1079             :                 zval retval;
    1080             : 
    1081     2591209 :                 call->prev_execute_data = execute_data;
    1082     2591209 :                 EG(current_execute_data) = call;
    1083             : 
    1084     5182787 :                 if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
    1085     2591578 :                   && 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     2591134 :                 ret = 1 ? EX_VAR(opline->result.var) : &retval;
    1093     2591134 :                 ZVAL_NULL(ret);
    1094             : 
    1095     2591134 :                 if (!zend_execute_internal) {
    1096             :                         /* saves one function call if zend_execute_internal is not used */
    1097     2591134 :                         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     2591131 :                 EG(current_execute_data) = execute_data;
    1112             :                 zend_vm_stack_free_args(call);
    1113             : 
    1114     2591131 :                 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     2591206 :         if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_RELEASE_THIS)) {
    1136     2573586 :                 object = Z_OBJ(call->This);
    1137             : #if 0
    1138             :                 if (UNEXPECTED(EG(exception) != NULL) && (opline->op1.num & ZEND_CALL_CTOR)) {
    1139             : #else
    1140     2573586 :                 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     2591206 :         if (UNEXPECTED(EG(exception) != NULL)) {
    1150         374 :                 zend_throw_exception_internal(NULL);
    1151             :                 if (1) {
    1152         374 :                         zval_ptr_dtor(EX_VAR(opline->result.var));
    1153             :                 }
    1154         374 :                 HANDLE_EXCEPTION();
    1155             :         }
    1156             : 
    1157     2590832 :         ZEND_VM_SET_OPCODE(opline + 1);
    1158     2590832 :         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        1144 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1455             : {
    1456        1144 :         USE_OPLINE
    1457        1144 :         uint32_t arg_num = opline->op1.num;
    1458             : 
    1459        1144 :         if (UNEXPECTED(arg_num > EX_NUM_ARGS())) {
    1460             :                 SAVE_OPLINE();
    1461          58 :                 zend_missing_arg_error(execute_data);
    1462          58 :                 HANDLE_EXCEPTION();
    1463        1086 :         } else if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
    1464        2172 :                 zval *param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
    1465             : 
    1466             :                 SAVE_OPLINE();
    1467        2172 :                 if (UNEXPECTED(!zend_verify_arg_type(EX(func), arg_num, param, NULL, CACHE_ADDR(opline->op2.num)) || EG(exception))) {
    1468         151 :                         HANDLE_EXCEPTION();
    1469             :                 }
    1470             :         }
    1471             : 
    1472         935 :         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     1438721 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1516             : {
    1517     1438721 :         USE_OPLINE
    1518             : 
    1519     1438721 :         ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting));
    1520             : 
    1521     1438721 :         if (EG(error_reporting)) {
    1522             :                 do {
    1523     1276383 :                         EG(error_reporting) = 0;
    1524     1276383 :                         if (!EG(error_reporting_ini_entry)) {
    1525        5682 :                                 zend_ini_entry *p = zend_hash_find_ptr(EG(ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING]);
    1526        2841 :                                 if (p) {
    1527        2841 :                                         EG(error_reporting_ini_entry) = p;
    1528             :                                 } else {
    1529           0 :                                         break;
    1530             :                                 }
    1531             :                         }
    1532     1276383 :                         if (!EG(error_reporting_ini_entry)->modified) {
    1533        2841 :                                 if (!EG(modified_ini_directives)) {
    1534        2256 :                                         ALLOC_HASHTABLE(EG(modified_ini_directives));
    1535        2256 :                                         zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
    1536             :                                 }
    1537        5682 :                                 if (EXPECTED(zend_hash_add_ptr(EG(modified_ini_directives), CG(known_strings)[ZEND_STR_ERROR_REPORTING], EG(error_reporting_ini_entry)) != NULL)) {
    1538        2841 :                                         EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
    1539        2841 :                                         EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
    1540        2841 :                                         EG(error_reporting_ini_entry)->modified = 1;
    1541             :                                 }
    1542             :                         }
    1543             :                 } while (0);
    1544             :         }
    1545     1438721 :         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         483 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1585             : {
    1586         483 :         USE_OPLINE
    1587             : 
    1588             :         SAVE_OPLINE();
    1589         483 :         Z_CE_P(EX_VAR(opline->result.var)) = do_bind_class(&EX(func)->op_array, opline, EG(class_table), 0);
    1590         475 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    1591             : }
    1592             : 
    1593          44 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1594             : {
    1595             :         zend_class_entry *ce;
    1596          44 :         USE_OPLINE
    1597             : 
    1598             :         SAVE_OPLINE();
    1599          88 :         ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)));
    1600          44 :         Z_CE_P(EX_VAR(opline->result.var)) = ce;
    1601             :         ZEND_ASSERT(ce != NULL);
    1602             : 
    1603          44 :         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          31 :         if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLEMENT_INTERFACES|ZEND_ACC_IMPLEMENT_TRAITS))) {
    1609          28 :                 zend_verify_abstract_class(ce);
    1610             :         }
    1611          31 :         ce->ce_flags |= ZEND_ACC_ANON_BOUND;
    1612          31 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    1613             : }
    1614             : 
    1615        3477 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1616             : {
    1617        3477 :         USE_OPLINE
    1618             : 
    1619             :         SAVE_OPLINE();
    1620        3477 :         do_bind_function(&EX(func)->op_array, opline, EG(function_table), 0);
    1621        3477 :         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      520511 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1647             : {
    1648      520511 :         USE_OPLINE
    1649             : 
    1650      520511 :         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        3887 : 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        3887 :         zend_object *ex = EG(exception);
    1693             : 
    1694             :         /* Walk try/catch/finally structures upwards, performing the necessary actions */
    1695        7818 :         while (try_catch_offset != (uint32_t) -1) {
    1696             :                 zend_try_catch_element *try_catch =
    1697        2370 :                         &EX(func)->op_array.try_catch_array[try_catch_offset];
    1698             : 
    1699        2370 :                 if (op_num < try_catch->catch_op && ex) {
    1700             :                         /* Go to catch block */
    1701        2280 :                         cleanup_live_vars(execute_data, op_num, try_catch->catch_op);
    1702        2280 :                         ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[try_catch->catch_op]);
    1703        2280 :                         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        1561 :         cleanup_live_vars(execute_data, op_num, 0);
    1742        1561 :         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        1516 :                 ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    1748             :         }
    1749             : }
    1750             : 
    1751        3851 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1752             : {
    1753        3851 :         uint32_t throw_op_num = EG(opline_before_exception) - EX(func)->op_array.opcodes;
    1754        3851 :         int i, current_try_catch_offset = -1;
    1755             : 
    1756             :         {
    1757        3851 :                 const zend_op *exc_opline = EG(opline_before_exception);
    1758        3859 :                 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        8836 :         for (i = 0; i < EX(func)->op_array.last_try_catch; i++) {
    1770        5718 :                 zend_try_catch_element *try_catch = &EX(func)->op_array.try_catch_array[i];
    1771        5718 :                 if (try_catch->try_op > throw_op_num) {
    1772             :                         /* further blocks will not be relevant... */
    1773         733 :                         break;
    1774             :                 }
    1775        4985 :                 if (throw_op_num < try_catch->catch_op || throw_op_num < try_catch->finally_end) {
    1776        2412 :                         current_try_catch_offset = i;
    1777             :                 }
    1778             :         }
    1779             : 
    1780        3851 :         cleanup_unfinished_calls(execute_data, throw_op_num);
    1781             : 
    1782        3851 :         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         298 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1786             : {
    1787         298 :         USE_OPLINE
    1788             : 
    1789             :         SAVE_OPLINE();
    1790         298 :         zend_verify_abstract_class(Z_CE_P(EX_VAR(opline->op1.var)));
    1791         292 :         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      100257 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSERT_CHECK_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1883             : {
    1884      100257 :         USE_OPLINE
    1885             : 
    1886      100257 :         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      100240 :                 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        3521 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1940             : {
    1941             :         zend_array *args;
    1942        3521 :         zend_function *fbc = EX(func);
    1943        3521 :         zval *ret = EX(return_value);
    1944        3521 :         uint32_t call_info = EX_CALL_INFO() & (ZEND_CALL_NESTED | ZEND_CALL_TOP | ZEND_CALL_RELEASE_THIS);
    1945        3521 :         uint32_t num_args = EX_NUM_ARGS();
    1946             :         zend_execute_data *call;
    1947        3521 :         USE_OPLINE
    1948             : 
    1949        3521 :         args = emalloc(sizeof(zend_array));
    1950        3521 :         zend_hash_init(args, num_args, NULL, ZVAL_PTR_DTOR, 0);
    1951        3521 :         if (num_args) {
    1952         340 :                 zval *p = ZEND_CALL_ARG(execute_data, 1);
    1953         340 :                 zval *end = p + num_args;
    1954             : 
    1955         340 :                 zend_hash_real_init(args, 1);
    1956         340 :                 ZEND_HASH_FILL_PACKED(args) {
    1957             :                         do {
    1958         453 :                                 ZEND_HASH_FILL_ADD(p);
    1959         453 :                                 p++;
    1960         453 :                         } while (p != end);
    1961         340 :                 } ZEND_HASH_FILL_END();
    1962             :         }
    1963             : 
    1964             :         SAVE_OPLINE();
    1965        3521 :         call = execute_data;
    1966        3521 :         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        3521 :         call->func = fbc->common.prototype;
    1971        3521 :         ZEND_CALL_NUM_ARGS(call) = 2;
    1972             : 
    1973        3521 :         ZVAL_STR(ZEND_CALL_ARG(call, 1), fbc->common.function_name);
    1974        3521 :         ZVAL_ARR(ZEND_CALL_ARG(call, 2), args);
    1975        3521 :         zend_free_trampoline(fbc);
    1976        3521 :         fbc = call->func;
    1977             : 
    1978        3521 :         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         331 :                 EG(current_execute_data) = call;
    1998             : 
    1999         662 :                 if (UNEXPECTED(fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS)
    2000         331 :                  && 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         331 :                 if (ret == NULL) {
    2009         262 :                         ZVAL_NULL(&retval);
    2010         262 :                         ret = &retval;
    2011             :                 }
    2012             : 
    2013         331 :                 if (!zend_execute_internal) {
    2014             :                         /* saves one function call if zend_execute_internal is not used */
    2015         331 :                         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         322 :                 EG(current_execute_data) = call->prev_execute_data;
    2028             : 
    2029             :                 zend_vm_stack_free_args(call);
    2030             : 
    2031         322 :                 if (ret == &retval) {
    2032             :                         zval_ptr_dtor(ret);
    2033             :                 }
    2034             :         }
    2035             : 
    2036             : call_trampoline_end:
    2037         322 :         execute_data = EG(current_execute_data);
    2038             : 
    2039         322 :         if (!EX(func) || !ZEND_USER_CODE(EX(func)->type) || (call_info & ZEND_CALL_TOP)) {
    2040           0 :                 ZEND_VM_RETURN();
    2041             :         }
    2042             : 
    2043         322 :         opline = EX(opline);
    2044             : 
    2045         322 :         if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
    2046         322 :                 zend_object *object = Z_OBJ(call->This);
    2047             :                 OBJ_RELEASE(object);
    2048             :         }
    2049             :         zend_vm_stack_free_call_frame(call);
    2050             : 
    2051         322 :         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         316 :         ZEND_VM_INC_OPCODE();
    2060         316 :         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        1329 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2076             : {
    2077        1329 :         USE_OPLINE
    2078             : 
    2079             :         SAVE_OPLINE();
    2080        1329 :         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        1329 :                 zval *class_name = EX_CONSTANT(opline->op2);
    2086             : 
    2087             : try_class_name:
    2088             :                 if (IS_CONST == IS_CONST) {
    2089        1329 :                         zend_class_entry *ce = CACHED_PTR(Z_CACHE_SLOT_P(class_name));
    2090             : 
    2091        1329 :                         if (UNEXPECTED(ce == NULL)) {
    2092        1329 :                                 ce = zend_fetch_class_by_name(Z_STR_P(class_name), EX_CONSTANT(opline->op2) + 1, opline->extended_value);
    2093        1328 :                                 CACHE_PTR(Z_CACHE_SLOT_P(class_name), ce);
    2094             :                         }
    2095        1328 :                         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        1328 :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    2114             :         }
    2115             : }
    2116             : 
    2117      373638 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2118             : {
    2119      373638 :         USE_OPLINE
    2120             :         zend_function *fbc;
    2121             :         zval *function_name, *func;
    2122             :         zend_execute_data *call;
    2123             : 
    2124      373638 :         function_name = (zval*)EX_CONSTANT(opline->op2);
    2125      373638 :         fbc = CACHED_PTR(Z_CACHE_SLOT_P(function_name));
    2126      373638 :         if (UNEXPECTED(fbc == NULL)) {
    2127        3600 :                 func = zend_hash_find(EG(function_table), Z_STR_P(function_name+1));
    2128        3600 :                 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        3572 :                 fbc = Z_FUNC_P(func);
    2134        3572 :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    2135        2636 :                         init_func_run_time_cache(&fbc->op_array);
    2136             :                 }
    2137        3572 :                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    2138             :         }
    2139      747220 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    2140             :                 fbc, opline->extended_value, NULL, NULL);
    2141      373610 :         call->prev_execute_data = EX(call);
    2142      373610 :         EX(call) = call;
    2143             : 
    2144      373610 :         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    31284295 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2225             : {
    2226    31284295 :         USE_OPLINE
    2227             : 
    2228    31284295 :         zval *fname = EX_CONSTANT(opline->op2);
    2229             :         zval *func;
    2230             :         zend_function *fbc;
    2231             :         zend_execute_data *call;
    2232             : 
    2233    31284295 :         fbc = CACHED_PTR(Z_CACHE_SLOT_P(fname));
    2234    31284295 :         if (UNEXPECTED(fbc == NULL)) {
    2235      175976 :                 func = zend_hash_find(EG(function_table), Z_STR_P(fname));
    2236      175976 :                 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      175976 :                 fbc = Z_FUNC_P(func);
    2242      175976 :                 CACHE_PTR(Z_CACHE_SLOT_P(fname), fbc);
    2243      175976 :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    2244        2046 :                         init_func_run_time_cache(&fbc->op_array);
    2245             :                 }
    2246             :         }
    2247             : 
    2248    62568590 :         call = zend_vm_stack_push_call_frame_ex(
    2249             :                 opline->op1.num, ZEND_CALL_NESTED_FUNCTION,
    2250             :                 fbc, opline->extended_value, NULL, NULL);
    2251    31284295 :         call->prev_execute_data = EX(call);
    2252    31284295 :         EX(call) = call;
    2253             : 
    2254    31284295 :         ZEND_VM_NEXT_OPCODE();
    2255             : }
    2256             : 
    2257      166370 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2258             : {
    2259      166370 :         USE_OPLINE
    2260             :         uint32_t arg_num;
    2261             :         zval *param;
    2262             : 
    2263             :         ZEND_VM_REPEATABLE_OPCODE
    2264             : 
    2265      199967 :         arg_num = opline->op1.num;
    2266      399934 :         param = _get_zval_ptr_cv_undef_BP_VAR_W(execute_data, opline->result.var);
    2267      199967 :         if (arg_num > EX_NUM_ARGS()) {
    2268      112474 :                 ZVAL_COPY(param, EX_CONSTANT(opline->op2));
    2269      112474 :                 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      199947 :         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      199940 :         ZEND_VM_REPEAT_OPCODE(ZEND_RECV_INIT);
    2289             :         ZEND_VM_NEXT_OPCODE();
    2290             : }
    2291             : 
    2292         419 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2293             : {
    2294         419 :         USE_OPLINE
    2295         419 :         zend_class_entry *ce = Z_CE_P(EX_VAR(opline->op1.var));
    2296             :         zend_class_entry *iface;
    2297             : 
    2298             :         SAVE_OPLINE();
    2299         419 :         iface = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    2300         419 :         if (UNEXPECTED(iface == NULL)) {
    2301         419 :                 iface = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op2)), EX_CONSTANT(opline->op2) + 1, ZEND_FETCH_CLASS_INTERFACE);
    2302         417 :                 if (UNEXPECTED(iface == NULL)) {
    2303           1 :                         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    2304             :                 }
    2305         416 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), iface);
    2306             :         }
    2307             : 
    2308         416 :         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         412 :         zend_do_implement_interface(ce, iface);
    2312             : 
    2313         377 :         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           5 : 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           5 :         USE_OPLINE
    2343             : 
    2344             :         SAVE_OPLINE();
    2345          10 :         ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(EX_CONSTANT(opline->op1)));
    2346           5 :         Z_CE_P(EX_VAR(opline->result.var)) = ce;
    2347             :         ZEND_ASSERT(ce != NULL);
    2348             : 
    2349           5 :         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           5 :         zend_do_inheritance(ce, Z_CE_P(EX_VAR(opline->op2.var)));
    2355           5 :         ce->ce_flags |= ZEND_ACC_ANON_BOUND;
    2356           5 :         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        1456 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2402             : {
    2403        1456 :         USE_OPLINE
    2404             : 
    2405             :         SAVE_OPLINE();
    2406        1456 :         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        2912 :                 zval *class_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    2412             : 
    2413             : try_class_name:
    2414        1460 :                 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        1460 :                 } 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        1433 :                 } else if (Z_TYPE_P(class_name) == IS_STRING) {
    2425        1426 :                         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        1454 :                 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         103 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_DYNAMIC_CALL_SPEC_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2528             : {
    2529         103 :         USE_OPLINE
    2530             :         zend_free_op free_op2;
    2531             :         zval *function_name;
    2532             :         zend_execute_data *call;
    2533             : 
    2534             :         SAVE_OPLINE();
    2535         206 :         function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    2536             : 
    2537             : try_function_name:
    2538         105 :         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          56 :         } else if ((IS_TMP_VAR|IS_VAR) != IS_CONST && EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT)) {
    2541          49 :                 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         103 :         zval_ptr_dtor_nogc(free_op2);
    2559             : 
    2560         103 :         if (UNEXPECTED(!call)) {
    2561           1 :                 HANDLE_EXCEPTION();
    2562             :         }
    2563             : 
    2564         102 :         call->prev_execute_data = EX(call);
    2565         102 :         EX(call) = call;
    2566             : 
    2567         102 :         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       52276 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2608             : {
    2609       52276 :         USE_OPLINE
    2610             : 
    2611             :         zval *z;
    2612             : 
    2613             :         SAVE_OPLINE();
    2614       52276 :         z = EX_CONSTANT(opline->op1);
    2615             : 
    2616       52276 :         if (Z_TYPE_P(z) == IS_STRING) {
    2617       52212 :                 zend_string *str = Z_STR_P(z);
    2618             : 
    2619       52212 :                 if (ZSTR_LEN(str) != 0) {
    2620       52209 :                         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       52274 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    2634             : }
    2635             : 
    2636        1032 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2637             : {
    2638        1032 :         USE_OPLINE
    2639             : 
    2640             :         zval *val;
    2641             : 
    2642        1032 :         val = EX_CONSTANT(opline->op1);
    2643             : 
    2644        1032 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    2645         246 :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    2646         246 :                 ZEND_VM_CONTINUE();
    2647         786 :         } else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
    2648         502 :                 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         502 :                         ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    2654         502 :                         ZEND_VM_CONTINUE();
    2655             :                 }
    2656             :         }
    2657             : 
    2658             :         SAVE_OPLINE();
    2659         284 :         if (i_zend_is_true(val)) {
    2660         118 :                 opline++;
    2661             :         } else {
    2662         166 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    2663             :         }
    2664             : 
    2665         284 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2666           0 :                 HANDLE_EXCEPTION();
    2667             :         }
    2668         284 :         ZEND_VM_JMP(opline);
    2669             : }
    2670             : 
    2671     5837309 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2672             : {
    2673     5837309 :         USE_OPLINE
    2674             : 
    2675             :         zval *val;
    2676             : 
    2677     5837309 :         val = EX_CONSTANT(opline->op1);
    2678             : 
    2679     5837309 :         if (Z_TYPE_INFO_P(val) == IS_TRUE) {
    2680     5836827 :                 ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline, opline->op2));
    2681     5836826 :                 ZEND_VM_CONTINUE();
    2682         482 :         } 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         479 :         if (i_zend_is_true(val)) {
    2694         478 :                 opline = OP_JMP_ADDR(opline, opline->op2);
    2695             :         } else {
    2696           1 :                 opline++;
    2697             :         }
    2698             : 
    2699         479 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2700           0 :                 HANDLE_EXCEPTION();
    2701             :         }
    2702         479 :         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     2708874 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2826             : {
    2827     2708874 :         USE_OPLINE
    2828             :         zval *retval_ptr;
    2829             :         zval *return_value;
    2830             :         zend_free_op free_op1;
    2831             : 
    2832     2708874 :         retval_ptr = EX_CONSTANT(opline->op1);
    2833     2708874 :         return_value = EX(return_value);
    2834     2708874 :         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     2708874 :         } else if (!return_value) {
    2841     2361894 :                 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      346980 :                         ZVAL_COPY_VALUE(return_value, retval_ptr);
    2850             :                         if (IS_CONST == IS_CONST) {
    2851      346980 :                                 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     2708874 :         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    15258233 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3033             : {
    3034    15258233 :         USE_OPLINE
    3035             :         zval *value, *arg;
    3036             : 
    3037             : 
    3038    15258233 :         value = EX_CONSTANT(opline->op1);
    3039    15258233 :         arg = ZEND_CALL_VAR(EX(call), opline->result.var);
    3040    15258233 :         ZVAL_COPY_VALUE(arg, value);
    3041             :         if (IS_CONST == IS_CONST) {
    3042    15258233 :                 if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
    3043             :                         Z_ADDREF_P(arg);
    3044             :                 }
    3045             :         }
    3046    15258233 :         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      523505 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAL_EX_SPEC_CONST_QUICK_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3081             : {
    3082      523505 :         USE_OPLINE
    3083             :         zval *value, *arg;
    3084             : 
    3085      523505 :         uint32_t arg_num = opline->op2.num;
    3086             : 
    3087             :         if (EXPECTED(1)) {
    3088      523505 :                 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      523502 :         value = EX_CONSTANT(opline->op1);
    3101      523502 :         arg = ZEND_CALL_VAR(EX(call), opline->result.var);
    3102      523502 :         ZVAL_COPY_VALUE(arg, value);
    3103             :         if (IS_CONST == IS_CONST) {
    3104      523502 :                 if (UNEXPECTED(Z_OPT_REFCOUNTED_P(arg))) {
    3105             :                         Z_ADDREF_P(arg);
    3106             :                 }
    3107             :         }
    3108      523502 :         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      782115 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_NEW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3137             : {
    3138      782115 :         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      782115 :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    3147      782115 :                 if (UNEXPECTED(ce == NULL)) {
    3148       12821 :                         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       12820 :                         if (UNEXPECTED(ce == NULL)) {
    3150          17 :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3151             :                         }
    3152       12803 :                         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      782097 :         result = EX_VAR(opline->result.var);
    3165      782097 :         if (UNEXPECTED(object_init_ex(result, ce) != SUCCESS)) {
    3166           6 :                 HANDLE_EXCEPTION();
    3167             :         }
    3168             : 
    3169      782090 :         constructor = Z_OBJ_HT_P(result)->get_constructor(Z_OBJ_P(result));
    3170      782090 :         if (constructor == NULL) {
    3171      195111 :                 if (UNEXPECTED(EG(exception))) {
    3172             :                         zval_ptr_dtor(result);
    3173          15 :                         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      195096 :                 if (EXPECTED(opline->extended_value == 0 && (opline+1)->opcode == ZEND_DO_FCALL)) {
    3179      195080 :                         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      586979 :                 if (EXPECTED(constructor->type == ZEND_USER_FUNCTION) && UNEXPECTED(!constructor->op_array.run_time_cache)) {
    3188         787 :                         init_func_run_time_cache(&constructor->op_array);
    3189             :                 }
    3190             :                 /* We are not handling overloaded classes right now */
    3191     1173958 :                 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      586995 :         call->prev_execute_data = EX(call);
    3201      586995 :         EX(call) = call;
    3202      586995 :         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         378 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3283             : {
    3284         378 :         USE_OPLINE
    3285             : 
    3286             :         zval *expr;
    3287         378 :         zval *result = EX_VAR(opline->result.var);
    3288             : 
    3289             :         SAVE_OPLINE();
    3290         378 :         expr = EX_CONSTANT(opline->op1);
    3291             : 
    3292         378 :         switch (opline->extended_value) {
    3293             :                 case IS_NULL:
    3294           0 :                         ZVAL_NULL(result);
    3295           0 :                         break;
    3296             :                 case _IS_BOOL:
    3297          11 :                         ZVAL_BOOL(result, zend_is_true(expr));
    3298          11 :                         break;
    3299             :                 case IS_LONG:
    3300          52 :                         ZVAL_LONG(result, zval_get_long(expr));
    3301          26 :                         break;
    3302             :                 case IS_DOUBLE:
    3303          48 :                         ZVAL_DOUBLE(result, zval_get_double(expr));
    3304          24 :                         break;
    3305             :                 case IS_STRING:
    3306         470 :                         ZVAL_STR(result, zval_get_string(expr));
    3307         235 :                         break;
    3308             :                 default:
    3309          82 :                         if (IS_CONST & (IS_VAR|IS_CV)) {
    3310             :                                 ZVAL_DEREF(expr);
    3311             :                         }
    3312             :                         /* If value is already of correct type, return it directly */
    3313          82 :                         if (Z_TYPE_P(expr) == opline->extended_value) {
    3314           0 :                                 ZVAL_COPY_VALUE(result, expr);
    3315             :                                 if (IS_CONST == IS_CONST) {
    3316           0 :                                         if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
    3317             :                                 } else if (IS_CONST != IS_TMP_VAR) {
    3318             :                                         if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
    3319             :                                 }
    3320             : 
    3321           0 :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3322             :                         }
    3323             : 
    3324          82 :                         if (opline->extended_value == IS_ARRAY) {
    3325           5 :                                 if (Z_TYPE_P(expr) != IS_OBJECT) {
    3326           5 :                                         ZVAL_NEW_ARR(result);
    3327           5 :                                         zend_hash_init(Z_ARRVAL_P(result), 8, NULL, ZVAL_PTR_DTOR, 0);
    3328           5 :                                         if (Z_TYPE_P(expr) != IS_NULL) {
    3329           4 :                                                 expr = zend_hash_index_add_new(Z_ARRVAL_P(result), 0, expr);
    3330             :                                                 if (IS_CONST == IS_CONST) {
    3331           4 :                                                         if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
    3332             :                                                 } else {
    3333             :                                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    3334             :                                                 }
    3335             :                                         }
    3336             :                                 } else {
    3337           0 :                                         ZVAL_COPY_VALUE(result, expr);
    3338             :                                         Z_ADDREF_P(result);
    3339           0 :                                         convert_to_array(result);
    3340             :                                 }
    3341             :                         } else {
    3342          77 :                                 if (Z_TYPE_P(expr) != IS_ARRAY) {
    3343           5 :                                         object_init(result);
    3344           5 :                                         if (Z_TYPE_P(expr) != IS_NULL) {
    3345           5 :                                                 expr = zend_hash_add_new(Z_OBJPROP_P(result), CG(known_strings)[ZEND_STR_SCALAR], expr);
    3346             :                                                 if (IS_CONST == IS_CONST) {
    3347           5 :                                                         if (UNEXPECTED(Z_OPT_REFCOUNTED_P(expr))) Z_ADDREF_P(expr);
    3348             :                                                 } else {
    3349             :                                                         if (Z_OPT_REFCOUNTED_P(expr)) Z_ADDREF_P(expr);
    3350             :                                                 }
    3351             :                                         }
    3352             :                                 } else {
    3353          72 :                                         ZVAL_COPY(result, expr);
    3354          72 :                                         convert_to_object(result);
    3355             :                                 }
    3356             :                         }
    3357             :         }
    3358             : 
    3359         378 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3360             : }
    3361             : 
    3362        6981 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3363             : {
    3364        6981 :         USE_OPLINE
    3365             :         zend_op_array *new_op_array;
    3366             : 
    3367             :         zval *inc_filename;
    3368             : 
    3369             :         SAVE_OPLINE();
    3370        6981 :         inc_filename = EX_CONSTANT(opline->op1);
    3371        6981 :         new_op_array = zend_include_or_eval(inc_filename, opline->extended_value);
    3372             : 
    3373        6975 :         if (UNEXPECTED(EG(exception) != NULL)) {
    3374           5 :                 if (new_op_array != ZEND_FAKE_OP_ARRAY && new_op_array != NULL) {
    3375           0 :                         destroy_op_array(new_op_array);
    3376           0 :                         efree_size(new_op_array, sizeof(zend_op_array));
    3377             :                 }
    3378           5 :                 HANDLE_EXCEPTION();
    3379        6970 :         } else if (new_op_array == ZEND_FAKE_OP_ARRAY) {
    3380         562 :                 if (RETURN_VALUE_USED(opline)) {
    3381           0 :                         ZVAL_TRUE(EX_VAR(opline->result.var));
    3382             :                 }
    3383        6408 :         } else if (EXPECTED(new_op_array != NULL)) {
    3384        6398 :                 zval *return_value = NULL;
    3385             :                 zend_execute_data *call;
    3386             : 
    3387        6398 :                 if (RETURN_VALUE_USED(opline)) {
    3388           2 :                         return_value = EX_VAR(opline->result.var);
    3389             :                 }
    3390             : 
    3391        6398 :                 new_op_array->scope = EX(func)->op_array.scope;
    3392             : 
    3393       19194 :                 call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_CODE | ZEND_CALL_HAS_SYMBOL_TABLE,
    3394             :                         (zend_function*)new_op_array, 0,
    3395        6398 :                         Z_TYPE(EX(This)) != IS_OBJECT ? Z_CE(EX(This)) : NULL,
    3396        6398 :                         Z_TYPE(EX(This)) == IS_OBJECT ? Z_OBJ(EX(This)) : NULL);
    3397             : 
    3398        6398 :                 if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
    3399        6362 :                         call->symbol_table = EX(symbol_table);
    3400             :                 } else {
    3401          36 :                         call->symbol_table = zend_rebuild_symbol_table();
    3402             :                 }
    3403             : 
    3404        6398 :                 call->prev_execute_data = execute_data;
    3405             :                 i_init_code_execute_data(call, new_op_array, return_value);
    3406        6398 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    3407        6398 :                         ZEND_VM_ENTER();
    3408             :                 } else {
    3409           0 :                         ZEND_ADD_CALL_FLAG(call, ZEND_CALL_TOP);
    3410           0 :                         zend_execute_ex(call);
    3411             :                         zend_vm_stack_free_call_frame(call);
    3412             :                 }
    3413             : 
    3414           0 :                 destroy_op_array(new_op_array);
    3415           0 :                 efree_size(new_op_array, sizeof(zend_op_array));
    3416           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    3417           0 :                         zend_throw_exception_internal(NULL);
    3418           0 :                         HANDLE_EXCEPTION();
    3419             :                 }
    3420          10 :         } else if (RETURN_VALUE_USED(opline)) {
    3421           0 :                 ZVAL_FALSE(EX_VAR(opline->result.var));
    3422             :         }
    3423         572 :         ZEND_VM_SET_OPCODE(opline + 1);
    3424         572 :         ZEND_VM_CONTINUE();
    3425             : }
    3426             : 
    3427       15697 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3428             : {
    3429       15697 :         USE_OPLINE
    3430             : 
    3431             :         zval *array_ptr, *result;
    3432             :         HashTable *fe_ht;
    3433             : 
    3434             :         SAVE_OPLINE();
    3435             : 
    3436       15697 :         array_ptr = EX_CONSTANT(opline->op1);
    3437       15697 :         if (EXPECTED(Z_TYPE_P(array_ptr) == IS_ARRAY)) {
    3438       15697 :                 result = EX_VAR(opline->result.var);
    3439       15697 :                 ZVAL_COPY_VALUE(result, array_ptr);
    3440       15697 :                 if (IS_CONST != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(result)) {
    3441             :                         Z_ADDREF_P(array_ptr);
    3442             :                 }
    3443       15697 :                 Z_FE_POS_P(result) = 0;
    3444             : 
    3445       15697 :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3446           0 :         } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
    3447             :                 if (!Z_OBJCE_P(array_ptr)->get_iterator) {
    3448             :                         HashPosition pos = 0;
    3449             :                         Bucket *p;
    3450             : 
    3451             :                         result = EX_VAR(opline->result.var);
    3452             :                         ZVAL_COPY_VALUE(result, array_ptr);
    3453             :                         if (IS_CONST != IS_TMP_VAR) {
    3454             :                                 Z_ADDREF_P(array_ptr);
    3455             :                         }
    3456             :                         if (Z_OBJ_P(array_ptr)->properties
    3457             :                          && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
    3458             :                                 if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
    3459             :                                         GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
    3460             :                                 }
    3461             :                                 Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
    3462             :                         }
    3463             :                         fe_ht = Z_OBJPROP_P(array_ptr);
    3464             :                         pos = 0;
    3465             :                         p = fe_ht->arData;
    3466             :                         while (1) {
    3467             :                                 if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
    3468             : 
    3469             :                                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3470             :                                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3471             :                                 }
    3472             :                                 if ((EXPECTED(Z_TYPE(p->val) != IS_UNDEF) &&
    3473             :                                      (EXPECTED(Z_TYPE(p->val) != IS_INDIRECT) ||
    3474             :                                       EXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) != IS_UNDEF))) &&
    3475             :                                     (UNEXPECTED(!p->key) ||
    3476             :                                      EXPECTED(zend_check_property_access(Z_OBJ_P(array_ptr), p->key) == SUCCESS))) {
    3477             :                                         break;
    3478             :                                 }
    3479             :                                 pos++;
    3480             :                                 p++;
    3481             :                         }
    3482             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
    3483             : 
    3484             :                         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3485             :                 } else {
    3486             :                         zend_class_entry *ce = Z_OBJCE_P(array_ptr);
    3487             :                         zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 0);
    3488             :                         zend_bool is_empty;
    3489             : 
    3490             :                         if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
    3491             : 
    3492             :                                 if (iter) {
    3493             :                                         OBJ_RELEASE(&iter->std);
    3494             :                                 }
    3495             :                                 if (!EG(exception)) {
    3496             :                                         zend_throw_exception_ex(NULL, 0, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
    3497             :                                 }
    3498             :                                 zend_throw_exception_internal(NULL);
    3499             :                                 HANDLE_EXCEPTION();
    3500             :                         }
    3501             : 
    3502             :                         iter->index = 0;
    3503             :                         if (iter->funcs->rewind) {
    3504             :                                 iter->funcs->rewind(iter);
    3505             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3506             :                                         OBJ_RELEASE(&iter->std);
    3507             : 
    3508             :                                         HANDLE_EXCEPTION();
    3509             :                                 }
    3510             :                         }
    3511             : 
    3512             :                         is_empty = iter->funcs->valid(iter) != SUCCESS;
    3513             : 
    3514             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3515             :                                 OBJ_RELEASE(&iter->std);
    3516             : 
    3517             :                                 HANDLE_EXCEPTION();
    3518             :                         }
    3519             :                         iter->index = -1; /* will be set to 0 before using next handler */
    3520             : 
    3521             :                         ZVAL_OBJ(EX_VAR(opline->result.var), &iter->std);
    3522             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3523             : 
    3524             :                         if (is_empty) {
    3525             :                                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3526             :                         } else {
    3527             :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3528             :                         }
    3529             :                 }
    3530             :         } else {
    3531           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    3532           0 :                 ZVAL_UNDEF(EX_VAR(opline->result.var));
    3533           0 :                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3534             : 
    3535           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3536             :         }
    3537             : }
    3538             : 
    3539           3 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3540             : {
    3541           3 :         USE_OPLINE
    3542             : 
    3543             :         zval *array_ptr, *array_ref;
    3544             :         HashTable *fe_ht;
    3545           3 :         HashPosition pos = 0;
    3546             :         Bucket *p;
    3547             : 
    3548             :         SAVE_OPLINE();
    3549             : 
    3550           3 :         if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3551             :                 array_ref = array_ptr = NULL;
    3552             :                 if (Z_ISREF_P(array_ref)) {
    3553             :                         array_ptr = Z_REFVAL_P(array_ref);
    3554             :                 }
    3555             :         } else {
    3556           3 :                 array_ref = array_ptr = EX_CONSTANT(opline->op1);
    3557             :         }
    3558             : 
    3559           3 :         if (EXPECTED(Z_TYPE_P(array_ptr) == IS_ARRAY)) {
    3560           3 :                 if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3561             :                         if (array_ptr == array_ref) {
    3562             :                                 ZVAL_NEW_REF(array_ref, array_ref);
    3563             :                                 array_ptr = Z_REFVAL_P(array_ref);
    3564             :                         }
    3565             :                         Z_ADDREF_P(array_ref);
    3566             :                         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
    3567             :                 } else {
    3568           3 :                         array_ref = EX_VAR(opline->result.var);
    3569           3 :                         ZVAL_NEW_REF(array_ref, array_ptr);
    3570           3 :                         array_ptr = Z_REFVAL_P(array_ref);
    3571             :                 }
    3572             :                 if (IS_CONST == IS_CONST) {
    3573           3 :                         zval_copy_ctor_func(array_ptr);
    3574             :                 } else {
    3575             :                         SEPARATE_ARRAY(array_ptr);
    3576             :                 }
    3577           3 :                 fe_ht = Z_ARRVAL_P(array_ptr);
    3578           3 :                 p = fe_ht->arData;
    3579             :                 while (1) {
    3580           3 :                         if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
    3581             : 
    3582           0 :                                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3583           0 :                                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3584             :                         }
    3585           9 :                         if (EXPECTED(Z_TYPE(p->val) != IS_UNDEF) &&
    3586           6 :                             (EXPECTED(Z_TYPE(p->val) != IS_INDIRECT) ||
    3587           0 :                              EXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) != IS_UNDEF))) {
    3588             :                                 break;
    3589             :                         }
    3590           0 :                         pos++;
    3591           0 :                         p++;
    3592           0 :                 }
    3593           3 :                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
    3594             : 
    3595           3 :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3596           0 :         } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(array_ptr) == IS_OBJECT)) {
    3597             :                 if (!Z_OBJCE_P(array_ptr)->get_iterator) {
    3598             :                         if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    3599             :                                 if (array_ptr == array_ref) {
    3600             :                                         ZVAL_NEW_REF(array_ref, array_ref);
    3601             :                                         array_ptr = Z_REFVAL_P(array_ref);
    3602             :                                 }
    3603             :                                 Z_ADDREF_P(array_ref);
    3604             :                                 ZVAL_COPY_VALUE(EX_VAR(opline->result.var), array_ref);
    3605             :                         } else {
    3606             :                                 array_ptr = EX_VAR(opline->result.var);
    3607             :                                 ZVAL_COPY_VALUE(array_ptr, array_ref);
    3608             :                         }
    3609             :                         if (Z_OBJ_P(array_ptr)->properties
    3610             :                          && UNEXPECTED(GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties) > 1)) {
    3611             :                                 if (EXPECTED(!(GC_FLAGS(Z_OBJ_P(array_ptr)->properties) & IS_ARRAY_IMMUTABLE))) {
    3612             :                                         GC_REFCOUNT(Z_OBJ_P(array_ptr)->properties)--;
    3613             :                                 }
    3614             :                                 Z_OBJ_P(array_ptr)->properties = zend_array_dup(Z_OBJ_P(array_ptr)->properties);
    3615             :                         }
    3616             :                         fe_ht = Z_OBJPROP_P(array_ptr);
    3617             :                         p = fe_ht->arData;
    3618             :                         while (1) {
    3619             :                                 if (UNEXPECTED(pos >= fe_ht->nNumUsed)) {
    3620             : 
    3621             :                                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3622             :                                         ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3623             :                                 }
    3624             :                                 if ((EXPECTED(Z_TYPE(p->val) != IS_UNDEF) &&
    3625             :                                      (EXPECTED(Z_TYPE(p->val) != IS_INDIRECT) ||
    3626             :                                       EXPECTED(Z_TYPE_P(Z_INDIRECT(p->val)) != IS_UNDEF))) &&
    3627             :                                     (UNEXPECTED(!p->key) ||
    3628             :                                      EXPECTED(zend_check_property_access(Z_OBJ_P(array_ptr), p->key) == SUCCESS))) {
    3629             :                                         break;
    3630             :                                 }
    3631             :                                 pos++;
    3632             :                                 p++;
    3633             :                         }
    3634             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = zend_hash_iterator_add(fe_ht, pos);
    3635             : 
    3636             :                         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3637             :                 } else {
    3638             :                         zend_class_entry *ce = Z_OBJCE_P(array_ptr);
    3639             :                         zend_object_iterator *iter = ce->get_iterator(ce, array_ptr, 1);
    3640             :                         zend_bool is_empty;
    3641             : 
    3642             :                         if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
    3643             :                                 if (IS_CONST == IS_VAR) {
    3644             : 
    3645             :                                 } else {
    3646             : 
    3647             :                                 }
    3648             :                                 if (!EG(exception)) {
    3649             :                                         zend_throw_exception_ex(NULL, 0, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
    3650             :                                 }
    3651             :                                 zend_throw_exception_internal(NULL);
    3652             :                                 HANDLE_EXCEPTION();
    3653             :                         }
    3654             : 
    3655             :                         iter->index = 0;
    3656             :                         if (iter->funcs->rewind) {
    3657             :                                 iter->funcs->rewind(iter);
    3658             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3659             :                                         OBJ_RELEASE(&iter->std);
    3660             :                                         if (IS_CONST == IS_VAR) {
    3661             : 
    3662             :                                         } else {
    3663             : 
    3664             :                                         }
    3665             :                                         HANDLE_EXCEPTION();
    3666             :                                 }
    3667             :                         }
    3668             : 
    3669             :                         is_empty = iter->funcs->valid(iter) != SUCCESS;
    3670             : 
    3671             :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3672             :                                 OBJ_RELEASE(&iter->std);
    3673             :                                 if (IS_CONST == IS_VAR) {
    3674             : 
    3675             :                                 } else {
    3676             : 
    3677             :                                 }
    3678             :                                 HANDLE_EXCEPTION();
    3679             :                         }
    3680             :                         iter->index = -1; /* will be set to 0 before using next handler */
    3681             : 
    3682             :                         ZVAL_OBJ(EX_VAR(opline->result.var), &iter->std);
    3683             :                         Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3684             : 
    3685             :                         if (IS_CONST == IS_VAR) {
    3686             : 
    3687             :                         } else {
    3688             : 
    3689             :                         }
    3690             :                         if (is_empty) {
    3691             :                                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3692             :                         } else {
    3693             :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3694             :                         }
    3695             :                 }
    3696             :         } else {
    3697           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    3698           0 :                 ZVAL_UNDEF(EX_VAR(opline->result.var));
    3699           0 :                 Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1;
    3700             :                 if (IS_CONST == IS_VAR) {
    3701             : 
    3702             :                 } else {
    3703             : 
    3704             :                 }
    3705           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3706             :         }
    3707             : }
    3708             : 
    3709        1129 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3710             : {
    3711        1129 :         USE_OPLINE
    3712             : 
    3713             :         SAVE_OPLINE();
    3714             :         if (IS_CONST != IS_UNUSED) {
    3715             : 
    3716        1129 :                 zval *ptr = EX_CONSTANT(opline->op1);
    3717             : 
    3718             :                 do {
    3719        1129 :                         if (Z_TYPE_P(ptr) == IS_LONG) {
    3720          37 :                                 EG(exit_status) = Z_LVAL_P(ptr);
    3721             :                         } else {
    3722        1092 :                                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(ptr)) {
    3723             :                                         ptr = Z_REFVAL_P(ptr);
    3724             :                                         if (Z_TYPE_P(ptr) == IS_LONG) {
    3725             :                                                 EG(exit_status) = Z_LVAL_P(ptr);
    3726             :                                                 break;
    3727             :                                         }
    3728             :                                 }
    3729        1092 :                                 zend_print_variable(ptr);
    3730             :                         }
    3731             :                 } while (0);
    3732             : 
    3733             :         }
    3734        1129 :         zend_bailout();
    3735           0 :         ZEND_VM_NEXT_OPCODE(); /* Never reached */
    3736             : }
    3737             : 
    3738           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3739             : {
    3740           5 :         USE_OPLINE
    3741             : 
    3742             :         zval *value;
    3743           5 :         zval *ref = NULL;
    3744             : 
    3745             :         SAVE_OPLINE();
    3746           5 :         value = EX_CONSTANT(opline->op1);
    3747             : 
    3748           5 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    3749             :                 if (IS_CONST == IS_VAR) {
    3750             :                         ref = value;
    3751             :                 }
    3752             :                 value = Z_REFVAL_P(value);
    3753             :         }
    3754           5 :         if (i_zend_is_true(value)) {
    3755           3 :                 zval *result = EX_VAR(opline->result.var);
    3756             : 
    3757           3 :                 ZVAL_COPY_VALUE(result, value);
    3758             :                 if (IS_CONST == IS_CONST) {
    3759           3 :                         if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
    3760             :                 } else if (IS_CONST == IS_CV) {
    3761             :                         if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
    3762             :                 } else if (IS_CONST == IS_VAR && ref) {
    3763             :                         zend_reference *r = Z_REF_P(ref);
    3764             : 
    3765             :                         if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
    3766             :                                 efree_size(r, sizeof(zend_reference));
    3767             :                         } else if (Z_OPT_REFCOUNTED_P(result)) {
    3768             :                                 Z_ADDREF_P(result);
    3769             :                         }
    3770             :                 }
    3771           3 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3772             :         }
    3773             : 
    3774           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3775             : }
    3776             : 
    3777           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COALESCE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3778             : {
    3779           0 :         USE_OPLINE
    3780             : 
    3781             :         zval *value;
    3782           0 :         zval *ref = NULL;
    3783             : 
    3784             :         SAVE_OPLINE();
    3785           0 :         value = EX_CONSTANT(opline->op1);
    3786             : 
    3787           0 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && Z_ISREF_P(value)) {
    3788             :                 if (IS_CONST == IS_VAR) {
    3789             :                         ref = value;
    3790             :                 }
    3791             :                 value = Z_REFVAL_P(value);
    3792             :         }
    3793             : 
    3794           0 :         if (Z_TYPE_P(value) > IS_NULL) {
    3795           0 :                 zval *result = EX_VAR(opline->result.var);
    3796           0 :                 ZVAL_COPY_VALUE(result, value);
    3797             :                 if (IS_CONST == IS_CONST) {
    3798           0 :                         if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) Z_ADDREF_P(result);
    3799             :                 } else if (IS_CONST == IS_CV) {
    3800             :                         if (Z_OPT_REFCOUNTED_P(result)) Z_ADDREF_P(result);
    3801             :                 } else if (IS_CONST == IS_VAR && ref) {
    3802             :                         zend_reference *r = Z_REF_P(ref);
    3803             : 
    3804             :                         if (UNEXPECTED(--GC_REFCOUNT(r) == 0)) {
    3805             :                                 efree_size(r, sizeof(zend_reference));
    3806             :                         } else if (Z_OPT_REFCOUNTED_P(result)) {
    3807             :                                 Z_ADDREF_P(result);
    3808             :                         }
    3809             :                 }
    3810           0 :                 ZEND_VM_JMP(OP_JMP_ADDR(opline, opline->op2));
    3811             :         }
    3812             : 
    3813           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3814             : }
    3815             : 
    3816      542963 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3817             : {
    3818      542963 :         USE_OPLINE
    3819             : 
    3820             :         zval *value;
    3821      542963 :         zval *result = EX_VAR(opline->result.var);
    3822             : 
    3823      542963 :         value = EX_CONSTANT(opline->op1);
    3824      542963 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
    3825             :                 SAVE_OPLINE();
    3826             :                 GET_OP1_UNDEF_CV(value, BP_VAR_R);
    3827             :                 ZVAL_NULL(result);
    3828             :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3829             :         }
    3830             : 
    3831      542963 :         if (IS_CONST == IS_CV) {
    3832             :                 ZVAL_DEREF(value);
    3833             :                 ZVAL_COPY(result, value);
    3834      542963 :         } else if (IS_CONST == IS_VAR) {
    3835             :                 if (UNEXPECTED(Z_ISREF_P(value))) {
    3836             :                         ZVAL_COPY_VALUE(result, Z_REFVAL_P(value));
    3837             :                         if (UNEXPECTED(Z_DELREF_P(value) == 0)) {
    3838             :                                 efree_size(Z_REF_P(value), sizeof(zend_reference));
    3839             :                         } else if (Z_OPT_REFCOUNTED_P(result)) {
    3840             :                                 Z_ADDREF_P(result);
    3841             :                         }
    3842             :                 } else {
    3843             :                         ZVAL_COPY_VALUE(result, value);
    3844             :                 }
    3845             :         } else {
    3846      542963 :                 ZVAL_COPY_VALUE(result, value);
    3847             :                 if (IS_CONST == IS_CONST) {
    3848      542963 :                         if (UNEXPECTED(Z_OPT_REFCOUNTED_P(result))) {
    3849             :                                 Z_ADDREF_P(result);
    3850             :                         }
    3851             :                 }
    3852             :         }
    3853      542963 :         ZEND_VM_NEXT_OPCODE();
    3854             : }
    3855             : 
    3856           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_FROM_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3857             : {
    3858           5 :         USE_OPLINE
    3859             : 
    3860           5 :         zend_generator *generator = zend_get_running_generator(execute_data);
    3861             : 
    3862             :         zval *val;
    3863             : 
    3864             : 
    3865             :         SAVE_OPLINE();
    3866           5 :         val = EX_CONSTANT(opline->op1);
    3867             : 
    3868           5 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    3869           0 :                 zend_throw_error(NULL, "Cannot use \"yield from\" in a force-closed generator");
    3870             : 
    3871           0 :                 HANDLE_EXCEPTION();
    3872             :         }
    3873             : 
    3874           5 :         if (Z_TYPE_P(val) == IS_ARRAY) {
    3875           5 :                 ZVAL_COPY_VALUE(&generator->values, val);
    3876           5 :                 if (IS_CONST != IS_TMP_VAR && Z_OPT_REFCOUNTED_P(val)) {
    3877             :                         Z_ADDREF_P(val);
    3878             :                 }
    3879           5 :                 Z_FE_POS(generator->values) = 0;
    3880             : 
    3881           0 :         } else if (IS_CONST != IS_CONST && Z_TYPE_P(val) == IS_OBJECT && Z_OBJCE_P(val)->get_iterator) {
    3882             :                 zend_class_entry *ce = Z_OBJCE_P(val);
    3883             :                 if (ce == zend_ce_generator) {
    3884             :                         zend_generator *new_gen = (zend_generator *) Z_OBJ_P(val);
    3885             : 
    3886             :                         if (IS_CONST != IS_TMP_VAR) {
    3887             :                                 Z_ADDREF_P(val);
    3888             :                         }
    3889             : 
    3890             :                         if (Z_ISUNDEF(new_gen->retval)) {
    3891             :                                 if (UNEXPECTED(zend_generator_get_current(new_gen) == generator)) {
    3892             :                                         zend_throw_error(NULL, "Impossible to yield from the Generator being currently run");
    3893             :                                         zval_ptr_dtor(val);
    3894             :                                         HANDLE_EXCEPTION();
    3895             :                                 } else {
    3896             :                                         zend_generator_yield_from(generator, new_gen);
    3897             :                                 }
    3898             :                         } else if (UNEXPECTED(new_gen->execute_data == NULL)) {
    3899             :                                 zend_throw_error(NULL, "Generator passed to yield from was aborted without proper return and is unable to continue");
    3900             :                                 zval_ptr_dtor(val);
    3901             :                                 HANDLE_EXCEPTION();
    3902             :                         } else {
    3903             :                                 if (RETURN_VALUE_USED(opline)) {
    3904             :                                         ZVAL_COPY(EX_VAR(opline->result.var), &new_gen->retval);
    3905             :                                 }
    3906             :                                 ZEND_VM_NEXT_OPCODE();
    3907             :                         }
    3908             :                 } else {
    3909             :                         zend_object_iterator *iter = ce->get_iterator(ce, val, 0);
    3910             : 
    3911             :                         if (UNEXPECTED(!iter) || UNEXPECTED(EG(exception))) {
    3912             :                                 if (!EG(exception)) {
    3913             :                                         zend_throw_error(NULL, "Object of type %s did not create an Iterator", ZSTR_VAL(ce->name));
    3914             :                                 }
    3915             :                                 HANDLE_EXCEPTION();
    3916             :                         }
    3917             : 
    3918             :                         iter->index = 0;
    3919             :                         if (iter->funcs->rewind) {
    3920             :                                 iter->funcs->rewind(iter);
    3921             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3922             :                                         OBJ_RELEASE(&iter->std);
    3923             :                                         HANDLE_EXCEPTION();
    3924             :                                 }
    3925             :                         }
    3926             : 
    3927             :                         ZVAL_OBJ(&generator->values, &iter->std);
    3928             :                 }
    3929             :         } else {
    3930           0 :                 zend_throw_error(NULL, "Can use \"yield from\" only with arrays and Traversables");
    3931           0 :                 HANDLE_EXCEPTION();
    3932             :         }
    3933             : 
    3934             :         /* This is the default return value
    3935             :          * when the expression is a Generator, it will be overwritten in zend_generator_resume() */
    3936           5 :         if (RETURN_VALUE_USED(opline)) {
    3937           5 :                 ZVAL_NULL(EX_VAR(opline->result.var));
    3938             :         }
    3939             : 
    3940             :         /* This generator has no send target (though the generator we delegate to might have one) */
    3941           5 :         generator->send_target = NULL;
    3942             : 
    3943             :         /* We increment to the next op, so we are at the correct position when the
    3944             :          * generator is resumed. */
    3945           5 :         ZEND_VM_INC_OPCODE();
    3946             : 
    3947             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    3948             :          * variable in execute_data so we don't resume at an old position. */
    3949             :         SAVE_OPLINE();
    3950             : 
    3951           5 :         ZEND_VM_RETURN();
    3952             : }
    3953             : 
    3954           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3955             : {
    3956           4 :         USE_OPLINE
    3957             :         zval *value;
    3958             : 
    3959             : 
    3960             :         SAVE_OPLINE();
    3961           4 :         value = EX_CONSTANT(opline->op1);
    3962             : try_strlen:
    3963           4 :         if (EXPECTED(Z_TYPE_P(value) == IS_STRING)) {
    3964           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_STRLEN_P(value));
    3965             :         } else {
    3966             :                 zend_bool strict;
    3967             : 
    3968           4 :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(value) == IS_UNDEF)) {
    3969             :                         value = GET_OP1_UNDEF_CV(value, BP_VAR_R);
    3970             :                 }
    3971           4 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_TYPE_P(value) == IS_REFERENCE) {
    3972             :                         value = Z_REFVAL_P(value);
    3973             :                         goto try_strlen;
    3974             :                 }
    3975           4 :                 strict = EX_USES_STRICT_TYPES();
    3976             :                 do {
    3977           4 :                         if (EXPECTED(!strict)) {
    3978             :                                 zend_string *str;
    3979             :                                 zval tmp;
    3980             : 
    3981           3 :                                 ZVAL_COPY(&tmp, value);
    3982           3 :                                 if (zend_parse_arg_str_weak(&tmp, &str)) {
    3983           3 :                                         ZVAL_LONG(EX_VAR(opline->result.var), ZSTR_LEN(str));
    3984             :                                         zval_ptr_dtor(&tmp);
    3985           3 :                                         break;
    3986             :                                 }
    3987             :                                 zval_ptr_dtor(&tmp);
    3988             :                         }
    3989           1 :                         zend_internal_type_error(strict, "strlen() expects parameter 1 to be string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
    3990           1 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    3991             :                 } while (0);
    3992             :         }
    3993             : 
    3994           4 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    3995             : }
    3996             : 
    3997           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_TYPE_CHECK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3998             : {
    3999           5 :         USE_OPLINE
    4000             :         zval *value;
    4001           5 :         int result = 0;
    4002             : 
    4003             : 
    4004             :         SAVE_OPLINE();
    4005           5 :         value = EX_CONSTANT(opline->op1);
    4006           5 :         if (EXPECTED(Z_TYPE_P(value) == opline->extended_value)) {
    4007           5 :                 if (UNEXPECTED(Z_TYPE_P(value) == IS_RESOURCE)) {
    4008           0 :                         const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(value));
    4009             : 
    4010           0 :                         if (EXPECTED(type_name != NULL)) {
    4011           0 :                                 result = 1;
    4012             :                         }
    4013             :                 } else {
    4014           5 :                         result = 1;
    4015             :                 }
    4016           0 :         } else if (UNEXPECTED(opline->extended_value == _IS_BOOL) &&
    4017             :                            EXPECTED(Z_TYPE_P(value) == IS_TRUE || Z_TYPE_P(value) == IS_FALSE)) {
    4018           0 :                 result = 1;
    4019             :         }
    4020             : 
    4021           5 :         ZEND_VM_SMART_BRANCH(result, 1);
    4022           1 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4023           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4024             : }
    4025             : 
    4026          53 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DEFINED_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4027             : {
    4028          53 :         USE_OPLINE
    4029             :         zend_constant *c;
    4030             :         int result;
    4031             : 
    4032          53 :         if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
    4033           1 :                 result = 1;
    4034          52 :         } else if ((c = zend_quick_get_constant(EX_CONSTANT(opline->op1), 0)) == NULL) {
    4035          50 :                 result = 0;
    4036             :         } else {
    4037           2 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), c);
    4038           2 :                 result = 1;
    4039             :         }
    4040          53 :         ZEND_VM_SMART_BRANCH(result, 0);
    4041          13 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4042          13 :         ZEND_VM_NEXT_OPCODE();
    4043             : }
    4044             : 
    4045           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4046             : {
    4047           0 :         USE_OPLINE
    4048             : 
    4049             :         zval *value;
    4050             : 
    4051           0 :         value = EX_CONSTANT(opline->op1);
    4052           0 :         ZVAL_DOUBLE(EX_VAR(opline->result.var), Z_DVAL_P(value));
    4053           0 :         ZEND_VM_NEXT_OPCODE();
    4054             : }
    4055             : 
    4056           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_QM_ASSIGN_NOREF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4057             : {
    4058           6 :         USE_OPLINE
    4059             : 
    4060             :         zval *value;
    4061             : 
    4062           6 :         value = EX_CONSTANT(opline->op1);
    4063           6 :         ZVAL_COPY_VALUE(EX_VAR(opline->result.var), value);
    4064           6 :         ZEND_VM_NEXT_OPCODE();
    4065             : }
    4066             : 
    4067           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4068             : {
    4069           6 :         USE_OPLINE
    4070             : 
    4071             :         zval *op1, *op2, *result;
    4072             : 
    4073           6 :         op1 = EX_CONSTANT(opline->op1);
    4074           6 :         op2 = EX_CONSTANT(opline->op2);
    4075           6 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4076           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4077           0 :                         result = EX_VAR(opline->result.var);
    4078             :                         fast_long_add_function(result, op1, op2);
    4079           0 :                         ZEND_VM_NEXT_OPCODE();
    4080           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4081           0 :                         result = EX_VAR(opline->result.var);
    4082           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2));
    4083           0 :                         ZEND_VM_NEXT_OPCODE();
    4084             :                 }
    4085           6 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4086           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4087           0 :                         result = EX_VAR(opline->result.var);
    4088           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
    4089           0 :                         ZEND_VM_NEXT_OPCODE();
    4090           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4091           0 :                         result = EX_VAR(opline->result.var);
    4092           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2)));
    4093           0 :                         ZEND_VM_NEXT_OPCODE();
    4094             :                 }
    4095             :         }
    4096             : 
    4097             :         SAVE_OPLINE();
    4098           6 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4099             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4100             :         }
    4101           6 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4102             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4103             :         }
    4104           6 :         add_function(EX_VAR(opline->result.var), op1, op2);
    4105             : 
    4106             : 
    4107           6 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4108             : }
    4109             : 
    4110           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4111             : {
    4112           2 :         USE_OPLINE
    4113             : 
    4114             :         zval *op1, *op2, *result;
    4115             : 
    4116           2 :         op1 = EX_CONSTANT(opline->op1);
    4117           2 :         op2 = EX_CONSTANT(opline->op2);
    4118           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4119           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4120           0 :                         result = EX_VAR(opline->result.var);
    4121             :                         fast_long_sub_function(result, op1, op2);
    4122           0 :                         ZEND_VM_NEXT_OPCODE();
    4123           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4124           0 :                         result = EX_VAR(opline->result.var);
    4125           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2));
    4126           0 :                         ZEND_VM_NEXT_OPCODE();
    4127             :                 }
    4128           2 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4129           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4130           0 :                         result = EX_VAR(opline->result.var);
    4131           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
    4132           0 :                         ZEND_VM_NEXT_OPCODE();
    4133           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4134           0 :                         result = EX_VAR(opline->result.var);
    4135           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2)));
    4136           0 :                         ZEND_VM_NEXT_OPCODE();
    4137             :                 }
    4138             :         }
    4139             : 
    4140             :         SAVE_OPLINE();
    4141           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4142             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4143             :         }
    4144           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4145             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4146             :         }
    4147           2 :         sub_function(EX_VAR(opline->result.var), op1, op2);
    4148             : 
    4149             : 
    4150           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4151             : }
    4152             : 
    4153           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4154             : {
    4155           6 :         USE_OPLINE
    4156             : 
    4157             :         zval *op1, *op2, *result;
    4158             : 
    4159           6 :         op1 = EX_CONSTANT(opline->op1);
    4160           6 :         op2 = EX_CONSTANT(opline->op2);
    4161           6 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4162           4 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4163             :                         zend_long overflow;
    4164             : 
    4165           0 :                         result = EX_VAR(opline->result.var);
    4166           0 :                         ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
    4167           0 :                         Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
    4168           0 :                         ZEND_VM_NEXT_OPCODE();
    4169           4 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4170           0 :                         result = EX_VAR(opline->result.var);
    4171           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2));
    4172           0 :                         ZEND_VM_NEXT_OPCODE();
    4173             :                 }
    4174           2 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4175           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4176           0 :                         result = EX_VAR(opline->result.var);
    4177           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
    4178           0 :                         ZEND_VM_NEXT_OPCODE();
    4179           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4180           0 :                         result = EX_VAR(opline->result.var);
    4181           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2)));
    4182           0 :                         ZEND_VM_NEXT_OPCODE();
    4183             :                 }
    4184             :         }
    4185             : 
    4186             :         SAVE_OPLINE();
    4187           6 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4188             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4189             :         }
    4190           6 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4191             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4192             :         }
    4193           6 :         mul_function(EX_VAR(opline->result.var), op1, op2);
    4194             : 
    4195             : 
    4196           6 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4197             : }
    4198             : 
    4199           8 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4200             : {
    4201           8 :         USE_OPLINE
    4202             : 
    4203             :         zval *op1, *op2;
    4204             : 
    4205             :         SAVE_OPLINE();
    4206           8 :         op1 = EX_CONSTANT(opline->op1);
    4207           8 :         op2 = EX_CONSTANT(opline->op2);
    4208           8 :         fast_div_function(EX_VAR(opline->result.var), op1, op2);
    4209             : 
    4210             : 
    4211           8 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4212             : }
    4213             : 
    4214           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4215             : {
    4216           6 :         USE_OPLINE
    4217             : 
    4218             :         zval *op1, *op2, *result;
    4219             : 
    4220           6 :         op1 = EX_CONSTANT(opline->op1);
    4221           6 :         op2 = EX_CONSTANT(opline->op2);
    4222           6 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4223           2 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4224           1 :                         result = EX_VAR(opline->result.var);
    4225           1 :                         if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
    4226             :                                 SAVE_OPLINE();
    4227           1 :                                 zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
    4228           1 :                                 HANDLE_EXCEPTION();
    4229           0 :                         } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
    4230             :                                 /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
    4231           0 :                                 ZVAL_LONG(result, 0);
    4232             :                         } else {
    4233           0 :                                 ZVAL_LONG(result, Z_LVAL_P(op1) % Z_LVAL_P(op2));
    4234             :                         }
    4235           0 :                         ZEND_VM_NEXT_OPCODE();
    4236             :                 }
    4237             :         }
    4238             : 
    4239             :         SAVE_OPLINE();
    4240           5 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4241             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4242             :         }
    4243           5 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4244             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4245             :         }
    4246           5 :         mod_function(EX_VAR(opline->result.var), op1, op2);
    4247             : 
    4248             : 
    4249           5 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4250             : }
    4251             : 
    4252           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4253             : {
    4254           2 :         USE_OPLINE
    4255             : 
    4256             :         zval *op1, *op2;
    4257             : 
    4258           2 :         op1 = EX_CONSTANT(opline->op1);
    4259           2 :         op2 = EX_CONSTANT(opline->op2);
    4260           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    4261           2 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)
    4262           0 :                         && EXPECTED((zend_ulong)Z_LVAL_P(op2) < SIZEOF_ZEND_LONG * 8)) {
    4263           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) << Z_LVAL_P(op2));
    4264           0 :                 ZEND_VM_NEXT_OPCODE();
    4265             :         }
    4266             : 
    4267             :         SAVE_OPLINE();
    4268           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4269             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4270             :         }
    4271           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4272             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4273             :         }
    4274           2 :         shift_left_function(EX_VAR(opline->result.var), op1, op2);
    4275             : 
    4276             : 
    4277           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4278             : }
    4279             : 
    4280           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4281             : {
    4282           2 :         USE_OPLINE
    4283             : 
    4284             :         zval *op1, *op2;
    4285             : 
    4286           2 :         op1 = EX_CONSTANT(opline->op1);
    4287           2 :         op2 = EX_CONSTANT(opline->op2);
    4288           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    4289           2 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)
    4290           0 :                         && EXPECTED((zend_ulong)Z_LVAL_P(op2) < SIZEOF_ZEND_LONG * 8)) {
    4291           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) >> Z_LVAL_P(op2));
    4292           0 :                 ZEND_VM_NEXT_OPCODE();
    4293             :         }
    4294             : 
    4295             :         SAVE_OPLINE();
    4296           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4297             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4298             :         }
    4299           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4300             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4301             :         }
    4302           2 :         shift_right_function(EX_VAR(opline->result.var), op1, op2);
    4303             : 
    4304             : 
    4305           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4306             : }
    4307             : 
    4308           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4309             : {
    4310           2 :         USE_OPLINE
    4311             : 
    4312             :         zval *op1, *op2;
    4313             : 
    4314             :         SAVE_OPLINE();
    4315           2 :         op1 = EX_CONSTANT(opline->op1);
    4316           2 :         op2 = EX_CONSTANT(opline->op2);
    4317           2 :         pow_function(EX_VAR(opline->result.var), op1, op2);
    4318             : 
    4319             : 
    4320           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4321             : }
    4322             : 
    4323           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4324             : {
    4325           0 :         USE_OPLINE
    4326             : 
    4327             :         zval *op1, *op2;
    4328             : 
    4329             :         SAVE_OPLINE();
    4330           0 :         op1 = EX_CONSTANT(opline->op1);
    4331           0 :         op2 = EX_CONSTANT(opline->op2);
    4332             : 
    4333             :         do {
    4334             :                 if ((IS_CONST == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) &&
    4335             :                     (IS_CONST == IS_CONST || EXPECTED(Z_TYPE_P(op2) == IS_STRING))) {
    4336           0 :                         zend_string *op1_str = Z_STR_P(op1);
    4337           0 :                         zend_string *op2_str = Z_STR_P(op2);
    4338             :                         zend_string *str;
    4339             : 
    4340           0 :                         if (IS_CONST != IS_CONST) {
    4341             :                                 if (UNEXPECTED(ZSTR_LEN(op1_str) == 0)) {
    4342             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op2_str);
    4343             : 
    4344             :                                         break;
    4345             :                                 }
    4346             :                         }
    4347           0 :                         if (IS_CONST != IS_CONST) {
    4348             :                                 if (UNEXPECTED(ZSTR_LEN(op2_str) == 0)) {
    4349             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op1_str);
    4350             : 
    4351             :                                         break;
    4352             :                                 }
    4353             :                         }
    4354           0 :                         if (IS_CONST != IS_CONST && IS_CONST != IS_CV &&
    4355             :                             !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
    4356             :                             size_t len = ZSTR_LEN(op1_str);
    4357             : 
    4358             :                                 str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
    4359             :                                 memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
    4360             :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    4361             :                                 break;
    4362             :                         } else {
    4363           0 :                                 str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0);
    4364           0 :                                 memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str));
    4365           0 :                                 memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
    4366           0 :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    4367             :                         }
    4368             :                 } else {
    4369             :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    4370             :                                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4371             :                         }
    4372             :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    4373             :                                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4374             :                         }
    4375             :                         concat_function(EX_VAR(opline->result.var), op1, op2);
    4376             :                 }
    4377             : 
    4378             :         } while (0);
    4379             : 
    4380           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4381             : }
    4382             : 
    4383           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4384             : {
    4385           0 :         USE_OPLINE
    4386             : 
    4387             :         zval *op1, *op2;
    4388             :         int result;
    4389             : 
    4390             :         SAVE_OPLINE();
    4391           0 :         op1 = EX_CONSTANT(opline->op1);
    4392           0 :         op2 = EX_CONSTANT(opline->op2);
    4393           0 :         result = fast_is_identical_function(op1, op2);
    4394             : 
    4395             : 
    4396           0 :         ZEND_VM_SMART_BRANCH(result, 1);
    4397           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4398           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4399             : }
    4400             : 
    4401           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4402             : {
    4403           0 :         USE_OPLINE
    4404             : 
    4405             :         zval *op1, *op2;
    4406             :         int result;
    4407             : 
    4408             :         SAVE_OPLINE();
    4409           0 :         op1 = EX_CONSTANT(opline->op1);
    4410           0 :         op2 = EX_CONSTANT(opline->op2);
    4411           0 :         result = fast_is_not_identical_function(op1, op2);
    4412             : 
    4413             : 
    4414           0 :         ZEND_VM_SMART_BRANCH(result, 1);
    4415           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4416           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4417             : }
    4418             : 
    4419           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4420             : {
    4421           0 :         USE_OPLINE
    4422             : 
    4423             :         zval *op1, *op2, *result;
    4424             : 
    4425           0 :         op1 = EX_CONSTANT(opline->op1);
    4426           0 :         op2 = EX_CONSTANT(opline->op2);
    4427             :         do {
    4428             :                 int result;
    4429             : 
    4430           0 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    4431           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4432           0 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    4433           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4434           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    4435             :                         } else {
    4436           0 :                                 break;
    4437             :                         }
    4438           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    4439           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4440           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    4441           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4442           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    4443             :                         } else {
    4444           0 :                                 break;
    4445             :                         }
    4446           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    4447           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    4448           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    4449           0 :                                         result = 1;
    4450           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    4451           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    4452           0 :                                                 result = 0;
    4453             :                                         } else {
    4454           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    4455             :                                         }
    4456             :                                 } else {
    4457           0 :                                         result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
    4458             :                                 }
    4459             : 
    4460             : 
    4461             :                         } else {
    4462           0 :                                 break;
    4463             :                         }
    4464             :                 } else {
    4465           0 :                         break;
    4466             :                 }
    4467           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4468           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4469           0 :                 ZEND_VM_NEXT_OPCODE();
    4470             :         } while (0);
    4471             : 
    4472             :         SAVE_OPLINE();
    4473           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    4474             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4475             :         }
    4476           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    4477             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4478             :         }
    4479           0 :         result = EX_VAR(opline->result.var);
    4480           0 :         compare_function(result, op1, op2);
    4481           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    4482             : 
    4483             : 
    4484           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4485             : }
    4486             : 
    4487           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4488             : {
    4489           0 :         USE_OPLINE
    4490             : 
    4491             :         zval *op1, *op2, *result;
    4492             : 
    4493           0 :         op1 = EX_CONSTANT(opline->op1);
    4494           0 :         op2 = EX_CONSTANT(opline->op2);
    4495             :         do {
    4496             :                 int result;
    4497             : 
    4498           0 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    4499           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4500           0 :                                 result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
    4501           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4502           0 :                                 result = ((double)Z_LVAL_P(op1) != Z_DVAL_P(op2));
    4503             :                         } else {
    4504           0 :                                 break;
    4505             :                         }
    4506           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    4507           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    4508           0 :                                 result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
    4509           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    4510           0 :                                 result = (Z_DVAL_P(op1) != ((double)Z_LVAL_P(op2)));
    4511             :                         } else {
    4512           0 :                                 break;
    4513             :                         }
    4514           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    4515           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    4516           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    4517           0 :                                         result = 0;
    4518           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    4519           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    4520           0 :                                                 result = 1;
    4521             :                                         } else {
    4522           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
    4523             :                                         }
    4524             :                                 } else {
    4525           0 :                                         result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
    4526             :                                 }
    4527             : 
    4528             : 
    4529             :                         } else {
    4530           0 :                                 break;
    4531             :                         }
    4532             :                 } else {
    4533           0 :                         break;
    4534             :                 }
    4535           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4536           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4537           0 :                 ZEND_VM_NEXT_OPCODE();
    4538             :         } while (0);
    4539             : 
    4540             :         SAVE_OPLINE();
    4541           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    4542             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4543             :         }
    4544           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    4545             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4546             :         }
    4547           0 :         result = EX_VAR(opline->result.var);
    4548           0 :         compare_function(result, op1, op2);
    4549           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
    4550             : 
    4551             : 
    4552           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4553             : }
    4554             : 
    4555           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4556             : {
    4557           0 :         USE_OPLINE
    4558             : 
    4559             :         zval *op1, *op2, *result;
    4560             : 
    4561           0 :         op1 = EX_CONSTANT(opline->op1);
    4562           0 :         op2 = EX_CONSTANT(opline->op2);
    4563             :         do {
    4564             :                 int result;
    4565             : 
    4566           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4567           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4568           0 :                                 result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
    4569           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4570           0 :                                 result = ((double)Z_LVAL_P(op1) < Z_DVAL_P(op2));
    4571             :                         } else {
    4572           0 :                                 break;
    4573             :                         }
    4574           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4575           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4576           0 :                                 result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
    4577           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4578           0 :                                 result = (Z_DVAL_P(op1) < ((double)Z_LVAL_P(op2)));
    4579             :                         } else {
    4580           0 :                                 break;
    4581             :                         }
    4582             :                 } else {
    4583           0 :                         break;
    4584             :                 }
    4585           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4586           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4587           0 :                 ZEND_VM_NEXT_OPCODE();
    4588             :         } while (0);
    4589             : 
    4590             :         SAVE_OPLINE();
    4591           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4592             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4593             :         }
    4594           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4595             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4596             :         }
    4597           0 :         result = EX_VAR(opline->result.var);
    4598           0 :         compare_function(result, op1, op2);
    4599           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
    4600             : 
    4601             : 
    4602           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4603             : }
    4604             : 
    4605           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4606             : {
    4607           0 :         USE_OPLINE
    4608             : 
    4609             :         zval *op1, *op2, *result;
    4610             : 
    4611           0 :         op1 = EX_CONSTANT(opline->op1);
    4612           0 :         op2 = EX_CONSTANT(opline->op2);
    4613             :         do {
    4614             :                 int result;
    4615             : 
    4616           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    4617           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4618           0 :                                 result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
    4619           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4620           0 :                                 result = ((double)Z_LVAL_P(op1) <= Z_DVAL_P(op2));
    4621             :                         } else {
    4622           0 :                                 break;
    4623             :                         }
    4624           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    4625           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    4626           0 :                                 result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
    4627           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4628           0 :                                 result = (Z_DVAL_P(op1) <= ((double)Z_LVAL_P(op2)));
    4629             :                         } else {
    4630           0 :                                 break;
    4631             :                         }
    4632             :                 } else {
    4633           0 :                         break;
    4634             :                 }
    4635           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    4636           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    4637           0 :                 ZEND_VM_NEXT_OPCODE();
    4638             :         } while (0);
    4639             : 
    4640             :         SAVE_OPLINE();
    4641           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4642             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4643             :         }
    4644           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4645             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4646             :         }
    4647           0 :         result = EX_VAR(opline->result.var);
    4648           0 :         compare_function(result, op1, op2);
    4649           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
    4650             : 
    4651             : 
    4652           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4653             : }
    4654             : 
    4655           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4656             : {
    4657           0 :         USE_OPLINE
    4658             : 
    4659             :         zval *op1, *op2;
    4660             : 
    4661             :         SAVE_OPLINE();
    4662           0 :         op1 = EX_CONSTANT(opline->op1);
    4663           0 :         op2 = EX_CONSTANT(opline->op2);
    4664           0 :         compare_function(EX_VAR(opline->result.var), op1, op2);
    4665             : 
    4666             : 
    4667           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4668             : }
    4669             : 
    4670           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4671             : {
    4672           6 :         USE_OPLINE
    4673             : 
    4674             :         zval *op1, *op2;
    4675             : 
    4676           6 :         op1 = EX_CONSTANT(opline->op1);
    4677           6 :         op2 = EX_CONSTANT(opline->op2);
    4678           8 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    4679           8 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4680           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) | Z_LVAL_P(op2));
    4681           0 :                 ZEND_VM_NEXT_OPCODE();
    4682             :         }
    4683             : 
    4684             :         SAVE_OPLINE();
    4685           6 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4686             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4687             :         }
    4688           6 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4689             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4690             :         }
    4691           6 :         bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
    4692             : 
    4693             : 
    4694           6 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4695             : }
    4696             : 
    4697           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4698             : {
    4699           4 :         USE_OPLINE
    4700             : 
    4701             :         zval *op1, *op2;
    4702             : 
    4703           4 :         op1 = EX_CONSTANT(opline->op1);
    4704           4 :         op2 = EX_CONSTANT(opline->op2);
    4705           6 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    4706           6 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4707           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) & Z_LVAL_P(op2));
    4708           0 :                 ZEND_VM_NEXT_OPCODE();
    4709             :         }
    4710             : 
    4711             :         SAVE_OPLINE();
    4712           4 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4713             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4714             :         }
    4715           4 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4716             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4717             :         }
    4718           4 :         bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
    4719             : 
    4720             : 
    4721           4 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4722             : }
    4723             : 
    4724           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4725             : {
    4726           4 :         USE_OPLINE
    4727             : 
    4728             :         zval *op1, *op2;
    4729             : 
    4730           4 :         op1 = EX_CONSTANT(opline->op1);
    4731           4 :         op2 = EX_CONSTANT(opline->op2);
    4732           6 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    4733           6 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    4734           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) ^ Z_LVAL_P(op2));
    4735           0 :                 ZEND_VM_NEXT_OPCODE();
    4736             :         }
    4737             : 
    4738             :         SAVE_OPLINE();
    4739           4 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    4740             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    4741             :         }
    4742           4 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    4743             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    4744             :         }
    4745           4 :         bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
    4746             : 
    4747             : 
    4748           4 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4749             : }
    4750             : 
    4751           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4752             : {
    4753           0 :         USE_OPLINE
    4754             : 
    4755             :         zval *op1, *op2;
    4756             : 
    4757             :         SAVE_OPLINE();
    4758           0 :         op1 = EX_CONSTANT(opline->op1);
    4759           0 :         op2 = EX_CONSTANT(opline->op2);
    4760           0 :         boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
    4761             : 
    4762             : 
    4763           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4764             : }
    4765             : 
    4766         369 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CONST_CONST(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    4767             : {
    4768         369 :         USE_OPLINE
    4769             : 
    4770             :         zval *varname;
    4771             :         zval *retval;
    4772             :         zend_string *name;
    4773             :         zend_class_entry *ce;
    4774             : 
    4775             :         SAVE_OPLINE();
    4776         369 :         varname = EX_CONSTANT(opline->op1);
    4777             : 
    4778             :         if (IS_CONST == IS_CONST) {
    4779         369 :                 name = Z_STR_P(varname);
    4780             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    4781             :                 name = Z_STR_P(varname);
    4782             :                 zend_string_addref(name);
    4783             :         } else {
    4784             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    4785             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    4786             :                 }
    4787             :                 name = zval_get_string(varname);
    4788             :         }
    4789             : 
    4790             :         if (IS_CONST == IS_CONST) {
    4791         369 :                 if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
    4792          75 :                         retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    4793             : 
    4794             :                         /* check if static properties were destoyed */
    4795          75 :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    4796           0 :                                 zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
    4797             : 
    4798           0 :                                 HANDLE_EXCEPTION();
    4799             :                         }
    4800             : 
    4801          75 :                         goto fetch_static_prop_return;
    4802         294 :                 } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
    4803         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);
    4804         291 :                         if (UNEXPECTED(ce == NULL)) {
    4805           2 :                                 if (IS_CONST != IS_CONST) {
    4806             :                                         zend_string_release(name);
    4807             :                                 }
    4808             : 
    4809           2 :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4810             :                         }
    4811         289 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    4812             :                 }
    4813             :         } else {
    4814             :                 if (IS_CONST == IS_UNUSED) {
    4815             :                         ce = zend_fetch_class(NULL, opline->op2.num);
    4816             :                         if (UNEXPECTED(ce == NULL)) {
    4817             :                                 ZEND_ASSERT(EG(exception));
    4818             :                                 if (IS_CONST != IS_CONST) {
    4819             :                                         zend_string_release(name);
    4820             :                                 }
    4821             : 
    4822             :                                 HANDLE_EXCEPTION();
    4823             :                         }
    4824             :                 } else {
    4825             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    4826             :                 }
    4827             :                 if (IS_CONST == IS_CONST &&
    4828             :                     (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    4829             : 
    4830             :                         /* check if static properties were destoyed */
    4831             :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    4832             :                                 zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
    4833             : 
    4834             :                                 HANDLE_EXCEPTION();
    4835             :                         }
    4836             : 
    4837             :                         goto fetch_static_prop_return;
    4838             :                 }
    4839             :         }
    4840         292 :         retval = zend_std_get_static_property(ce, name, 0);
    4841         292 :         if (UNEXPECTED(EG(exception))) {
    4842          12 :                 if (IS_CONST != IS_CONST) {
    4843             :                         zend_string_release(name);
    4844             :                 }
    4845             : 
    4846          12 :                 HANDLE_EXCEPTION();
    4847             :         }
    4848         280 :         if (IS_CONST == IS_CONST && retval) {
    4849         280 :                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
    4850             :         }
    4851             : 
    4852         280 :         if (IS_CONST != IS_CONST) {
    4853             :                 zend_string_release(name);
    4854             :         }
    4855             : 
    4856             : fetch_static_prop_return:
    4857             :         ZEND_ASSERT(retval != NULL);
    4858         632 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    4859         792 :                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    4860             :         } else {
    4861          78 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    4862             :         }
    4863         355 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4864             : }
    4865             : 
    4866         250 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4867             : {
    4868         250 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4869             : }
    4870             : 
    4871          67 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4872             : {
    4873          67 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4874             : }
    4875             : 
    4876          14 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4877             : {
    4878          14 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4879             : }
    4880             : 
    4881          36 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4882             : {
    4883          36 :         USE_OPLINE
    4884             : 
    4885          72 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    4886           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4887             :         } else {
    4888          36 :                 ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4889             :         }
    4890             : }
    4891             : 
    4892           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4893             : {
    4894           2 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4895             : }
    4896             : 
    4897           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4898             : {
    4899           0 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_CONST(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    4900             : }
    4901             : 
    4902          16 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4903             : {
    4904          16 :         USE_OPLINE
    4905             : 
    4906             :         zval *container, *dim, *value, *result;
    4907             : 
    4908             :         SAVE_OPLINE();
    4909          16 :         container = EX_CONSTANT(opline->op1);
    4910          16 :         dim = EX_CONSTANT(opline->op2);
    4911          16 :         if (IS_CONST != IS_CONST) {
    4912             :                 if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    4913             : fetch_dim_r_array:
    4914             :                         value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CONST, BP_VAR_R);
    4915             :                         result = EX_VAR(opline->result.var);
    4916             :                         ZVAL_COPY_UNREF(result, value);
    4917             :                 } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
    4918             :                         container = Z_REFVAL_P(container);
    4919             :                         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    4920             :                                 goto fetch_dim_r_array;
    4921             :                         } else {
    4922             :                                 goto fetch_dim_r_slow;
    4923             :                         }
    4924             :                 } else {
    4925             : fetch_dim_r_slow:
    4926             :                         result = EX_VAR(opline->result.var);
    4927             :                         zend_fetch_dimension_address_read_R_slow(result, container, dim);
    4928             :                 }
    4929             :         } else {
    4930          16 :                 result = EX_VAR(opline->result.var);
    4931          16 :                 zend_fetch_dimension_address_read_R(result, container, dim, IS_CONST);
    4932             :         }
    4933             : 
    4934             : 
    4935          16 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4936             : }
    4937             : 
    4938           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4939             : {
    4940           2 :         USE_OPLINE
    4941             : 
    4942             :         zval *container;
    4943             : 
    4944             :         SAVE_OPLINE();
    4945           2 :         container = EX_CONSTANT(opline->op1);
    4946           2 :         zend_fetch_dimension_address_read_IS(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    4947             : 
    4948             : 
    4949           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4950             : }
    4951             : 
    4952           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4953             : {
    4954           1 :         USE_OPLINE
    4955             :         zval *container;
    4956             :         zend_free_op free_op1;
    4957             : 
    4958             :         SAVE_OPLINE();
    4959             : 
    4960           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    4961             :         if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
    4962           1 :             zend_throw_error(NULL, "Cannot use temporary expression in write context");
    4963             : 
    4964             : 
    4965           1 :                         HANDLE_EXCEPTION();
    4966             :         }
    4967             :                 container = NULL;
    4968             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    4969             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    4970             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    4971             :                 }
    4972             : 
    4973             : 
    4974             :         } else {
    4975           0 :                 if (IS_CONST == IS_UNUSED) {
    4976             :                         zend_throw_error(NULL, "Cannot use [] for reading");
    4977             : 
    4978             : 
    4979             :                         HANDLE_EXCEPTION();
    4980             :                 }
    4981           0 :                 container = EX_CONSTANT(opline->op1);
    4982           0 :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2), IS_CONST);
    4983             : 
    4984             : 
    4985             :         }
    4986           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    4987             : }
    4988             : 
    4989           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4990             : {
    4991           1 :         USE_OPLINE
    4992             : 
    4993             :         zval *container;
    4994             : 
    4995             :         zval *offset;
    4996             : 
    4997             :         SAVE_OPLINE();
    4998           1 :         container = EX_CONSTANT(opline->op1);
    4999             : 
    5000           1 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    5001             :                 zend_throw_error(NULL, "Using $this when not in object context");
    5002             : 
    5003             :                 HANDLE_EXCEPTION();
    5004             :         }
    5005             : 
    5006           1 :         offset = EX_CONSTANT(opline->op2);
    5007             : 
    5008             :         if (IS_CONST == IS_CONST ||
    5009             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    5010           1 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    5011             :                         container = Z_REFVAL_P(container);
    5012             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    5013             :                                 goto fetch_obj_r_no_object;
    5014             :                         }
    5015             :                 } else {
    5016           1 :                         goto fetch_obj_r_no_object;
    5017             :                 }
    5018             :         }
    5019             : 
    5020             :         /* here we are sure we are dealing with an object */
    5021             :         do {
    5022             :                 zend_object *zobj = Z_OBJ_P(container);
    5023             :                 zval *retval;
    5024             : 
    5025             :                 if (IS_CONST == IS_CONST &&
    5026             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5027             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    5028             : 
    5029             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    5030             :                                 retval = OBJ_PROP(zobj, prop_offset);
    5031             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5032             :                                         ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    5033             :                                         break;
    5034             :                                 }
    5035             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    5036             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5037             :                                 if (EXPECTED(retval)) {
    5038             :                                         ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    5039             :                                         break;
    5040             :                                 }
    5041             :                         }
    5042             :                 }
    5043             : 
    5044             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    5045             : fetch_obj_r_no_object:
    5046           1 :                         zend_error(E_NOTICE, "Trying to get property of non-object");
    5047           1 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    5048             :                 } else {
    5049             :                         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));
    5050             : 
    5051             :                         if (retval != EX_VAR(opline->result.var)) {
    5052             :                                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    5053             :                         }
    5054             :                 }
    5055             :         } while (0);
    5056             : 
    5057             : 
    5058           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5059             : }
    5060             : 
    5061           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5062             : {
    5063           1 :         USE_OPLINE
    5064             : 
    5065             :         zval *container;
    5066             : 
    5067             :         zval *offset;
    5068             : 
    5069             :         SAVE_OPLINE();
    5070           1 :         container = EX_CONSTANT(opline->op1);
    5071             : 
    5072           1 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    5073             :                 zend_throw_error(NULL, "Using $this when not in object context");
    5074             : 
    5075             :                 HANDLE_EXCEPTION();
    5076             :         }
    5077             : 
    5078           1 :         offset  = EX_CONSTANT(opline->op2);
    5079             : 
    5080             :         if (IS_CONST == IS_CONST ||
    5081             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    5082           1 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    5083             :                         container = Z_REFVAL_P(container);
    5084             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    5085             :                                 goto fetch_obj_is_no_object;
    5086             :                         }
    5087             :                 } else {
    5088           1 :                         goto fetch_obj_is_no_object;
    5089             :                 }
    5090             :         }
    5091             : 
    5092             :         /* here we are sure we are dealing with an object */
    5093             :         do {
    5094             :                 zend_object *zobj = Z_OBJ_P(container);
    5095             :                 zval *retval;
    5096             : 
    5097             :                 if (IS_CONST == IS_CONST &&
    5098             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    5099             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    5100             : 
    5101             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    5102             :                                 retval = OBJ_PROP(zobj, prop_offset);
    5103             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    5104             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5105             :                                         break;
    5106             :                                 }
    5107             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    5108             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    5109             :                                 if (EXPECTED(retval)) {
    5110             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5111             :                                         break;
    5112             :                                 }
    5113             :                         }
    5114             :                 }
    5115             : 
    5116             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    5117             : fetch_obj_is_no_object:
    5118           1 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    5119             :                 } else {
    5120             : 
    5121             :                         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));
    5122             : 
    5123             :                         if (retval != EX_VAR(opline->result.var)) {
    5124             :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    5125             :                         }
    5126             :                 }
    5127             :         } while (0);
    5128             : 
    5129             : 
    5130           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5131             : }
    5132             : 
    5133           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5134             : {
    5135           1 :         USE_OPLINE
    5136             :         zval *container;
    5137             : 
    5138           2 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    5139             :                 /* Behave like FETCH_OBJ_W */
    5140             :                 zend_free_op free_op1;
    5141             :                 zval *property;
    5142             : 
    5143             :                 SAVE_OPLINE();
    5144           1 :                 property = EX_CONSTANT(opline->op2);
    5145           1 :                 container = NULL;
    5146             : 
    5147           1 :                 if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    5148             :                         zend_throw_error(NULL, "Using $this when not in object context");
    5149             : 
    5150             :                         HANDLE_EXCEPTION();
    5151             :                 }
    5152             :                 if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
    5153           1 :                         zend_throw_error(NULL, "Cannot use temporary expression in write context");
    5154             : 
    5155             : 
    5156           1 :                         HANDLE_EXCEPTION();
    5157             :                 }
    5158             :                 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);
    5159             : 
    5160             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    5161             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    5162             :                 }
    5163             : 
    5164             :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5165             :         } else {
    5166           0 :                 ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    5167             :         }
    5168             : }
    5169             : 
    5170          45 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5171             : {
    5172          45 :         USE_OPLINE
    5173             : 
    5174             :         zval *container;
    5175             : 
    5176             :         SAVE_OPLINE();
    5177          45 :         container = EX_CONSTANT(opline->op1);
    5178          45 :         zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, EX_CONSTANT(opline->op2));
    5179             : 
    5180          45 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5181             : }
    5182             : 
    5183           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5184             : {
    5185           0 :         USE_OPLINE
    5186             : 
    5187             :         zval *op1, *op2;
    5188             :         zend_string *op1_str, *op2_str, *str;
    5189             : 
    5190             :         SAVE_OPLINE();
    5191           0 :         op1 = EX_CONSTANT(opline->op1);
    5192             :         if (IS_CONST == IS_CONST) {
    5193           0 :                 op1_str = Z_STR_P(op1);
    5194             :         } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    5195             :                 op1_str = zend_string_copy(Z_STR_P(op1));
    5196             :         } else {
    5197             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    5198             :                         GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    5199             :                 }
    5200             :                 op1_str = _zval_get_string_func(op1);
    5201             :         }
    5202           0 :         op2 = EX_CONSTANT(opline->op2);
    5203             :         if (IS_CONST == IS_CONST) {
    5204           0 :                 op2_str = Z_STR_P(op2);
    5205             :         } else if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    5206             :                 op2_str = zend_string_copy(Z_STR_P(op2));
    5207             :         } else {
    5208             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    5209             :                         GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    5210             :                 }
    5211             :                 op2_str = _zval_get_string_func(op2);
    5212             :         }
    5213             :         do {
    5214           0 :                 if (IS_CONST != IS_CONST) {
    5215             :                         if (UNEXPECTED(ZSTR_LEN(op1_str) == 0)) {
    5216             :                                 if (IS_CONST == IS_CONST) {
    5217             :                                         zend_string_addref(op2_str);
    5218             :                                 }
    5219             :                                 ZVAL_STR(EX_VAR(opline->result.var), op2_str);
    5220             :                                 zend_string_release(op1_str);
    5221             :                                 break;
    5222             :                         }
    5223             :                 }
    5224           0 :                 if (IS_CONST != IS_CONST) {
    5225             :                         if (UNEXPECTED(ZSTR_LEN(op2_str) == 0)) {
    5226             :                                 if (IS_CONST == IS_CONST) {
    5227             :                                         zend_string_addref(op1_str);
    5228             :                                 }
    5229             :                                 ZVAL_STR(EX_VAR(opline->result.var), op1_str);
    5230             :                                 zend_string_release(op2_str);
    5231             :                                 break;
    5232             :                         }
    5233             :                 }
    5234           0 :                 str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0);
    5235           0 :                 memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str));
    5236           0 :                 memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
    5237           0 :                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    5238           0 :                 if (IS_CONST != IS_CONST) {
    5239             :                         zend_string_release(op1_str);
    5240             :                 }
    5241           0 :                 if (IS_CONST != IS_CONST) {
    5242             :                         zend_string_release(op2_str);
    5243             :                 }
    5244             :         } while (0);
    5245             : 
    5246             : 
    5247           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5248             : }
    5249             : 
    5250           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5251             : {
    5252           1 :         USE_OPLINE
    5253             :         zval *function_name;
    5254             : 
    5255             :         zval *object;
    5256             :         zend_function *fbc;
    5257             :         zend_class_entry *called_scope;
    5258             :         zend_object *obj;
    5259             :         zend_execute_data *call;
    5260             :         uint32_t call_info;
    5261             : 
    5262             :         SAVE_OPLINE();
    5263             : 
    5264           1 :         function_name = EX_CONSTANT(opline->op2);
    5265             : 
    5266           1 :         if (IS_CONST != IS_CONST &&
    5267             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5268             :                 do {
    5269             :                         if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(function_name)) {
    5270             :                                 function_name = Z_REFVAL_P(function_name);
    5271             :                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    5272             :                                         break;
    5273             :                                 }
    5274             :                         } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    5275             :                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    5276             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5277             :                                         HANDLE_EXCEPTION();
    5278             :                                 }
    5279             :                         }
    5280             :                         zend_throw_error(NULL, "Method name must be a string");
    5281             : 
    5282             : 
    5283             :                         HANDLE_EXCEPTION();
    5284             :                 } while (0);
    5285             :         }
    5286             : 
    5287           1 :         object = EX_CONSTANT(opline->op1);
    5288             : 
    5289           1 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
    5290             :                 zend_throw_error(NULL, "Using $this when not in object context");
    5291             : 
    5292             :                 HANDLE_EXCEPTION();
    5293             :         }
    5294             : 
    5295             :         if (IS_CONST != IS_UNUSED) {
    5296             :                 do {
    5297             :                         if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
    5298           1 :                                 if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(object))) {
    5299             :                                         object = Z_REFVAL_P(object);
    5300             :                                         if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
    5301             :                                                 break;
    5302             :                                         }
    5303             :                                 }
    5304           1 :                                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
    5305             :                                         object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
    5306             :                                         if (UNEXPECTED(EG(exception) != NULL)) {
    5307             : 
    5308             :                                                 HANDLE_EXCEPTION();
    5309             :                                         }
    5310             :                                 }
    5311           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)));
    5312             : 
    5313             : 
    5314           1 :                                 HANDLE_EXCEPTION();
    5315             :                         }
    5316             :                 } while (0);
    5317             :         }
    5318             : 
    5319             :         obj = Z_OBJ_P(object);
    5320             :         called_scope = obj->ce;
    5321             : 
    5322             :         if (IS_CONST != IS_CONST ||
    5323             :             UNEXPECTED((fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope)) == NULL)) {
    5324             :             zend_object *orig_obj = obj;
    5325             : 
    5326             :                 if (UNEXPECTED(obj->handlers->get_method == NULL)) {
    5327             :                         zend_throw_error(NULL, "Object does not support method calls");
    5328             : 
    5329             : 
    5330             :                         HANDLE_EXCEPTION();
    5331             :                 }
    5332             : 
    5333             :                 /* First, locate the function. */
    5334             :                 fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    5335             :                 if (UNEXPECTED(fbc == NULL)) {
    5336             :                         if (EXPECTED(!EG(exception))) {
    5337             :                                 zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
    5338             :                         }
    5339             : 
    5340             : 
    5341             :                         HANDLE_EXCEPTION();
    5342             :                 }
    5343             :                 if (IS_CONST == IS_CONST &&
    5344             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    5345             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE))) &&
    5346             :                     EXPECTED(obj == orig_obj)) {
    5347             :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
    5348             :                 }
    5349             :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    5350             :                         init_func_run_time_cache(&fbc->op_array);
    5351             :                 }
    5352             :         }
    5353             : 
    5354             :         call_info = ZEND_CALL_NESTED_FUNCTION;
    5355             :         if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0)) {
    5356             :                 obj = NULL;
    5357             :         } else if (IS_CONST & (IS_VAR|IS_TMP_VAR|IS_CV)) {
    5358             :                 /* CV may be changed indirectly (e.g. when it's a reference) */
    5359             :                 call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_RELEASE_THIS;
    5360             :                 GC_REFCOUNT(obj)++; /* For $this pointer */
    5361             :         }
    5362             : 
    5363             :         call = zend_vm_stack_push_call_frame(call_info,
    5364             :                 fbc, opline->extended_value, called_scope, obj);
    5365             :         call->prev_execute_data = EX(call);
    5366             :         EX(call) = call;
    5367             : 
    5368             : 
    5369             :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5370             : }
    5371             : 
    5372        6245 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5373             : {
    5374        6245 :         USE_OPLINE
    5375             :         zval *function_name;
    5376             :         zend_class_entry *ce;
    5377             :         zend_object *object;
    5378             :         zend_function *fbc;
    5379             :         zend_execute_data *call;
    5380             : 
    5381             :         SAVE_OPLINE();
    5382             : 
    5383             :         if (IS_CONST == IS_CONST) {
    5384             :                 /* no function found. try a static method in class */
    5385        6245 :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5386        6245 :                 if (UNEXPECTED(ce == NULL)) {
    5387        3506 :                         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);
    5388        3506 :                         if (UNEXPECTED(ce == NULL)) {
    5389           3 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5390           3 :                                         HANDLE_EXCEPTION();
    5391             :                                 }
    5392           0 :                                 zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    5393           0 :                                 HANDLE_EXCEPTION();
    5394             :                         }
    5395        3503 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    5396             :                 }
    5397             :         } else if (IS_CONST == IS_UNUSED) {
    5398             :                 ce = zend_fetch_class(NULL, opline->op1.num);
    5399             :                 if (UNEXPECTED(ce == NULL)) {
    5400             :                         ZEND_ASSERT(EG(exception));
    5401             : 
    5402             :                         HANDLE_EXCEPTION();
    5403             :                 }
    5404             :         } else {
    5405             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    5406             :         }
    5407             : 
    5408        6242 :         if (IS_CONST == IS_CONST &&
    5409             :             IS_CONST == IS_CONST &&
    5410        6242 :             EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
    5411             :                 /* nothing to do */
    5412        3517 :         } else if (IS_CONST != IS_CONST &&
    5413             :                    IS_CONST == IS_CONST &&
    5414             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
    5415             :                 /* do nothing */
    5416             :         } else if (IS_CONST != IS_UNUSED) {
    5417             : 
    5418             : 
    5419        3517 :                 function_name = EX_CONSTANT(opline->op2);
    5420        3517 :                 if (IS_CONST != IS_CONST) {
    5421             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5422             :                                 do {
    5423             :                                         if (IS_CONST & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
    5424             :                                                 function_name = Z_REFVAL_P(function_name);
    5425             :                                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    5426             :                                                         break;
    5427             :                                                 }
    5428             :                                         } else if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    5429             :                                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    5430             :                                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5431             :                                                         HANDLE_EXCEPTION();
    5432             :                                                 }
    5433             :                                         }
    5434             :                                         zend_throw_error(NULL, "Function name must be a string");
    5435             : 
    5436             :                                         HANDLE_EXCEPTION();
    5437             :                                 } while (0);
    5438             :                         }
    5439             :                 }
    5440             : 
    5441        3517 :                 if (ce->get_static_method) {
    5442           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name));
    5443             :                 } else {
    5444        3517 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CONST == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    5445             :                 }
    5446        3517 :                 if (UNEXPECTED(fbc == NULL)) {
    5447          11 :                         if (EXPECTED(!EG(exception))) {
    5448           4 :                                 zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
    5449             :                         }
    5450             : 
    5451          11 :                         HANDLE_EXCEPTION();
    5452             :                 }
    5453        7012 :                 if (IS_CONST == IS_CONST &&
    5454        3506 :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    5455        3506 :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
    5456             :                         if (IS_CONST == IS_CONST) {
    5457        3477 :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    5458             :                         } else {
    5459             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    5460             :                         }
    5461             :                 }
    5462        3506 :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    5463        2348 :                         init_func_run_time_cache(&fbc->op_array);
    5464             :                 }
    5465             :                 if (IS_CONST != IS_CONST) {
    5466             : 
    5467             :                 }
    5468             :         } else {
    5469             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    5470             :                         zend_throw_error(NULL, "Cannot call constructor");
    5471             :                         HANDLE_EXCEPTION();
    5472             :                 }
    5473             :                 if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    5474             :                         zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
    5475             :                         HANDLE_EXCEPTION();
    5476             :                 }
    5477             :                 fbc = ce->constructor;
    5478             :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    5479             :                         init_func_run_time_cache(&fbc->op_array);
    5480             :                 }
    5481             :         }
    5482             : 
    5483        6231 :         object = NULL;
    5484        6231 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    5485         229 :                 if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
    5486          59 :                         object = Z_OBJ(EX(This));
    5487          59 :                         ce = object->ce;
    5488             :                 } else {
    5489          26 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5490             :                                 /* Allowed for PHP 4 compatibility. */
    5491          36 :                                 zend_error(
    5492             :                                         E_DEPRECATED,
    5493             :                                         "Non-static method %s::%s() should not be called statically",
    5494          36 :                                         ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
    5495          18 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5496           1 :                                         HANDLE_EXCEPTION();
    5497             :                                 }
    5498             :                         } else {
    5499             :                                 /* An internal function assumes $this is present and won't check that.
    5500             :                                  * So PHP would crash by allowing the call. */
    5501          16 :                                 zend_throw_error(
    5502             :                                         zend_ce_error,
    5503             :                                         "Non-static method %s::%s() cannot be called statically",
    5504          16 :                                         ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
    5505           8 :                                 HANDLE_EXCEPTION();
    5506             :                         }
    5507             :                 }
    5508             :         }
    5509             : 
    5510        6222 :         if (IS_CONST == IS_UNUSED) {
    5511             :                 /* previous opcode is ZEND_FETCH_CLASS */
    5512             :                 if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
    5513             :                     (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
    5514             :                         if (Z_TYPE(EX(This)) == IS_OBJECT) {
    5515             :                                 ce = Z_OBJCE(EX(This));
    5516             :                         } else {
    5517             :                                 ce = Z_CE(EX(This));
    5518             :                         }
    5519             :                 }
    5520             :         }
    5521             : 
    5522       12444 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    5523             :                 fbc, opline->extended_value, ce, object);
    5524        6222 :         call->prev_execute_data = EX(call);
    5525        6222 :         EX(call) = call;
    5526             : 
    5527        6222 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5528             : }
    5529             : 
    5530          75 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5531             : {
    5532          75 :         USE_OPLINE
    5533             : 
    5534             :         zval *function_name;
    5535             :         zend_fcall_info_cache fcc;
    5536          75 :         char *error = NULL;
    5537             :         zend_function *func;
    5538             :         zend_class_entry *called_scope;
    5539             :         zend_object *object;
    5540             :         zend_execute_data *call;
    5541          75 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
    5542             : 
    5543             :         SAVE_OPLINE();
    5544          75 :         function_name = EX_CONSTANT(opline->op2);
    5545          75 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
    5546          66 :                 func = fcc.function_handler;
    5547          66 :                 called_scope = fcc.called_scope;
    5548          66 :                 object = fcc.object;
    5549          66 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    5550             :                         /* Delay closure destruction until its invocation */
    5551           0 :                         if (IS_CONST & (IS_VAR|IS_CV)) {
    5552             :                                 ZVAL_DEREF(function_name);
    5553             :                         }
    5554             :                         ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT);
    5555           0 :                         GC_REFCOUNT((zend_object*)func->common.prototype)++;
    5556           0 :                         call_info |= ZEND_CALL_CLOSURE;
    5557          66 :                 } else if (object) {
    5558          20 :                         call_info |= ZEND_CALL_RELEASE_THIS;
    5559          20 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    5560             :                 }
    5561          66 :                 if (error) {
    5562           3 :                         efree(error);
    5563             :                         /* This is the only soft error is_callable() can generate */
    5564           6 :                         zend_error(E_DEPRECATED,
    5565             :                                 "Non-static method %s::%s() should not be called statically",
    5566           6 :                                 ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
    5567           3 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    5568           0 :                                 HANDLE_EXCEPTION();
    5569             :                         }
    5570             :                 }
    5571          66 :                 if (EXPECTED(func->type == ZEND_USER_FUNCTION) && UNEXPECTED(!func->op_array.run_time_cache)) {
    5572          21 :                         init_func_run_time_cache(&func->op_array);
    5573             :                 }
    5574             :         } else {
    5575           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);
    5576           9 :                 efree(error);
    5577           9 :                 func = (zend_function*)&zend_pass_function;
    5578           9 :                 called_scope = NULL;
    5579           9 :                 object = NULL;
    5580             :         }
    5581             : 
    5582         150 :         call = zend_vm_stack_push_call_frame(call_info,
    5583             :                 func, opline->extended_value, called_scope, object);
    5584          75 :         call->prev_execute_data = EX(call);
    5585          75 :         EX(call) = call;
    5586             : 
    5587          75 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5588             : }
    5589             : 
    5590          28 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5591             : {
    5592          28 :         USE_OPLINE
    5593             : 
    5594             :         zval *op1, *op2, *result;
    5595             : 
    5596          28 :         op1 = EX_CONSTANT(opline->op1);
    5597          28 :         op2 = EX_CONSTANT(opline->op2);
    5598             :         do {
    5599             :                 int result;
    5600             : 
    5601          28 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    5602          16 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    5603          16 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    5604           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    5605           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    5606             :                         } else {
    5607           0 :                                 break;
    5608             :                         }
    5609          12 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    5610           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    5611           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    5612           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    5613           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    5614             :                         } else {
    5615           0 :                                 break;
    5616             :                         }
    5617          12 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    5618          10 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    5619          10 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    5620           5 :                                         result = 1;
    5621          10 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    5622           5 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    5623           5 :                                                 result = 0;
    5624             :                                         } else {
    5625           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    5626             :                                         }
    5627             :                                 } else {
    5628           0 :                                         result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
    5629             :                                 }
    5630             : 
    5631             :                         } else {
    5632           0 :                                 break;
    5633             :                         }
    5634             :                 } else {
    5635           2 :                         break;
    5636             :                 }
    5637          26 :                 ZEND_VM_SMART_BRANCH(result, 0);
    5638           3 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5639           3 :                 ZEND_VM_NEXT_OPCODE();
    5640             :         } while (0);
    5641             : 
    5642             :         SAVE_OPLINE();
    5643           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    5644             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    5645             :         }
    5646           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    5647             :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    5648             :         }
    5649           2 :         result = EX_VAR(opline->result.var);
    5650           2 :         compare_function(result, op1, op2);
    5651           2 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    5652             : 
    5653           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5654             : }
    5655             : 
    5656          51 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5657             : {
    5658             :         zend_class_entry *ce, *scope;
    5659             :         zend_class_constant *c;
    5660             :         zval *value;
    5661          51 :         USE_OPLINE
    5662             : 
    5663             :         SAVE_OPLINE();
    5664             : 
    5665             :         do {
    5666             :                 if (IS_CONST == IS_CONST) {
    5667          51 :                         if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2))))) {
    5668           6 :                                 value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    5669             : #ifdef ZTS
    5670             :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5671             : #endif
    5672           6 :                                 break;
    5673          45 :                         } else if (EXPECTED(CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1))))) {
    5674           5 :                                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    5675             :                         } else {
    5676          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);
    5677          40 :                                 if (UNEXPECTED(ce == NULL)) {
    5678           2 :                                         if (EXPECTED(!EG(exception))) {
    5679           0 :                                                 zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    5680             :                                         }
    5681           2 :                                         HANDLE_EXCEPTION();
    5682             :                                 }
    5683          38 :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    5684             :                         }
    5685             :                 } else {
    5686             :                         if (IS_CONST == IS_UNUSED) {
    5687             :                                 ce = zend_fetch_class(NULL, opline->op1.num);
    5688             :                                 if (UNEXPECTED(ce == NULL)) {
    5689             :                                         ZEND_ASSERT(EG(exception));
    5690             :                                         HANDLE_EXCEPTION();
    5691             :                                 }
    5692             :                         } else {
    5693             :                                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    5694             :                         }
    5695             :                         if ((value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce)) != NULL) {
    5696             :                                 break;
    5697             :                         }
    5698             :                 }
    5699             : 
    5700          86 :                 if (EXPECTED((c = zend_hash_find_ptr(&ce->constants_table, Z_STR_P(EX_CONSTANT(opline->op2)))) != NULL)) {
    5701          41 :                         scope = EX(func)->op_array.scope;
    5702          41 :                         if (!zend_verify_const_access(c, scope)) {
    5703           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)));
    5704           2 :                                 HANDLE_EXCEPTION();
    5705             :                         }
    5706          39 :                         value = &c->value;
    5707          39 :                         if (Z_CONSTANT_P(value)) {
    5708          21 :                                 zval_update_constant_ex(value, ce);
    5709          21 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5710           4 :                                         HANDLE_EXCEPTION();
    5711             :                                 }
    5712             :                         }
    5713             :                         if (IS_CONST == IS_CONST) {
    5714          35 :                                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), value);
    5715             :                         } else {
    5716             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce, value);
    5717             :                         }
    5718             :                 } else {
    5719           2 :                         zend_throw_error(NULL, "Undefined class constant '%s'", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    5720           2 :                         HANDLE_EXCEPTION();
    5721             :                 }
    5722             :         } while (0);
    5723             : 
    5724             : #ifdef ZTS
    5725             :         if (ce->type == ZEND_INTERNAL_CLASS) {
    5726             :                 ZVAL_DUP(EX_VAR(opline->result.var), value);
    5727             :         } else {
    5728             :                 ZVAL_COPY(EX_VAR(opline->result.var), value);
    5729             :         }
    5730             : #else
    5731          41 :         ZVAL_COPY(EX_VAR(opline->result.var), value);
    5732             : #endif
    5733             : 
    5734          41 :         ZEND_VM_NEXT_OPCODE();
    5735             : }
    5736             : 
    5737        5599 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5738             : {
    5739        5599 :         USE_OPLINE
    5740             : 
    5741             :         zval *expr_ptr, new_expr;
    5742             : 
    5743             :         SAVE_OPLINE();
    5744        5599 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    5745             :             UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    5746             :                 expr_ptr = NULL;
    5747             :                 ZVAL_MAKE_REF(expr_ptr);
    5748             :                 Z_ADDREF_P(expr_ptr);
    5749             : 
    5750             :         } else {
    5751        5599 :                 expr_ptr = EX_CONSTANT(opline->op1);
    5752        5599 :                 if (IS_CONST == IS_TMP_VAR) {
    5753             :                         /* pass */
    5754             :                 } else if (IS_CONST == IS_CONST) {
    5755        5599 :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    5756             :                                 Z_ADDREF_P(expr_ptr);
    5757             :                         }
    5758             :                 } else if (IS_CONST == IS_CV) {
    5759             :                         ZVAL_DEREF(expr_ptr);
    5760             :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    5761             :                                 Z_ADDREF_P(expr_ptr);
    5762             :                         }
    5763             :                 } else /* if (IS_CONST == IS_VAR) */ {
    5764             :                         if (UNEXPECTED(Z_ISREF_P(expr_ptr))) {
    5765             :                                 zend_refcounted *ref = Z_COUNTED_P(expr_ptr);
    5766             : 
    5767             :                                 expr_ptr = Z_REFVAL_P(expr_ptr);
    5768             :                                 if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    5769             :                                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    5770             :                                         expr_ptr = &new_expr;
    5771             :                                         efree_size(ref, sizeof(zend_reference));
    5772             :                                 } else if (Z_OPT_REFCOUNTED_P(expr_ptr)) {
    5773             :                                         Z_ADDREF_P(expr_ptr);
    5774             :                                 }
    5775             :                         }
    5776             :                 }
    5777             :         }
    5778             : 
    5779             :         if (IS_CONST != IS_UNUSED) {
    5780             : 
    5781        5599 :                 zval *offset = EX_CONSTANT(opline->op2);
    5782             :                 zend_string *str;
    5783             :                 zend_ulong hval;
    5784             : 
    5785             : add_again:
    5786        5599 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    5787        5339 :                         str = Z_STR_P(offset);
    5788        5339 :                         if (IS_CONST != IS_CONST) {
    5789             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    5790             :                                         goto num_index;
    5791             :                                 }
    5792             :                         }
    5793             : str_index:
    5794        5348 :                         zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    5795         260 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    5796         226 :                         hval = Z_LVAL_P(offset);
    5797             : num_index:
    5798         251 :                         zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    5799          34 :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
    5800             :                         offset = Z_REFVAL_P(offset);
    5801             :                         goto add_again;
    5802          34 :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    5803           9 :                         str = ZSTR_EMPTY_ALLOC();
    5804           9 :                         goto str_index;
    5805          25 :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    5806          26 :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    5807          13 :                         goto num_index;
    5808          12 :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    5809           7 :                         hval = 0;
    5810           7 :                         goto num_index;
    5811           5 :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    5812           5 :                         hval = 1;
    5813           5 :                         goto num_index;
    5814           0 :                 } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    5815             :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    5816             :                         str = ZSTR_EMPTY_ALLOC();
    5817             :                         goto str_index;
    5818             :                 } else {
    5819           0 :                         zend_error(E_WARNING, "Illegal offset type");
    5820             :                         zval_ptr_dtor(expr_ptr);
    5821             :                 }
    5822             : 
    5823             :         } else {
    5824             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    5825             :         }
    5826        5599 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5827             : }
    5828             : 
    5829         587 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5830             : {
    5831             :         zval *array;
    5832             :         uint32_t size;
    5833         587 :         USE_OPLINE
    5834             : 
    5835         587 :         array = EX_VAR(opline->result.var);
    5836             :         if (IS_CONST != IS_UNUSED) {
    5837         587 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    5838             :         } else {
    5839             :                 size = 0;
    5840             :         }
    5841         587 :         ZVAL_NEW_ARR(array);
    5842         587 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    5843             : 
    5844             :         if (IS_CONST != IS_UNUSED) {
    5845             :                 /* Explicitly initialize array as not-packed if flag is set */
    5846         587 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    5847         567 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    5848             :                 }
    5849             :         }
    5850             : 
    5851         587 :         if (IS_CONST == IS_UNUSED) {
    5852             :                 ZEND_VM_NEXT_OPCODE();
    5853             : #if 0 || (IS_CONST != IS_UNUSED)
    5854             :         } else {
    5855         587 :                 ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    5856             : #endif
    5857             :         }
    5858             : }
    5859             : 
    5860           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5861             : {
    5862           2 :         USE_OPLINE
    5863             :         zval tmp, *varname;
    5864             :         zend_class_entry *ce;
    5865             : 
    5866             : 
    5867             :         SAVE_OPLINE();
    5868             : 
    5869           2 :         varname = EX_CONSTANT(opline->op1);
    5870             : 
    5871           2 :         ZVAL_UNDEF(&tmp);
    5872           2 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    5873             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    5874             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    5875             :                 }
    5876             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    5877             :                 varname = &tmp;
    5878             :         }
    5879             : 
    5880             :         if (IS_CONST == IS_CONST) {
    5881           2 :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    5882           2 :                 if (UNEXPECTED(ce == NULL)) {
    5883           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);
    5884           2 :                         if (UNEXPECTED(ce == NULL)) {
    5885           1 :                                 if (EXPECTED(!EG(exception))) {
    5886           0 :                                         zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    5887             :                                 }
    5888           1 :                                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    5889             :                                         zend_string_release(Z_STR(tmp));
    5890             :                                 }
    5891             : 
    5892           1 :                                 HANDLE_EXCEPTION();
    5893             :                         }
    5894           1 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    5895             :                 }
    5896             :         } else if (IS_CONST == IS_UNUSED) {
    5897             :                 ce = zend_fetch_class(NULL, opline->op2.num);
    5898             :                 if (UNEXPECTED(ce == NULL)) {
    5899             :                         ZEND_ASSERT(EG(exception));
    5900             :                         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    5901             :                                 zend_string_release(Z_STR(tmp));
    5902             :                         }
    5903             : 
    5904             :                         HANDLE_EXCEPTION();
    5905             :                 }
    5906             :         } else {
    5907             :                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    5908             :         }
    5909           1 :         zend_std_unset_static_property(ce, Z_STR_P(varname));
    5910             : 
    5911           1 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    5912             :                 zend_string_release(Z_STR(tmp));
    5913             :         }
    5914             : 
    5915           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5916             : }
    5917             : 
    5918          41 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5919             : {
    5920          41 :         USE_OPLINE
    5921             :         zval *value;
    5922             :         int result;
    5923             : 
    5924             :         zval tmp, *varname;
    5925             :         zend_class_entry *ce;
    5926             : 
    5927             :         SAVE_OPLINE();
    5928          41 :         varname = EX_CONSTANT(opline->op1);
    5929          41 :         ZVAL_UNDEF(&tmp);
    5930          41 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    5931             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    5932             :                 varname = &tmp;
    5933             :         }
    5934             : 
    5935             :         if (IS_CONST == IS_CONST) {
    5936          41 :                 if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
    5937          11 :                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    5938             : 
    5939             :                         /* check if static properties were destoyed */
    5940          11 :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    5941           0 :                                 value = NULL;
    5942             :                         }
    5943             : 
    5944          11 :                         goto is_static_prop_return;
    5945          30 :                 } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
    5946          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);
    5947          25 :                         if (UNEXPECTED(ce == NULL)) {
    5948           1 :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5949             :                         }
    5950          24 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    5951             :                 }
    5952             :         } else {
    5953             :                 if (IS_CONST == IS_UNUSED) {
    5954             :                         ce = zend_fetch_class(NULL, opline->op2.num);
    5955             :                         if (UNEXPECTED(ce == NULL)) {
    5956             :                                 ZEND_ASSERT(EG(exception));
    5957             :                                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    5958             :                                         zend_string_release(Z_STR(tmp));
    5959             :                                 }
    5960             : 
    5961             :                                 HANDLE_EXCEPTION();
    5962             :                         }
    5963             :                 } else {
    5964             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    5965             :                 }
    5966             :                 if (IS_CONST == IS_CONST &&
    5967             :                     (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    5968             : 
    5969             :                         /* check if static properties were destoyed */
    5970             :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    5971             :                                 value = NULL;
    5972             :                         }
    5973             : 
    5974             :                         goto is_static_prop_return;
    5975             :                 }
    5976             :         }
    5977             : 
    5978          29 :         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
    5979             : 
    5980          29 :         if (IS_CONST == IS_CONST && value) {
    5981          10 :                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
    5982             :         }
    5983             : 
    5984          29 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    5985             :                 zend_string_release(Z_STR(tmp));
    5986             :         }
    5987             : 
    5988             : is_static_prop_return:
    5989          40 :         if (opline->extended_value & ZEND_ISSET) {
    5990          91 :                 result = value && Z_TYPE_P(value) > IS_NULL &&
    5991          10 :                     (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    5992             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    5993           0 :                 result = !value || !i_zend_is_true(value);
    5994             :         }
    5995             : 
    5996          40 :         ZEND_VM_SMART_BRANCH(result, 1);
    5997          40 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    5998          40 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    5999             : }
    6000             : 
    6001           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6002             : {
    6003           2 :         USE_OPLINE
    6004             : 
    6005             :         zval *container;
    6006             :         int result;
    6007             :         zend_ulong hval;
    6008             :         zval *offset;
    6009             : 
    6010             :         SAVE_OPLINE();
    6011           2 :         container = EX_CONSTANT(opline->op1);
    6012           2 :         offset = EX_CONSTANT(opline->op2);
    6013             : 
    6014           2 :         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    6015             :                 HashTable *ht;
    6016             :                 zval *value;
    6017             :                 zend_string *str;
    6018             : 
    6019             : isset_dim_obj_array:
    6020           2 :                 ht = Z_ARRVAL_P(container);
    6021             : isset_again:
    6022           2 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    6023           0 :                         str = Z_STR_P(offset);
    6024           0 :                         if (IS_CONST != IS_CONST) {
    6025             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    6026             :                                         goto num_index_prop;
    6027             :                                 }
    6028             :                         }
    6029             : str_index_prop:
    6030           0 :                         value = zend_hash_find_ind(ht, str);
    6031           2 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    6032           2 :                         hval = Z_LVAL_P(offset);
    6033             : num_index_prop:
    6034           2 :                         value = zend_hash_index_find(ht, hval);
    6035           0 :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
    6036             :                         offset = Z_REFVAL_P(offset);
    6037             :                         goto isset_again;
    6038           0 :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    6039           0 :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6040           0 :                         goto num_index_prop;
    6041           0 :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    6042           0 :                         str = ZSTR_EMPTY_ALLOC();
    6043           0 :                         goto str_index_prop;
    6044           0 :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    6045           0 :                         hval = 0;
    6046           0 :                         goto num_index_prop;
    6047           0 :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    6048           0 :                         hval = 1;
    6049           0 :                         goto num_index_prop;
    6050           0 :                 } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
    6051           0 :                         hval = Z_RES_HANDLE_P(offset);
    6052           0 :                         goto num_index_prop;
    6053           0 :                 } else if (IS_CONST == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    6054             :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    6055             :                         str = ZSTR_EMPTY_ALLOC();
    6056             :                         goto str_index_prop;
    6057             :                 } else {
    6058           0 :                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    6059           0 :                         goto isset_not_found;
    6060             :                 }
    6061             : 
    6062           2 :                 if (opline->extended_value & ZEND_ISSET) {
    6063             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    6064           6 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    6065           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    6066             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6067           0 :                         result = (value == NULL || !i_zend_is_true(value));
    6068             :                 }
    6069           2 :                 goto isset_dim_obj_exit;
    6070           0 :         } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    6071             :                 container = Z_REFVAL_P(container);
    6072             :                 if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    6073             :                         goto isset_dim_obj_array;
    6074             :                 }
    6075             :         }
    6076             : 
    6077           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
    6078             :                 offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    6079             :         }
    6080             : 
    6081           0 :         if ((IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_OBJECT))) {
    6082             :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    6083             :                         result =
    6084             :                                 ((opline->extended_value & ZEND_ISSET) == 0) ^
    6085             :                                 Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0);
    6086             :                 } else {
    6087             :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    6088             :                         goto isset_not_found;
    6089             :                 }
    6090           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    6091             :                 zend_long lval;
    6092             : 
    6093           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    6094           0 :                         lval = Z_LVAL_P(offset);
    6095             : isset_str_offset:
    6096           0 :                         if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
    6097           0 :                                 lval += (zend_long)Z_STRLEN_P(container);
    6098             :                         }
    6099           0 :                         if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
    6100           0 :                                 if (opline->extended_value & ZEND_ISSET) {
    6101           0 :                                         result = 1;
    6102             :                                 } else {
    6103           0 :                                         result = (Z_STRVAL_P(container)[lval] == '0');
    6104             :                                 }
    6105             :                         } else {
    6106             :                                 goto isset_not_found;
    6107             :                         }
    6108             :                 } else {
    6109           0 :                         if (IS_CONST & (IS_CV|IS_VAR)) {
    6110             :                                 ZVAL_DEREF(offset);
    6111             :                         }
    6112           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    6113             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    6114           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    6115           0 :                                 lval = zval_get_long(offset);
    6116           0 :                                 goto isset_str_offset;
    6117             :                         }
    6118           0 :                         goto isset_not_found;
    6119             :                 }
    6120             :         } else {
    6121             : isset_not_found:
    6122           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    6123             :         }
    6124             : 
    6125             : isset_dim_obj_exit:
    6126             : 
    6127             : 
    6128           2 :         ZEND_VM_SMART_BRANCH(result, 1);
    6129           2 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6130           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6131             : }
    6132             : 
    6133           3 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6134             : {
    6135           3 :         USE_OPLINE
    6136             : 
    6137             :         zval *container;
    6138             :         int result;
    6139             :         zval *offset;
    6140             : 
    6141             :         SAVE_OPLINE();
    6142           3 :         container = EX_CONSTANT(opline->op1);
    6143             : 
    6144           3 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    6145             :                 zend_throw_error(NULL, "Using $this when not in object context");
    6146             : 
    6147             :                 HANDLE_EXCEPTION();
    6148             :         }
    6149             : 
    6150           3 :         offset = EX_CONSTANT(opline->op2);
    6151             : 
    6152             :         if (IS_CONST == IS_CONST ||
    6153             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    6154           3 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    6155             :                         container = Z_REFVAL_P(container);
    6156             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    6157             :                                 goto isset_no_object;
    6158             :                         }
    6159             :                 } else {
    6160           3 :                         goto isset_no_object;
    6161             :                 }
    6162             :         }
    6163             :         if (UNEXPECTED(!Z_OBJ_HT_P(container)->has_property)) {
    6164             :                 zend_error(E_NOTICE, "Trying to check property of non-object");
    6165             : isset_no_object:
    6166           3 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    6167             :         } else {
    6168             :                 result =
    6169             :                         ((opline->extended_value & ZEND_ISSET) == 0) ^
    6170             :                         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));
    6171             :         }
    6172             : 
    6173             : 
    6174           3 :         ZEND_VM_SMART_BRANCH(result, 1);
    6175           3 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6176           3 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6177             : }
    6178             : 
    6179         223 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6180             : {
    6181         223 :         USE_OPLINE
    6182             : 
    6183             :         zval *name;
    6184             :         zval *val;
    6185             :         zend_constant c;
    6186             : 
    6187             :         SAVE_OPLINE();
    6188         223 :         name  = EX_CONSTANT(opline->op1);
    6189         223 :         val   = EX_CONSTANT(opline->op2);
    6190             : 
    6191         223 :         ZVAL_COPY(&c.value, val);
    6192         223 :         if (Z_OPT_CONSTANT(c.value)) {
    6193          35 :                 if (UNEXPECTED(zval_update_constant_ex(&c.value, EX(func)->op_array.scope) != SUCCESS)) {
    6194             :                         zval_ptr_dtor(&c.value);
    6195             : 
    6196             : 
    6197           1 :                         HANDLE_EXCEPTION();
    6198             :                 }
    6199             :         }
    6200         222 :         c.flags = CONST_CS; /* non persistent, case sensetive */
    6201         444 :         c.name = zend_string_dup(Z_STR_P(name), 0);
    6202         222 :         c.module_number = PHP_USER_CONSTANT;
    6203             : 
    6204         222 :         if (zend_register_constant(&c) == FAILURE) {
    6205             :         }
    6206             : 
    6207             : 
    6208         222 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6209             : }
    6210             : 
    6211          22 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6212             : {
    6213          22 :         USE_OPLINE
    6214             : 
    6215          22 :         zend_generator *generator = zend_get_running_generator(execute_data);
    6216             : 
    6217             :         SAVE_OPLINE();
    6218          22 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    6219           0 :                 zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
    6220             : 
    6221             : 
    6222           0 :                 HANDLE_EXCEPTION();
    6223             :         }
    6224             : 
    6225             :         /* Destroy the previously yielded value */
    6226          22 :         zval_ptr_dtor(&generator->value);
    6227             : 
    6228             :         /* Destroy the previously yielded key */
    6229          22 :         zval_ptr_dtor(&generator->key);
    6230             : 
    6231             :         /* Set the new yielded value */
    6232             :         if (IS_CONST != IS_UNUSED) {
    6233             : 
    6234             : 
    6235          22 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    6236             :                         /* Constants and temporary variables aren't yieldable by reference,
    6237             :                          * but we still allow them with a notice. */
    6238             :                         if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
    6239             :                                 zval *value;
    6240             : 
    6241           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6242             : 
    6243           0 :                                 value = EX_CONSTANT(opline->op1);
    6244           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6245             :                                 if (IS_CONST == IS_CONST) {
    6246           0 :                                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    6247           0 :                                                 Z_ADDREF(generator->value);
    6248             :                                         }
    6249             :                                 }
    6250             :                         } else {
    6251             :                                 zval *value_ptr = NULL;
    6252             : 
    6253             :                                 /* If a function call result is yielded and the function did
    6254             :                                  * not return by reference we throw a notice. */
    6255             :                                 if (IS_CONST == IS_VAR &&
    6256             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6257             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6258             :                                       !Z_ISREF_P(value_ptr)))) {
    6259             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6260             :                                 } else {
    6261             :                                         ZVAL_MAKE_REF(value_ptr);
    6262             :                                 }
    6263             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6264             : 
    6265             :                         }
    6266             :                 } else {
    6267          22 :                         zval *value = EX_CONSTANT(opline->op1);
    6268             : 
    6269             :                         /* Consts, temporary variables and references need copying */
    6270             :                         if (IS_CONST == IS_CONST) {
    6271          22 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6272          22 :                                 if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    6273           1 :                                         Z_ADDREF(generator->value);
    6274             :                                 }
    6275             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6276             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6277             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    6278             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    6279             : 
    6280             :                         } else {
    6281             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6282             :                                 if (IS_CONST == IS_CV) {
    6283             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6284             :                                 }
    6285             :                         }
    6286             :                 }
    6287             :         } else {
    6288             :                 /* If no value was specified yield null */
    6289             :                 ZVAL_NULL(&generator->value);
    6290             :         }
    6291             : 
    6292             :         /* Set the new yielded key */
    6293             :         if (IS_CONST != IS_UNUSED) {
    6294             : 
    6295          22 :                 zval *key = EX_CONSTANT(opline->op2);
    6296             : 
    6297             :                 /* Consts, temporary variables and references need copying */
    6298             :                 if (IS_CONST == IS_CONST) {
    6299          22 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6300          22 :                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
    6301           3 :                                 Z_ADDREF(generator->key);
    6302             :                         }
    6303             :                 } else if (IS_CONST == IS_TMP_VAR) {
    6304             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6305             :                 } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    6306             :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    6307             : 
    6308             :                 } else {
    6309             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6310             :                         if (IS_CONST == IS_CV) {
    6311             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6312             :                         }
    6313             :                 }
    6314             : 
    6315          46 :                 if (Z_TYPE(generator->key) == IS_LONG
    6316           2 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6317             :                 ) {
    6318           2 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6319             :                 }
    6320             :         } else {
    6321             :                 /* If no key was specified we use auto-increment keys */
    6322             :                 generator->largest_used_integer_key++;
    6323             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6324             :         }
    6325             : 
    6326          22 :         if (RETURN_VALUE_USED(opline)) {
    6327             :                 /* If the return value of yield is used set the send
    6328             :                  * target and initialize it to NULL */
    6329           4 :                 generator->send_target = EX_VAR(opline->result.var);
    6330           4 :                 ZVAL_NULL(generator->send_target);
    6331             :         } else {
    6332          18 :                 generator->send_target = NULL;
    6333             :         }
    6334             : 
    6335             :         /* We increment to the next op, so we are at the correct position when the
    6336             :          * generator is resumed. */
    6337          22 :         ZEND_VM_INC_OPCODE();
    6338             : 
    6339             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6340             :          * variable in execute_data so we don't resume at an old position. */
    6341             :         SAVE_OPLINE();
    6342             : 
    6343          22 :         ZEND_VM_RETURN();
    6344             : }
    6345             : 
    6346           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6347             : {
    6348           0 :         USE_OPLINE
    6349             : 
    6350             :         zval *container, *dim, *value;
    6351             :         zend_long offset;
    6352             : 
    6353           0 :         container = EX_CONSTANT(opline->op1);
    6354           0 :         dim = EX_CONSTANT(opline->op2);
    6355           0 :         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    6356             : fetch_dim_r_index_array:
    6357           0 :                 if (EXPECTED(Z_TYPE_P(dim) == IS_LONG)) {
    6358           0 :                         offset = Z_LVAL_P(dim);
    6359             :                 } else {
    6360           0 :                         offset = zval_get_long(dim);
    6361             :                 }
    6362           0 :                 ZEND_HASH_INDEX_FIND(Z_ARRVAL_P(container), offset, value, fetch_dim_r_index_undef);
    6363           0 :                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), value);
    6364           0 :                 if (IS_CONST & (IS_TMP_VAR|IS_VAR)) {
    6365             :                         SAVE_OPLINE();
    6366             : 
    6367             :                         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6368             :                 } else {
    6369           0 :                         ZEND_VM_NEXT_OPCODE();
    6370             :                 }
    6371           0 :         } else if (IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
    6372             :                 container = Z_REFVAL_P(container);
    6373             :                 if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    6374             :                         goto fetch_dim_r_index_array;
    6375             :                 } else {
    6376             :                         goto fetch_dim_r_index_slow;
    6377             :                 }
    6378             :         } else {
    6379             : fetch_dim_r_index_slow:
    6380             :                 SAVE_OPLINE();
    6381           0 :                 zend_fetch_dimension_address_read_R_slow(EX_VAR(opline->result.var), container, dim);
    6382             : 
    6383           0 :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6384             :         }
    6385             : 
    6386             : fetch_dim_r_index_undef:
    6387           0 :         ZVAL_NULL(EX_VAR(opline->result.var));
    6388             :         SAVE_OPLINE();
    6389           0 :         zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, offset);
    6390             : 
    6391           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6392             : }
    6393             : 
    6394           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6395             : {
    6396           0 :         USE_OPLINE
    6397             :         zend_free_op free_op2;
    6398             :         zval *op1, *op2;
    6399             :         int result;
    6400             : 
    6401             :         SAVE_OPLINE();
    6402           0 :         op1 = EX_CONSTANT(opline->op1);
    6403           0 :         op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6404           0 :         result = fast_is_identical_function(op1, op2);
    6405             : 
    6406           0 :         zval_ptr_dtor_nogc(free_op2);
    6407           0 :         ZEND_VM_SMART_BRANCH(result, 1);
    6408           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6409           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6410             : }
    6411             : 
    6412           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6413             : {
    6414           0 :         USE_OPLINE
    6415             :         zend_free_op free_op2;
    6416             :         zval *op1, *op2;
    6417             :         int result;
    6418             : 
    6419             :         SAVE_OPLINE();
    6420           0 :         op1 = EX_CONSTANT(opline->op1);
    6421           0 :         op2 = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6422           0 :         result = fast_is_not_identical_function(op1, op2);
    6423             : 
    6424           0 :         zval_ptr_dtor_nogc(free_op2);
    6425           0 :         ZEND_VM_SMART_BRANCH(result, 1);
    6426           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6427           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6428             : }
    6429             : 
    6430           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6431             : {
    6432           0 :         USE_OPLINE
    6433             : 
    6434           0 :         zend_generator *generator = zend_get_running_generator(execute_data);
    6435             : 
    6436             :         SAVE_OPLINE();
    6437           0 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    6438           0 :                 zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
    6439           0 :                 zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
    6440             : 
    6441           0 :                 HANDLE_EXCEPTION();
    6442             :         }
    6443             : 
    6444             :         /* Destroy the previously yielded value */
    6445           0 :         zval_ptr_dtor(&generator->value);
    6446             : 
    6447             :         /* Destroy the previously yielded key */
    6448           0 :         zval_ptr_dtor(&generator->key);
    6449             : 
    6450             :         /* Set the new yielded value */
    6451             :         if (IS_CONST != IS_UNUSED) {
    6452             : 
    6453             : 
    6454           0 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    6455             :                         /* Constants and temporary variables aren't yieldable by reference,
    6456             :                          * but we still allow them with a notice. */
    6457             :                         if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
    6458             :                                 zval *value;
    6459             : 
    6460           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6461             : 
    6462           0 :                                 value = EX_CONSTANT(opline->op1);
    6463           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6464             :                                 if (IS_CONST == IS_CONST) {
    6465           0 :                                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    6466           0 :                                                 Z_ADDREF(generator->value);
    6467             :                                         }
    6468             :                                 }
    6469             :                         } else {
    6470             :                                 zval *value_ptr = NULL;
    6471             : 
    6472             :                                 /* If a function call result is yielded and the function did
    6473             :                                  * not return by reference we throw a notice. */
    6474             :                                 if (IS_CONST == IS_VAR &&
    6475             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6476             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6477             :                                       !Z_ISREF_P(value_ptr)))) {
    6478             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6479             :                                 } else {
    6480             :                                         ZVAL_MAKE_REF(value_ptr);
    6481             :                                 }
    6482             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6483             : 
    6484             :                         }
    6485             :                 } else {
    6486           0 :                         zval *value = EX_CONSTANT(opline->op1);
    6487             : 
    6488             :                         /* Consts, temporary variables and references need copying */
    6489             :                         if (IS_CONST == IS_CONST) {
    6490           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6491           0 :                                 if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    6492           0 :                                         Z_ADDREF(generator->value);
    6493             :                                 }
    6494             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6495             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6496             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    6497             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    6498             : 
    6499             :                         } else {
    6500             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6501             :                                 if (IS_CONST == IS_CV) {
    6502             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6503             :                                 }
    6504             :                         }
    6505             :                 }
    6506             :         } else {
    6507             :                 /* If no value was specified yield null */
    6508             :                 ZVAL_NULL(&generator->value);
    6509             :         }
    6510             : 
    6511             :         /* Set the new yielded key */
    6512             :         if (IS_TMP_VAR != IS_UNUSED) {
    6513             :                 zend_free_op free_op2;
    6514           0 :                 zval *key = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2);
    6515             : 
    6516             :                 /* Consts, temporary variables and references need copying */
    6517           0 :                 if (IS_TMP_VAR == IS_CONST) {
    6518             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6519             :                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
    6520             :                                 Z_ADDREF(generator->key);
    6521             :                         }
    6522             :                 } else if (IS_TMP_VAR == IS_TMP_VAR) {
    6523           0 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6524             :                 } else if ((IS_TMP_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    6525             :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    6526             : 
    6527             :                 } else {
    6528             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6529             :                         if (IS_TMP_VAR == IS_CV) {
    6530             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6531             :                         }
    6532             :                 }
    6533             : 
    6534           0 :                 if (Z_TYPE(generator->key) == IS_LONG
    6535           0 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6536             :                 ) {
    6537           0 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6538             :                 }
    6539             :         } else {
    6540             :                 /* If no key was specified we use auto-increment keys */
    6541             :                 generator->largest_used_integer_key++;
    6542             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6543             :         }
    6544             : 
    6545           0 :         if (RETURN_VALUE_USED(opline)) {
    6546             :                 /* If the return value of yield is used set the send
    6547             :                  * target and initialize it to NULL */
    6548           0 :                 generator->send_target = EX_VAR(opline->result.var);
    6549           0 :                 ZVAL_NULL(generator->send_target);
    6550             :         } else {
    6551           0 :                 generator->send_target = NULL;
    6552             :         }
    6553             : 
    6554             :         /* We increment to the next op, so we are at the correct position when the
    6555             :          * generator is resumed. */
    6556           0 :         ZEND_VM_INC_OPCODE();
    6557             : 
    6558             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6559             :          * variable in execute_data so we don't resume at an old position. */
    6560             :         SAVE_OPLINE();
    6561             : 
    6562           0 :         ZEND_VM_RETURN();
    6563             : }
    6564             : 
    6565       21185 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6566             : {
    6567       21185 :         USE_OPLINE
    6568             :         zend_free_op free_op2;
    6569             :         zval *op1, *op2;
    6570             :         int result;
    6571             : 
    6572             :         SAVE_OPLINE();
    6573       21185 :         op1 = EX_CONSTANT(opline->op1);
    6574       42370 :         op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
    6575       21185 :         result = fast_is_identical_function(op1, op2);
    6576             : 
    6577       21185 :         zval_ptr_dtor_nogc(free_op2);
    6578       21185 :         ZEND_VM_SMART_BRANCH(result, 1);
    6579          37 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6580          37 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6581             : }
    6582             : 
    6583        7913 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6584             : {
    6585        7913 :         USE_OPLINE
    6586             :         zend_free_op free_op2;
    6587             :         zval *op1, *op2;
    6588             :         int result;
    6589             : 
    6590             :         SAVE_OPLINE();
    6591        7913 :         op1 = EX_CONSTANT(opline->op1);
    6592       15826 :         op2 = _get_zval_ptr_var_deref(opline->op2.var, execute_data, &free_op2);
    6593        7913 :         result = fast_is_not_identical_function(op1, op2);
    6594             : 
    6595        7913 :         zval_ptr_dtor_nogc(free_op2);
    6596        7913 :         ZEND_VM_SMART_BRANCH(result, 1);
    6597          28 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6598          28 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6599             : }
    6600             : 
    6601          16 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CONST_VAR(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    6602             : {
    6603          16 :         USE_OPLINE
    6604             : 
    6605             :         zval *varname;
    6606             :         zval *retval;
    6607             :         zend_string *name;
    6608             :         zend_class_entry *ce;
    6609             : 
    6610             :         SAVE_OPLINE();
    6611          16 :         varname = EX_CONSTANT(opline->op1);
    6612             : 
    6613             :         if (IS_CONST == IS_CONST) {
    6614          16 :                 name = Z_STR_P(varname);
    6615             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    6616             :                 name = Z_STR_P(varname);
    6617             :                 zend_string_addref(name);
    6618             :         } else {
    6619             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    6620             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    6621             :                 }
    6622             :                 name = zval_get_string(varname);
    6623             :         }
    6624             : 
    6625          16 :         if (IS_VAR == IS_CONST) {
    6626             :                 if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
    6627             :                         retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    6628             : 
    6629             :                         /* check if static properties were destoyed */
    6630             :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6631             :                                 zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
    6632             : 
    6633             :                                 HANDLE_EXCEPTION();
    6634             :                         }
    6635             : 
    6636             :                         goto fetch_static_prop_return;
    6637             :                 } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
    6638             :                         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);
    6639             :                         if (UNEXPECTED(ce == NULL)) {
    6640             :                                 if (IS_CONST != IS_CONST) {
    6641             :                                         zend_string_release(name);
    6642             :                                 }
    6643             : 
    6644             :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6645             :                         }
    6646             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    6647             :                 }
    6648             :         } else {
    6649          16 :                 if (IS_VAR == IS_UNUSED) {
    6650             :                         ce = zend_fetch_class(NULL, opline->op2.num);
    6651             :                         if (UNEXPECTED(ce == NULL)) {
    6652             :                                 ZEND_ASSERT(EG(exception));
    6653             :                                 if (IS_CONST != IS_CONST) {
    6654             :                                         zend_string_release(name);
    6655             :                                 }
    6656             : 
    6657             :                                 HANDLE_EXCEPTION();
    6658             :                         }
    6659             :                 } else {
    6660          16 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    6661             :                 }
    6662          16 :                 if (IS_CONST == IS_CONST &&
    6663          16 :                     (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    6664             : 
    6665             :                         /* check if static properties were destoyed */
    6666           0 :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6667           0 :                                 zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
    6668             : 
    6669           0 :                                 HANDLE_EXCEPTION();
    6670             :                         }
    6671             : 
    6672           0 :                         goto fetch_static_prop_return;
    6673             :                 }
    6674             :         }
    6675          16 :         retval = zend_std_get_static_property(ce, name, 0);
    6676          16 :         if (UNEXPECTED(EG(exception))) {
    6677           1 :                 if (IS_CONST != IS_CONST) {
    6678             :                         zend_string_release(name);
    6679             :                 }
    6680             : 
    6681           1 :                 HANDLE_EXCEPTION();
    6682             :         }
    6683          15 :         if (IS_CONST == IS_CONST && retval) {
    6684          15 :                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
    6685             :         }
    6686             : 
    6687          15 :         if (IS_CONST != IS_CONST) {
    6688             :                 zend_string_release(name);
    6689             :         }
    6690             : 
    6691             : fetch_static_prop_return:
    6692             :         ZEND_ASSERT(retval != NULL);
    6693          30 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    6694          40 :                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    6695             :         } else {
    6696           0 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    6697             :         }
    6698          15 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6699             : }
    6700             : 
    6701          11 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6702             : {
    6703          11 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6704             : }
    6705             : 
    6706           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6707             : {
    6708           0 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6709             : }
    6710             : 
    6711           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6712             : {
    6713           0 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6714             : }
    6715             : 
    6716           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6717             : {
    6718           5 :         USE_OPLINE
    6719             : 
    6720          10 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    6721           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6722             :         } else {
    6723           5 :                 ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6724             :         }
    6725             : }
    6726             : 
    6727           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6728             : {
    6729           0 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6730             : }
    6731             : 
    6732           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6733             : {
    6734           0 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_VAR(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    6735             : }
    6736             : 
    6737           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6738             : {
    6739           0 :         USE_OPLINE
    6740             :         zval tmp, *varname;
    6741             :         zend_class_entry *ce;
    6742             : 
    6743             : 
    6744             :         SAVE_OPLINE();
    6745             : 
    6746           0 :         varname = EX_CONSTANT(opline->op1);
    6747             : 
    6748           0 :         ZVAL_UNDEF(&tmp);
    6749           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6750             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    6751             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    6752             :                 }
    6753             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    6754             :                 varname = &tmp;
    6755             :         }
    6756             : 
    6757           0 :         if (IS_VAR == IS_CONST) {
    6758             :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    6759             :                 if (UNEXPECTED(ce == NULL)) {
    6760             :                         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);
    6761             :                         if (UNEXPECTED(ce == NULL)) {
    6762             :                                 if (EXPECTED(!EG(exception))) {
    6763             :                                         zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    6764             :                                 }
    6765             :                                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6766             :                                         zend_string_release(Z_STR(tmp));
    6767             :                                 }
    6768             : 
    6769             :                                 HANDLE_EXCEPTION();
    6770             :                         }
    6771             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    6772             :                 }
    6773           0 :         } else if (IS_VAR == IS_UNUSED) {
    6774             :                 ce = zend_fetch_class(NULL, opline->op2.num);
    6775             :                 if (UNEXPECTED(ce == NULL)) {
    6776             :                         ZEND_ASSERT(EG(exception));
    6777             :                         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6778             :                                 zend_string_release(Z_STR(tmp));
    6779             :                         }
    6780             : 
    6781             :                         HANDLE_EXCEPTION();
    6782             :                 }
    6783             :         } else {
    6784           0 :                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    6785             :         }
    6786           0 :         zend_std_unset_static_property(ce, Z_STR_P(varname));
    6787             : 
    6788           0 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6789             :                 zend_string_release(Z_STR(tmp));
    6790             :         }
    6791             : 
    6792           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6793             : }
    6794             : 
    6795           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6796             : {
    6797           0 :         USE_OPLINE
    6798             :         zval *value;
    6799             :         int result;
    6800             : 
    6801             :         zval tmp, *varname;
    6802             :         zend_class_entry *ce;
    6803             : 
    6804             :         SAVE_OPLINE();
    6805           0 :         varname = EX_CONSTANT(opline->op1);
    6806           0 :         ZVAL_UNDEF(&tmp);
    6807           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6808             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    6809             :                 varname = &tmp;
    6810             :         }
    6811             : 
    6812           0 :         if (IS_VAR == IS_CONST) {
    6813             :                 if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
    6814             :                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    6815             : 
    6816             :                         /* check if static properties were destoyed */
    6817             :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6818             :                                 value = NULL;
    6819             :                         }
    6820             : 
    6821             :                         goto is_static_prop_return;
    6822             :                 } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
    6823             :                         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);
    6824             :                         if (UNEXPECTED(ce == NULL)) {
    6825             :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6826             :                         }
    6827             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    6828             :                 }
    6829             :         } else {
    6830           0 :                 if (IS_VAR == IS_UNUSED) {
    6831             :                         ce = zend_fetch_class(NULL, opline->op2.num);
    6832             :                         if (UNEXPECTED(ce == NULL)) {
    6833             :                                 ZEND_ASSERT(EG(exception));
    6834             :                                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6835             :                                         zend_string_release(Z_STR(tmp));
    6836             :                                 }
    6837             : 
    6838             :                                 HANDLE_EXCEPTION();
    6839             :                         }
    6840             :                 } else {
    6841           0 :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    6842             :                 }
    6843           0 :                 if (IS_CONST == IS_CONST &&
    6844           0 :                     (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    6845             : 
    6846             :                         /* check if static properties were destoyed */
    6847           0 :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    6848           0 :                                 value = NULL;
    6849             :                         }
    6850             : 
    6851           0 :                         goto is_static_prop_return;
    6852             :                 }
    6853             :         }
    6854             : 
    6855           0 :         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
    6856             : 
    6857           0 :         if (IS_CONST == IS_CONST && value) {
    6858           0 :                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
    6859             :         }
    6860             : 
    6861           0 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    6862             :                 zend_string_release(Z_STR(tmp));
    6863             :         }
    6864             : 
    6865             : is_static_prop_return:
    6866           0 :         if (opline->extended_value & ZEND_ISSET) {
    6867           0 :                 result = value && Z_TYPE_P(value) > IS_NULL &&
    6868           0 :                     (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    6869             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6870           0 :                 result = !value || !i_zend_is_true(value);
    6871             :         }
    6872             : 
    6873           0 :         ZEND_VM_SMART_BRANCH(result, 1);
    6874           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    6875           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    6876             : }
    6877             : 
    6878           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6879             : {
    6880           2 :         USE_OPLINE
    6881             : 
    6882           2 :         zend_generator *generator = zend_get_running_generator(execute_data);
    6883             : 
    6884             :         SAVE_OPLINE();
    6885           2 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    6886           0 :                 zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
    6887           0 :                 zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
    6888             : 
    6889           0 :                 HANDLE_EXCEPTION();
    6890             :         }
    6891             : 
    6892             :         /* Destroy the previously yielded value */
    6893           2 :         zval_ptr_dtor(&generator->value);
    6894             : 
    6895             :         /* Destroy the previously yielded key */
    6896           2 :         zval_ptr_dtor(&generator->key);
    6897             : 
    6898             :         /* Set the new yielded value */
    6899             :         if (IS_CONST != IS_UNUSED) {
    6900             : 
    6901             : 
    6902           2 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    6903             :                         /* Constants and temporary variables aren't yieldable by reference,
    6904             :                          * but we still allow them with a notice. */
    6905             :                         if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
    6906             :                                 zval *value;
    6907             : 
    6908           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6909             : 
    6910           0 :                                 value = EX_CONSTANT(opline->op1);
    6911           0 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6912             :                                 if (IS_CONST == IS_CONST) {
    6913           0 :                                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    6914           0 :                                                 Z_ADDREF(generator->value);
    6915             :                                         }
    6916             :                                 }
    6917             :                         } else {
    6918             :                                 zval *value_ptr = NULL;
    6919             : 
    6920             :                                 /* If a function call result is yielded and the function did
    6921             :                                  * not return by reference we throw a notice. */
    6922             :                                 if (IS_CONST == IS_VAR &&
    6923             :                                     (value_ptr == &EG(uninitialized_zval) ||
    6924             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6925             :                                       !Z_ISREF_P(value_ptr)))) {
    6926             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6927             :                                 } else {
    6928             :                                         ZVAL_MAKE_REF(value_ptr);
    6929             :                                 }
    6930             :                                 ZVAL_COPY(&generator->value, value_ptr);
    6931             : 
    6932             :                         }
    6933             :                 } else {
    6934           2 :                         zval *value = EX_CONSTANT(opline->op1);
    6935             : 
    6936             :                         /* Consts, temporary variables and references need copying */
    6937             :                         if (IS_CONST == IS_CONST) {
    6938           2 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6939           2 :                                 if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    6940           0 :                                         Z_ADDREF(generator->value);
    6941             :                                 }
    6942             :                         } else if (IS_CONST == IS_TMP_VAR) {
    6943             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6944             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    6945             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    6946             : 
    6947             :                         } else {
    6948             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    6949             :                                 if (IS_CONST == IS_CV) {
    6950             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    6951             :                                 }
    6952             :                         }
    6953             :                 }
    6954             :         } else {
    6955             :                 /* If no value was specified yield null */
    6956             :                 ZVAL_NULL(&generator->value);
    6957             :         }
    6958             : 
    6959             :         /* Set the new yielded key */
    6960             :         if (IS_VAR != IS_UNUSED) {
    6961             :                 zend_free_op free_op2;
    6962           4 :                 zval *key = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2);
    6963             : 
    6964             :                 /* Consts, temporary variables and references need copying */
    6965           2 :                 if (IS_VAR == IS_CONST) {
    6966             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6967             :                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
    6968             :                                 Z_ADDREF(generator->key);
    6969             :                         }
    6970           2 :                 } else if (IS_VAR == IS_TMP_VAR) {
    6971             :                         ZVAL_COPY_VALUE(&generator->key, key);
    6972           2 :                 } else if ((IS_VAR & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    6973           0 :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    6974           0 :                         zval_ptr_dtor_nogc(free_op2);
    6975             :                 } else {
    6976           2 :                         ZVAL_COPY_VALUE(&generator->key, key);
    6977           2 :                         if (IS_VAR == IS_CV) {
    6978             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    6979             :                         }
    6980             :                 }
    6981             : 
    6982           5 :                 if (Z_TYPE(generator->key) == IS_LONG
    6983           1 :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    6984             :                 ) {
    6985           1 :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    6986             :                 }
    6987             :         } else {
    6988             :                 /* If no key was specified we use auto-increment keys */
    6989             :                 generator->largest_used_integer_key++;
    6990             :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    6991             :         }
    6992             : 
    6993           2 :         if (RETURN_VALUE_USED(opline)) {
    6994             :                 /* If the return value of yield is used set the send
    6995             :                  * target and initialize it to NULL */
    6996           0 :                 generator->send_target = EX_VAR(opline->result.var);
    6997           0 :                 ZVAL_NULL(generator->send_target);
    6998             :         } else {
    6999           2 :                 generator->send_target = NULL;
    7000             :         }
    7001             : 
    7002             :         /* We increment to the next op, so we are at the correct position when the
    7003             :          * generator is resumed. */
    7004           2 :         ZEND_VM_INC_OPCODE();
    7005             : 
    7006             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    7007             :          * variable in execute_data so we don't resume at an old position. */
    7008             :         SAVE_OPLINE();
    7009             : 
    7010           2 :         ZEND_VM_RETURN();
    7011             : }
    7012             : 
    7013      125755 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    7014             : {
    7015      125755 :         USE_OPLINE
    7016             : 
    7017             :         zval *varname;
    7018             :         zval *retval;
    7019             :         zend_string *name;
    7020             :         HashTable *target_symbol_table;
    7021             : 
    7022             :         SAVE_OPLINE();
    7023      125755 :         varname = EX_CONSTANT(opline->op1);
    7024             : 
    7025             :         if (IS_CONST == IS_CONST) {
    7026      125755 :                 name = Z_STR_P(varname);
    7027             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    7028             :                 name = Z_STR_P(varname);
    7029             :                 zend_string_addref(name);
    7030             :         } else {
    7031             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    7032             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    7033             :                 }
    7034             :                 name = zval_get_string(varname);
    7035             :         }
    7036             : 
    7037      251510 :         target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7038      125755 :         retval = zend_hash_find(target_symbol_table, name);
    7039      125755 :         if (retval == NULL) {
    7040        1580 :                 if (UNEXPECTED(zend_string_equals(name, CG(known_strings)[ZEND_STR_THIS]))) {
    7041             :                         zval *result;
    7042             : 
    7043             : fetch_this:
    7044           0 :                         result = EX_VAR(opline->result.var);
    7045           0 :                         switch (type) {
    7046             :                                 case BP_VAR_R:
    7047           0 :                                         if (EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) {
    7048           0 :                                                 ZVAL_OBJ(result, Z_OBJ(EX(This)));
    7049             :                                                 Z_ADDREF_P(result);
    7050             :                                         } else {
    7051           0 :                                                 ZVAL_NULL(result);
    7052           0 :                                                 zend_error(E_NOTICE,"Undefined variable: this");
    7053             :                                         }
    7054           0 :                                         break;
    7055             :                                 case BP_VAR_IS:
    7056           0 :                                         if (EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) {
    7057           0 :                                                 ZVAL_OBJ(result, Z_OBJ(EX(This)));
    7058             :                                                 Z_ADDREF_P(result);
    7059             :                                         } else {
    7060           0 :                                                 ZVAL_NULL(result);
    7061             :                                         }
    7062           0 :                                         break;
    7063             :                                 case BP_VAR_RW:
    7064             :                                 case BP_VAR_W:
    7065           0 :                                         zend_throw_error(NULL, "Cannot re-assign $this");
    7066           0 :                                         break;
    7067             :                                 case BP_VAR_UNSET:
    7068           0 :                                         zend_throw_error(NULL, "Cannot unset $this");
    7069             :                                         break;
    7070             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7071             :                         }
    7072           0 :                         if (IS_CONST != IS_CONST) {
    7073             :                                 zend_string_release(name);
    7074             :                         }
    7075           0 :                         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7076             :                 }
    7077         790 :                 switch (type) {
    7078             :                         case BP_VAR_R:
    7079             :                         case BP_VAR_UNSET:
    7080         785 :                                 zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
    7081             :                                 /* break missing intentionally */
    7082             :                         case BP_VAR_IS:
    7083         785 :                                 retval = &EG(uninitialized_zval);
    7084         785 :                                 break;
    7085             :                         case BP_VAR_RW:
    7086           0 :                                 zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
    7087           0 :                                 retval = zend_hash_update(target_symbol_table, name, &EG(uninitialized_zval));
    7088           0 :                                 break;
    7089             :                         case BP_VAR_W:
    7090           5 :                                 retval = zend_hash_add_new(target_symbol_table, name, &EG(uninitialized_zval));
    7091             :                                 break;
    7092             :                         EMPTY_SWITCH_DEFAULT_CASE()
    7093             :                 }
    7094             :         /* GLOBAL or $$name variable may be an INDIRECT pointer to CV */
    7095      124965 :         } else if (Z_TYPE_P(retval) == IS_INDIRECT) {
    7096        1002 :                 retval = Z_INDIRECT_P(retval);
    7097        1002 :                 if (Z_TYPE_P(retval) == IS_UNDEF) {
    7098        1362 :                         if (UNEXPECTED(zend_string_equals(name, CG(known_strings)[ZEND_STR_THIS]))) {
    7099           0 :                                 goto fetch_this;
    7100             :                         }
    7101         681 :                         switch (type) {
    7102             :                                 case BP_VAR_R:
    7103             :                                 case BP_VAR_UNSET:
    7104         680 :                                         zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
    7105             :                                         /* break missing intentionally */
    7106             :                                 case BP_VAR_IS:
    7107         680 :                                         retval = &EG(uninitialized_zval);
    7108         680 :                                         break;
    7109             :                                 case BP_VAR_RW:
    7110           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", ZSTR_VAL(name));
    7111             :                                         /* break missing intentionally */
    7112             :                                 case BP_VAR_W:
    7113           1 :                                         ZVAL_NULL(retval);
    7114             :                                         break;
    7115             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7116             :                         }
    7117             :                 }
    7118             :         }
    7119             : 
    7120      125755 :         if ((opline->extended_value & ZEND_FETCH_TYPE_MASK) != ZEND_FETCH_GLOBAL_LOCK) {
    7121             : 
    7122             :         }
    7123             : 
    7124      125755 :         if (IS_CONST != IS_CONST) {
    7125             :                 zend_string_release(name);
    7126             :         }
    7127             : 
    7128             :         ZEND_ASSERT(retval != NULL);
    7129      140616 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    7130       31600 :                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    7131             :         } else {
    7132      110894 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    7133             :         }
    7134      125755 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7135             : }
    7136             : 
    7137       14835 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7138             : {
    7139       14835 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7140             : }
    7141             : 
    7142      110859 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7143             : {
    7144      110859 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7145             : }
    7146             : 
    7147           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7148             : {
    7149           6 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7150             : }
    7151             : 
    7152           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7153             : {
    7154           4 :         USE_OPLINE
    7155             : 
    7156           8 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    7157           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7158             :         } else {
    7159           4 :                 ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7160             :         }
    7161             : }
    7162             : 
    7163          29 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7164             : {
    7165          29 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7166             : }
    7167             : 
    7168          22 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7169             : {
    7170          22 :         ZEND_VM_TAIL_CALL(zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7171             : }
    7172             : 
    7173         793 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(int type ZEND_OPCODE_HANDLER_ARGS_DC)
    7174             : {
    7175         793 :         USE_OPLINE
    7176             : 
    7177             :         zval *varname;
    7178             :         zval *retval;
    7179             :         zend_string *name;
    7180             :         zend_class_entry *ce;
    7181             : 
    7182             :         SAVE_OPLINE();
    7183         793 :         varname = EX_CONSTANT(opline->op1);
    7184             : 
    7185             :         if (IS_CONST == IS_CONST) {
    7186         793 :                 name = Z_STR_P(varname);
    7187             :         } else if (EXPECTED(Z_TYPE_P(varname) == IS_STRING)) {
    7188             :                 name = Z_STR_P(varname);
    7189             :                 zend_string_addref(name);
    7190             :         } else {
    7191             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    7192             :                         GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    7193             :                 }
    7194             :                 name = zval_get_string(varname);
    7195             :         }
    7196             : 
    7197         793 :         if (IS_UNUSED == IS_CONST) {
    7198             :                 if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
    7199             :                         retval = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    7200             : 
    7201             :                         /* check if static properties were destoyed */
    7202             :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7203             :                                 zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
    7204             : 
    7205             :                                 HANDLE_EXCEPTION();
    7206             :                         }
    7207             : 
    7208             :                         goto fetch_static_prop_return;
    7209             :                 } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
    7210             :                         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);
    7211             :                         if (UNEXPECTED(ce == NULL)) {
    7212             :                                 if (IS_CONST != IS_CONST) {
    7213             :                                         zend_string_release(name);
    7214             :                                 }
    7215             : 
    7216             :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7217             :                         }
    7218             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7219             :                 }
    7220             :         } else {
    7221             :                 if (IS_UNUSED == IS_UNUSED) {
    7222         793 :                         ce = zend_fetch_class(NULL, opline->op2.num);
    7223         793 :                         if (UNEXPECTED(ce == NULL)) {
    7224             :                                 ZEND_ASSERT(EG(exception));
    7225           1 :                                 if (IS_CONST != IS_CONST) {
    7226             :                                         zend_string_release(name);
    7227             :                                 }
    7228             : 
    7229           1 :                                 HANDLE_EXCEPTION();
    7230             :                         }
    7231             :                 } else {
    7232             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7233             :                 }
    7234        1261 :                 if (IS_CONST == IS_CONST &&
    7235        1261 :                     (retval = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    7236             : 
    7237             :                         /* check if static properties were destoyed */
    7238         469 :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7239           2 :                                 zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
    7240             : 
    7241           2 :                                 HANDLE_EXCEPTION();
    7242             :                         }
    7243             : 
    7244         467 :                         goto fetch_static_prop_return;
    7245             :                 }
    7246             :         }
    7247         323 :         retval = zend_std_get_static_property(ce, name, 0);
    7248         323 :         if (UNEXPECTED(EG(exception))) {
    7249           5 :                 if (IS_CONST != IS_CONST) {
    7250             :                         zend_string_release(name);
    7251             :                 }
    7252             : 
    7253           5 :                 HANDLE_EXCEPTION();
    7254             :         }
    7255         318 :         if (IS_CONST == IS_CONST && retval) {
    7256         318 :                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
    7257             :         }
    7258             : 
    7259         318 :         if (IS_CONST != IS_CONST) {
    7260             :                 zend_string_release(name);
    7261             :         }
    7262             : 
    7263             : fetch_static_prop_return:
    7264             :         ZEND_ASSERT(retval != NULL);
    7265        1352 :         if (type == BP_VAR_R || type == BP_VAR_IS) {
    7266        1434 :                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    7267             :         } else {
    7268         218 :                 ZVAL_INDIRECT(EX_VAR(opline->result.var), retval);
    7269             :         }
    7270         785 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7271             : }
    7272             : 
    7273         555 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7274             : {
    7275         555 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7276             : }
    7277             : 
    7278         166 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7279             : {
    7280         166 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7281             : }
    7282             : 
    7283          51 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7284             : {
    7285          51 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_RW ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7286             : }
    7287             : 
    7288           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7289             : {
    7290           2 :         USE_OPLINE
    7291             : 
    7292           4 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    7293           0 :                 ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_W ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7294             :         } else {
    7295           2 :                 ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_R ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7296             :         }
    7297             : }
    7298             : 
    7299           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7300             : {
    7301           6 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7302             : }
    7303             : 
    7304          13 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_STATIC_PROP_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7305             : {
    7306          13 :         ZEND_VM_TAIL_CALL(zend_fetch_static_prop_helper_SPEC_CONST_UNUSED(BP_VAR_IS ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_CC));
    7307             : }
    7308             : 
    7309           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7310             : {
    7311           0 :         USE_OPLINE
    7312             :         zval *container;
    7313             :         zend_free_op free_op1;
    7314             : 
    7315             :         SAVE_OPLINE();
    7316             : 
    7317           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    7318             :         if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
    7319           0 :             zend_throw_error(NULL, "Cannot use temporary expression in write context");
    7320             : 
    7321             : 
    7322           0 :                         HANDLE_EXCEPTION();
    7323             :         }
    7324             :                 container = NULL;
    7325             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
    7326             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    7327             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    7328             :                 }
    7329             : 
    7330             : 
    7331             :         } else {
    7332             :                 if (IS_UNUSED == IS_UNUSED) {
    7333           0 :                         zend_throw_error(NULL, "Cannot use [] for reading");
    7334             : 
    7335             : 
    7336           0 :                         HANDLE_EXCEPTION();
    7337             :                 }
    7338             :                 container = EX_CONSTANT(opline->op1);
    7339             :                 zend_fetch_dimension_address_read_R(EX_VAR(opline->result.var), container, NULL, IS_UNUSED);
    7340             : 
    7341             : 
    7342             :         }
    7343             :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7344             : }
    7345             : 
    7346           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7347             : {
    7348           2 :         USE_OPLINE
    7349             :         zval *function_name;
    7350             :         zend_class_entry *ce;
    7351             :         zend_object *object;
    7352             :         zend_function *fbc;
    7353             :         zend_execute_data *call;
    7354             : 
    7355             :         SAVE_OPLINE();
    7356             : 
    7357             :         if (IS_CONST == IS_CONST) {
    7358             :                 /* no function found. try a static method in class */
    7359           2 :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    7360           2 :                 if (UNEXPECTED(ce == NULL)) {
    7361           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);
    7362           2 :                         if (UNEXPECTED(ce == NULL)) {
    7363           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7364           0 :                                         HANDLE_EXCEPTION();
    7365             :                                 }
    7366           0 :                                 zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    7367           0 :                                 HANDLE_EXCEPTION();
    7368             :                         }
    7369           2 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    7370             :                 }
    7371             :         } else if (IS_CONST == IS_UNUSED) {
    7372             :                 ce = zend_fetch_class(NULL, opline->op1.num);
    7373             :                 if (UNEXPECTED(ce == NULL)) {
    7374             :                         ZEND_ASSERT(EG(exception));
    7375             : 
    7376             :                         HANDLE_EXCEPTION();
    7377             :                 }
    7378             :         } else {
    7379             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    7380             :         }
    7381             : 
    7382           2 :         if (IS_CONST == IS_CONST &&
    7383             :             IS_UNUSED == IS_CONST &&
    7384             :             EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
    7385             :                 /* nothing to do */
    7386           2 :         } else if (IS_CONST != IS_CONST &&
    7387             :                    IS_UNUSED == IS_CONST &&
    7388             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
    7389             :                 /* do nothing */
    7390           2 :         } else if (IS_UNUSED != IS_UNUSED) {
    7391             : 
    7392             : 
    7393             :                 function_name = NULL;
    7394             :                 if (IS_UNUSED != IS_CONST) {
    7395             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    7396             :                                 do {
    7397             :                                         if (IS_UNUSED & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
    7398             :                                                 function_name = Z_REFVAL_P(function_name);
    7399             :                                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    7400             :                                                         break;
    7401             :                                                 }
    7402             :                                         } else if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    7403             :                                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    7404             :                                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7405             :                                                         HANDLE_EXCEPTION();
    7406             :                                                 }
    7407             :                                         }
    7408             :                                         zend_throw_error(NULL, "Function name must be a string");
    7409             : 
    7410             :                                         HANDLE_EXCEPTION();
    7411             :                                 } while (0);
    7412             :                         }
    7413             :                 }
    7414             : 
    7415             :                 if (ce->get_static_method) {
    7416             :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name));
    7417             :                 } else {
    7418             :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_UNUSED == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    7419             :                 }
    7420             :                 if (UNEXPECTED(fbc == NULL)) {
    7421             :                         if (EXPECTED(!EG(exception))) {
    7422             :                                 zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
    7423             :                         }
    7424             : 
    7425             :                         HANDLE_EXCEPTION();
    7426             :                 }
    7427             :                 if (IS_UNUSED == IS_CONST &&
    7428             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    7429             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
    7430             :                         if (IS_CONST == IS_CONST) {
    7431             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    7432             :                         } else {
    7433             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    7434             :                         }
    7435             :                 }
    7436             :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    7437             :                         init_func_run_time_cache(&fbc->op_array);
    7438             :                 }
    7439             :                 if (IS_UNUSED != IS_CONST) {
    7440             : 
    7441             :                 }
    7442             :         } else {
    7443           2 :                 if (UNEXPECTED(ce->constructor == NULL)) {
    7444           1 :                         zend_throw_error(NULL, "Cannot call constructor");
    7445           1 :                         HANDLE_EXCEPTION();
    7446             :                 }
    7447           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)) {
    7448           0 :                         zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
    7449           0 :                         HANDLE_EXCEPTION();
    7450             :                 }
    7451           1 :                 fbc = ce->constructor;
    7452           1 :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    7453           0 :                         init_func_run_time_cache(&fbc->op_array);
    7454             :                 }
    7455             :         }
    7456             : 
    7457           1 :         object = NULL;
    7458           1 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    7459           3 :                 if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
    7460           1 :                         object = Z_OBJ(EX(This));
    7461           1 :                         ce = object->ce;
    7462             :                 } else {
    7463           0 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    7464             :                                 /* Allowed for PHP 4 compatibility. */
    7465           0 :                                 zend_error(
    7466             :                                         E_DEPRECATED,
    7467             :                                         "Non-static method %s::%s() should not be called statically",
    7468           0 :                                         ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
    7469           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7470           0 :                                         HANDLE_EXCEPTION();
    7471             :                                 }
    7472             :                         } else {
    7473             :                                 /* An internal function assumes $this is present and won't check that.
    7474             :                                  * So PHP would crash by allowing the call. */
    7475           0 :                                 zend_throw_error(
    7476             :                                         zend_ce_error,
    7477             :                                         "Non-static method %s::%s() cannot be called statically",
    7478           0 :                                         ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
    7479           0 :                                 HANDLE_EXCEPTION();
    7480             :                         }
    7481             :                 }
    7482             :         }
    7483             : 
    7484           1 :         if (IS_CONST == IS_UNUSED) {
    7485             :                 /* previous opcode is ZEND_FETCH_CLASS */
    7486             :                 if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
    7487             :                     (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
    7488             :                         if (Z_TYPE(EX(This)) == IS_OBJECT) {
    7489             :                                 ce = Z_OBJCE(EX(This));
    7490             :                         } else {
    7491             :                                 ce = Z_CE(EX(This));
    7492             :                         }
    7493             :                 }
    7494             :         }
    7495             : 
    7496           2 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    7497             :                 fbc, opline->extended_value, ce, object);
    7498           1 :         call->prev_execute_data = EX(call);
    7499           1 :         EX(call) = call;
    7500             : 
    7501           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7502             : }
    7503             : 
    7504          17 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_VERIFY_RETURN_TYPE_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7505             : {
    7506          17 :         USE_OPLINE
    7507             : 
    7508             :         SAVE_OPLINE();
    7509          17 :         if (IS_CONST == IS_UNUSED) {
    7510             :                 zend_verify_missing_return_type(EX(func), CACHE_ADDR(opline->op2.num));
    7511             :         } else {
    7512             : /* prevents "undefined variable opline" errors */
    7513             : #if 0 || (IS_CONST != IS_UNUSED)
    7514             :                 zval *retval_ref, *retval_ptr;
    7515             : 
    7516          17 :                 zend_arg_info *ret_info = EX(func)->common.arg_info - 1;
    7517             : 
    7518          17 :                 retval_ref = retval_ptr = EX_CONSTANT(opline->op1);
    7519             : 
    7520             :                 if (IS_CONST == IS_CONST) {
    7521          17 :                         ZVAL_COPY(EX_VAR(opline->result.var), retval_ptr);
    7522          17 :                         retval_ref = retval_ptr = EX_VAR(opline->result.var);
    7523             :                 } else if (IS_CONST == IS_VAR) {
    7524             :                         if (UNEXPECTED(Z_TYPE_P(retval_ptr) == IS_INDIRECT)) {
    7525             :                                 retval_ptr = Z_INDIRECT_P(retval_ptr);
    7526             :                         }
    7527             :                         ZVAL_DEREF(retval_ptr);
    7528             :                 } else if (IS_CONST == IS_CV) {
    7529             :                         ZVAL_DEREF(retval_ptr);
    7530             :                 }
    7531             : 
    7532          26 :                 if (UNEXPECTED(!ret_info->class_name
    7533             :                         && ret_info->type_hint != IS_CALLABLE
    7534             :                         && ret_info->type_hint != IS_ITERABLE
    7535             :                         && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr))
    7536             :                         && !(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)
    7537             :                         && retval_ref != retval_ptr)
    7538             :                 ) {
    7539             :                         /* A cast might happen - unwrap the reference if this is a by-value return */
    7540           0 :                         if (Z_REFCOUNT_P(retval_ref) == 1) {
    7541           0 :                                 ZVAL_UNREF(retval_ref);
    7542             :                         } else {
    7543             :                                 Z_DELREF_P(retval_ref);
    7544           0 :                                 ZVAL_COPY(retval_ref, retval_ptr);
    7545             :                         }
    7546           0 :                         retval_ptr = retval_ref;
    7547             :                 }
    7548          17 :                 zend_verify_return_type(EX(func), retval_ptr, CACHE_ADDR(opline->op2.num));
    7549             : 
    7550          17 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7551             :                         if (IS_CONST == IS_CONST) {
    7552             :                                 zval_ptr_dtor_nogc(retval_ptr);
    7553             :                         }
    7554             :                 }
    7555             : #endif
    7556             :         }
    7557          17 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7558             : }
    7559             : 
    7560       14277 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7561             : {
    7562       14277 :         USE_OPLINE
    7563             : 
    7564             :         zval *expr_ptr, new_expr;
    7565             : 
    7566             :         SAVE_OPLINE();
    7567       14277 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    7568             :             UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    7569             :                 expr_ptr = NULL;
    7570             :                 ZVAL_MAKE_REF(expr_ptr);
    7571             :                 Z_ADDREF_P(expr_ptr);
    7572             : 
    7573             :         } else {
    7574       14277 :                 expr_ptr = EX_CONSTANT(opline->op1);
    7575       14277 :                 if (IS_CONST == IS_TMP_VAR) {
    7576             :                         /* pass */
    7577             :                 } else if (IS_CONST == IS_CONST) {
    7578       14277 :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    7579             :                                 Z_ADDREF_P(expr_ptr);
    7580             :                         }
    7581             :                 } else if (IS_CONST == IS_CV) {
    7582             :                         ZVAL_DEREF(expr_ptr);
    7583             :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    7584             :                                 Z_ADDREF_P(expr_ptr);
    7585             :                         }
    7586             :                 } else /* if (IS_CONST == IS_VAR) */ {
    7587             :                         if (UNEXPECTED(Z_ISREF_P(expr_ptr))) {
    7588             :                                 zend_refcounted *ref = Z_COUNTED_P(expr_ptr);
    7589             : 
    7590             :                                 expr_ptr = Z_REFVAL_P(expr_ptr);
    7591             :                                 if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    7592             :                                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    7593             :                                         expr_ptr = &new_expr;
    7594             :                                         efree_size(ref, sizeof(zend_reference));
    7595             :                                 } else if (Z_OPT_REFCOUNTED_P(expr_ptr)) {
    7596             :                                         Z_ADDREF_P(expr_ptr);
    7597             :                                 }
    7598             :                         }
    7599             :                 }
    7600             :         }
    7601             : 
    7602       14277 :         if (IS_UNUSED != IS_UNUSED) {
    7603             : 
    7604             :                 zval *offset = NULL;
    7605             :                 zend_string *str;
    7606             :                 zend_ulong hval;
    7607             : 
    7608             : add_again:
    7609             :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    7610             :                         str = Z_STR_P(offset);
    7611             :                         if (IS_UNUSED != IS_CONST) {
    7612             :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    7613             :                                         goto num_index;
    7614             :                                 }
    7615             :                         }
    7616             : str_index:
    7617             :                         zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    7618             :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    7619             :                         hval = Z_LVAL_P(offset);
    7620             : num_index:
    7621             :                         zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    7622             :                 } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
    7623             :                         offset = Z_REFVAL_P(offset);
    7624             :                         goto add_again;
    7625             :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    7626             :                         str = ZSTR_EMPTY_ALLOC();
    7627             :                         goto str_index;
    7628             :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    7629             :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7630             :                         goto num_index;
    7631             :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    7632             :                         hval = 0;
    7633             :                         goto num_index;
    7634             :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    7635             :                         hval = 1;
    7636             :                         goto num_index;
    7637             :                 } else if (IS_UNUSED == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    7638             :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    7639             :                         str = ZSTR_EMPTY_ALLOC();
    7640             :                         goto str_index;
    7641             :                 } else {
    7642             :                         zend_error(E_WARNING, "Illegal offset type");
    7643             :                         zval_ptr_dtor(expr_ptr);
    7644             :                 }
    7645             : 
    7646             :         } else {
    7647       14277 :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    7648             :         }
    7649       14277 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7650             : }
    7651             : 
    7652        1234 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7653             : {
    7654             :         zval *array;
    7655             :         uint32_t size;
    7656        1234 :         USE_OPLINE
    7657             : 
    7658        1234 :         array = EX_VAR(opline->result.var);
    7659             :         if (IS_CONST != IS_UNUSED) {
    7660        1234 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    7661             :         } else {
    7662             :                 size = 0;
    7663             :         }
    7664        1234 :         ZVAL_NEW_ARR(array);
    7665        1234 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    7666             : 
    7667             :         if (IS_CONST != IS_UNUSED) {
    7668             :                 /* Explicitly initialize array as not-packed if flag is set */
    7669        1234 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    7670          14 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    7671             :                 }
    7672             :         }
    7673             : 
    7674        1234 :         if (IS_CONST == IS_UNUSED) {
    7675             :                 ZEND_VM_NEXT_OPCODE();
    7676             : #if 0 || (IS_CONST != IS_UNUSED)
    7677             :         } else {
    7678        1234 :                 ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    7679             : #endif
    7680             :         }
    7681             : }
    7682             : 
    7683           5 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7684             : {
    7685           5 :         USE_OPLINE
    7686             :         zval tmp, *varname;
    7687             :         HashTable *target_symbol_table;
    7688             : 
    7689             : 
    7690             :         SAVE_OPLINE();
    7691           5 :         if (IS_CONST == IS_CV &&
    7692             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7693             :                 zval *var = EX_VAR(opline->op1.var);
    7694             : 
    7695             :                 if (Z_REFCOUNTED_P(var)) {
    7696             :                         zend_refcounted *garbage = Z_COUNTED_P(var);
    7697             : 
    7698             :                         if (!--GC_REFCOUNT(garbage)) {
    7699             :                                 ZVAL_UNDEF(var);
    7700             :                                 zval_dtor_func(garbage);
    7701             :                         } else {
    7702             :                                 zval *z = var;
    7703             :                                 ZVAL_DEREF(z);
    7704             :                                 if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
    7705             :                                         ZVAL_UNDEF(var);
    7706             :                                         gc_possible_root(Z_COUNTED_P(z));
    7707             :                                 } else {
    7708             :                                         ZVAL_UNDEF(var);
    7709             :                                 }
    7710             :                         }
    7711             :                 } else {
    7712             :                         ZVAL_UNDEF(var);
    7713             :                 }
    7714             :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7715             :         }
    7716             : 
    7717           5 :         varname = EX_CONSTANT(opline->op1);
    7718             : 
    7719           5 :         ZVAL_UNDEF(&tmp);
    7720           5 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7721             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    7722             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    7723             :                 }
    7724             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7725             :                 varname = &tmp;
    7726             :         }
    7727             : 
    7728          10 :         target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7729           5 :         zend_hash_del_ind(target_symbol_table, Z_STR_P(varname));
    7730             : 
    7731           5 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7732             :                 zend_string_release(Z_STR(tmp));
    7733             :         }
    7734             : 
    7735           5 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7736             : }
    7737             : 
    7738           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7739             : {
    7740           0 :         USE_OPLINE
    7741             :         zval tmp, *varname;
    7742             :         zend_class_entry *ce;
    7743             : 
    7744             : 
    7745             :         SAVE_OPLINE();
    7746             : 
    7747           0 :         varname = EX_CONSTANT(opline->op1);
    7748             : 
    7749           0 :         ZVAL_UNDEF(&tmp);
    7750           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7751             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(varname) == IS_UNDEF)) {
    7752             :                         varname = GET_OP1_UNDEF_CV(varname, BP_VAR_R);
    7753             :                 }
    7754             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7755             :                 varname = &tmp;
    7756             :         }
    7757             : 
    7758           0 :         if (IS_UNUSED == IS_CONST) {
    7759             :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)));
    7760             :                 if (UNEXPECTED(ce == NULL)) {
    7761             :                         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);
    7762             :                         if (UNEXPECTED(ce == NULL)) {
    7763             :                                 if (EXPECTED(!EG(exception))) {
    7764             :                                         zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op2)));
    7765             :                                 }
    7766             :                                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7767             :                                         zend_string_release(Z_STR(tmp));
    7768             :                                 }
    7769             : 
    7770             :                                 HANDLE_EXCEPTION();
    7771             :                         }
    7772             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7773             :                 }
    7774             :         } else if (IS_UNUSED == IS_UNUSED) {
    7775           0 :                 ce = zend_fetch_class(NULL, opline->op2.num);
    7776           0 :                 if (UNEXPECTED(ce == NULL)) {
    7777             :                         ZEND_ASSERT(EG(exception));
    7778           0 :                         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7779             :                                 zend_string_release(Z_STR(tmp));
    7780             :                         }
    7781             : 
    7782           0 :                         HANDLE_EXCEPTION();
    7783             :                 }
    7784             :         } else {
    7785             :                 ce = Z_CE_P(EX_VAR(opline->op2.var));
    7786             :         }
    7787           0 :         zend_std_unset_static_property(ce, Z_STR_P(varname));
    7788             : 
    7789           0 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7790             :                 zend_string_release(Z_STR(tmp));
    7791             :         }
    7792             : 
    7793           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7794             : }
    7795             : 
    7796          11 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7797             : {
    7798          11 :         USE_OPLINE
    7799             :         zval *value;
    7800             :         int result;
    7801             : 
    7802          11 :         if (IS_CONST == IS_CV &&
    7803             :             (opline->extended_value & ZEND_QUICK_SET)) {
    7804             :                 value = EX_VAR(opline->op1.var);
    7805             :                 if (opline->extended_value & ZEND_ISSET) {
    7806             :                         result =
    7807             :                                 Z_TYPE_P(value) > IS_NULL &&
    7808             :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7809             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7810             :                         SAVE_OPLINE();
    7811             :                         result = !i_zend_is_true(value);
    7812             :                         if (UNEXPECTED(EG(exception))) {
    7813             :                                 HANDLE_EXCEPTION();
    7814             :                         }
    7815             :                 }
    7816             :                 ZEND_VM_SMART_BRANCH(result, 0);
    7817             :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7818             :                 ZEND_VM_SET_NEXT_OPCODE(opline + 1);
    7819             :                 ZEND_VM_CONTINUE();
    7820             :         } else {
    7821             : 
    7822             :                 zval tmp, *varname;
    7823             :                 HashTable *target_symbol_table;
    7824             : 
    7825             :                 SAVE_OPLINE();
    7826          11 :                 varname = EX_CONSTANT(opline->op1);
    7827          11 :                 ZVAL_UNDEF(&tmp);
    7828          11 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7829             :                         ZVAL_STR(&tmp, zval_get_string(varname));
    7830             :                         varname = &tmp;
    7831             :                 }
    7832             : 
    7833          22 :                 target_symbol_table = zend_get_target_symbol_table(execute_data, opline->extended_value & ZEND_FETCH_TYPE_MASK);
    7834          22 :                 value = zend_hash_find_ind(target_symbol_table, Z_STR_P(varname));
    7835             : 
    7836          11 :                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7837             :                         zend_string_release(Z_STR(tmp));
    7838             :                 }
    7839             : 
    7840          11 :                 if (opline->extended_value & ZEND_ISSET) {
    7841          23 :                         result = value && Z_TYPE_P(value) > IS_NULL &&
    7842           2 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7843             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7844           8 :                         result = !value || !i_zend_is_true(value);
    7845             :                 }
    7846             : 
    7847          11 :                 ZEND_VM_SMART_BRANCH(result, 1);
    7848          10 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7849          10 :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7850             :         }
    7851             : }
    7852             : 
    7853         185 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_STATIC_PROP_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7854             : {
    7855         185 :         USE_OPLINE
    7856             :         zval *value;
    7857             :         int result;
    7858             : 
    7859             :         zval tmp, *varname;
    7860             :         zend_class_entry *ce;
    7861             : 
    7862             :         SAVE_OPLINE();
    7863         185 :         varname = EX_CONSTANT(opline->op1);
    7864         185 :         ZVAL_UNDEF(&tmp);
    7865         185 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    7866             :                 ZVAL_STR(&tmp, zval_get_string(varname));
    7867             :                 varname = &tmp;
    7868             :         }
    7869             : 
    7870         185 :         if (IS_UNUSED == IS_CONST) {
    7871             :                 if (IS_CONST == IS_CONST && EXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)))) != NULL)) {
    7872             :                         value = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)) + sizeof(void*));
    7873             : 
    7874             :                         /* check if static properties were destoyed */
    7875             :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7876             :                                 value = NULL;
    7877             :                         }
    7878             : 
    7879             :                         goto is_static_prop_return;
    7880             :                 } else if (UNEXPECTED((ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) == NULL)) {
    7881             :                         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);
    7882             :                         if (UNEXPECTED(ce == NULL)) {
    7883             :                                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7884             :                         }
    7885             :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce);
    7886             :                 }
    7887             :         } else {
    7888             :                 if (IS_UNUSED == IS_UNUSED) {
    7889         185 :                         ce = zend_fetch_class(NULL, opline->op2.num);
    7890         185 :                         if (UNEXPECTED(ce == NULL)) {
    7891             :                                 ZEND_ASSERT(EG(exception));
    7892           0 :                                 if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7893             :                                         zend_string_release(Z_STR(tmp));
    7894             :                                 }
    7895             : 
    7896           0 :                                 HANDLE_EXCEPTION();
    7897             :                         }
    7898             :                 } else {
    7899             :                         ce = Z_CE_P(EX_VAR(opline->op2.var));
    7900             :                 }
    7901         246 :                 if (IS_CONST == IS_CONST &&
    7902         246 :                     (value = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce)) != NULL) {
    7903             : 
    7904             :                         /* check if static properties were destoyed */
    7905          61 :                         if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
    7906           2 :                                 value = NULL;
    7907             :                         }
    7908             : 
    7909          61 :                         goto is_static_prop_return;
    7910             :                 }
    7911             :         }
    7912             : 
    7913         124 :         value = zend_std_get_static_property(ce, Z_STR_P(varname), 1);
    7914             : 
    7915         124 :         if (IS_CONST == IS_CONST && value) {
    7916         124 :                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value);
    7917             :         }
    7918             : 
    7919         124 :         if (IS_CONST != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) {
    7920             :                 zend_string_release(Z_STR(tmp));
    7921             :         }
    7922             : 
    7923             : is_static_prop_return:
    7924         185 :         if (opline->extended_value & ZEND_ISSET) {
    7925         428 :                 result = value && Z_TYPE_P(value) > IS_NULL &&
    7926           0 :                     (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    7927             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    7928           0 :                 result = !value || !i_zend_is_true(value);
    7929             :         }
    7930             : 
    7931         185 :         ZEND_VM_SMART_BRANCH(result, 1);
    7932         182 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    7933         182 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7934             : }
    7935             : 
    7936         752 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7937             : {
    7938         752 :         USE_OPLINE
    7939             :         zval *zfunc;
    7940             :         zval *object;
    7941             :         zend_class_entry *called_scope;
    7942             : 
    7943             :         SAVE_OPLINE();
    7944             : 
    7945         752 :         zfunc = zend_hash_find(EG(function_table), Z_STR_P(EX_CONSTANT(opline->op1)));
    7946             :         ZEND_ASSERT(zfunc != NULL && Z_FUNC_P(zfunc)->type == ZEND_USER_FUNCTION);
    7947             : 
    7948        1504 :         if (Z_TYPE(EX(This)) == IS_OBJECT) {
    7949         242 :                 called_scope = Z_OBJCE(EX(This));
    7950         249 :                 if (UNEXPECTED((Z_FUNC_P(zfunc)->common.fn_flags & ZEND_ACC_STATIC) ||
    7951             :                                 (EX(func)->common.fn_flags & ZEND_ACC_STATIC))) {
    7952           7 :                         object = NULL;
    7953             :                 } else {
    7954         235 :                         object = &EX(This);
    7955             :                 }
    7956             :         } else {
    7957         510 :                 called_scope = Z_CE(EX(This));
    7958         510 :                 object = NULL;
    7959             :         }
    7960         752 :         zend_create_closure(EX_VAR(opline->result.var), Z_FUNC_P(zfunc),
    7961         752 :                 EX(func)->op_array.scope, called_scope, object);
    7962             : 
    7963         752 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    7964             : }
    7965             : 
    7966          66 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7967             : {
    7968          66 :         USE_OPLINE
    7969             : 
    7970          66 :         zend_generator *generator = zend_get_running_generator(execute_data);
    7971             : 
    7972             :         SAVE_OPLINE();
    7973          66 :         if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) {
    7974           0 :                 zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator");
    7975             : 
    7976             : 
    7977           0 :                 HANDLE_EXCEPTION();
    7978             :         }
    7979             : 
    7980             :         /* Destroy the previously yielded value */
    7981          66 :         zval_ptr_dtor(&generator->value);
    7982             : 
    7983             :         /* Destroy the previously yielded key */
    7984          66 :         zval_ptr_dtor(&generator->key);
    7985             : 
    7986             :         /* Set the new yielded value */
    7987             :         if (IS_CONST != IS_UNUSED) {
    7988             : 
    7989             : 
    7990          66 :                 if (UNEXPECTED(EX(func)->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
    7991             :                         /* Constants and temporary variables aren't yieldable by reference,
    7992             :                          * but we still allow them with a notice. */
    7993             :                         if (IS_CONST & (IS_CONST|IS_TMP_VAR)) {
    7994             :                                 zval *value;
    7995             : 
    7996           1 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7997             : 
    7998           1 :                                 value = EX_CONSTANT(opline->op1);
    7999           1 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8000             :                                 if (IS_CONST == IS_CONST) {
    8001           1 :                                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    8002           0 :                                                 Z_ADDREF(generator->value);
    8003             :                                         }
    8004             :                                 }
    8005             :                         } else {
    8006             :                                 zval *value_ptr = NULL;
    8007             : 
    8008             :                                 /* If a function call result is yielded and the function did
    8009             :                                  * not return by reference we throw a notice. */
    8010             :                                 if (IS_CONST == IS_VAR &&
    8011             :                                     (value_ptr == &EG(uninitialized_zval) ||
    8012             :                                      (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    8013             :                                       !Z_ISREF_P(value_ptr)))) {
    8014             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    8015             :                                 } else {
    8016             :                                         ZVAL_MAKE_REF(value_ptr);
    8017             :                                 }
    8018             :                                 ZVAL_COPY(&generator->value, value_ptr);
    8019             : 
    8020             :                         }
    8021             :                 } else {
    8022          65 :                         zval *value = EX_CONSTANT(opline->op1);
    8023             : 
    8024             :                         /* Consts, temporary variables and references need copying */
    8025             :                         if (IS_CONST == IS_CONST) {
    8026          65 :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8027          65 :                                 if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->value))) {
    8028           0 :                                         Z_ADDREF(generator->value);
    8029             :                                 }
    8030             :                         } else if (IS_CONST == IS_TMP_VAR) {
    8031             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8032             :             } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(value)) {
    8033             :                                 ZVAL_COPY(&generator->value, Z_REFVAL_P(value));
    8034             : 
    8035             :                         } else {
    8036             :                                 ZVAL_COPY_VALUE(&generator->value, value);
    8037             :                                 if (IS_CONST == IS_CV) {
    8038             :                                         if (Z_OPT_REFCOUNTED_P(value)) Z_ADDREF_P(value);
    8039             :                                 }
    8040             :                         }
    8041             :                 }
    8042             :         } else {
    8043             :                 /* If no value was specified yield null */
    8044             :                 ZVAL_NULL(&generator->value);
    8045             :         }
    8046             : 
    8047             :         /* Set the new yielded key */
    8048          66 :         if (IS_UNUSED != IS_UNUSED) {
    8049             : 
    8050             :                 zval *key = NULL;
    8051             : 
    8052             :                 /* Consts, temporary variables and references need copying */
    8053             :                 if (IS_UNUSED == IS_CONST) {
    8054             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8055             :                         if (UNEXPECTED(Z_OPT_REFCOUNTED(generator->key))) {
    8056             :                                 Z_ADDREF(generator->key);
    8057             :                         }
    8058             :                 } else if (IS_UNUSED == IS_TMP_VAR) {
    8059             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8060             :                 } else if ((IS_UNUSED & (IS_VAR|IS_CV)) && Z_ISREF_P(key)) {
    8061             :                         ZVAL_COPY(&generator->key, Z_REFVAL_P(key));
    8062             : 
    8063             :                 } else {
    8064             :                         ZVAL_COPY_VALUE(&generator->key, key);
    8065             :                         if (IS_UNUSED == IS_CV) {
    8066             :                                 if (Z_OPT_REFCOUNTED_P(key)) Z_ADDREF_P(key);
    8067             :                         }
    8068             :                 }
    8069             : 
    8070             :                 if (Z_TYPE(generator->key) == IS_LONG
    8071             :                     && Z_LVAL(generator->key) > generator->largest_used_integer_key
    8072             :                 ) {
    8073             :                         generator->largest_used_integer_key = Z_LVAL(generator->key);
    8074             :                 }
    8075             :         } else {
    8076             :                 /* If no key was specified we use auto-increment keys */
    8077          66 :                 generator->largest_used_integer_key++;
    8078          66 :                 ZVAL_LONG(&generator->key, generator->largest_used_integer_key);
    8079             :         }
    8080             : 
    8081          66 :         if (RETURN_VALUE_USED(opline)) {
    8082             :                 /* If the return value of yield is used set the send
    8083             :                  * target and initialize it to NULL */
    8084           7 :                 generator->send_target = EX_VAR(opline->result.var);
    8085           7 :                 ZVAL_NULL(generator->send_target);
    8086             :         } else {
    8087          59 :                 generator->send_target = NULL;
    8088             :         }
    8089             : 
    8090             :         /* We increment to the next op, so we are at the correct position when the
    8091             :          * generator is resumed. */
    8092          66 :         ZEND_VM_INC_OPCODE();
    8093             : 
    8094             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    8095             :          * variable in execute_data so we don't resume at an old position. */
    8096             :         SAVE_OPLINE();
    8097             : 
    8098          66 :         ZEND_VM_RETURN();
    8099             : }
    8100             : 
    8101         280 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8102             : {
    8103         280 :         USE_OPLINE
    8104             : 
    8105             :         zval *op1, *op2, *result;
    8106             : 
    8107         280 :         op1 = EX_CONSTANT(opline->op1);
    8108         560 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8109         280 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8110         279 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8111         248 :                         result = EX_VAR(opline->result.var);
    8112             :                         fast_long_add_function(result, op1, op2);
    8113         248 :                         ZEND_VM_NEXT_OPCODE();
    8114          31 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8115          30 :                         result = EX_VAR(opline->result.var);
    8116          30 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2));
    8117          30 :                         ZEND_VM_NEXT_OPCODE();
    8118             :                 }
    8119           1 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8120           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8121           0 :                         result = EX_VAR(opline->result.var);
    8122           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2));
    8123           0 :                         ZEND_VM_NEXT_OPCODE();
    8124           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8125           0 :                         result = EX_VAR(opline->result.var);
    8126           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2)));
    8127           0 :                         ZEND_VM_NEXT_OPCODE();
    8128             :                 }
    8129             :         }
    8130             : 
    8131             :         SAVE_OPLINE();
    8132           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8133             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8134             :         }
    8135           2 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8136           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8137             :         }
    8138           2 :         add_function(EX_VAR(opline->result.var), op1, op2);
    8139             : 
    8140             : 
    8141           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8142             : }
    8143             : 
    8144           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8145             : {
    8146           1 :         USE_OPLINE
    8147             : 
    8148             :         zval *op1, *op2, *result;
    8149             : 
    8150           1 :         op1 = EX_CONSTANT(opline->op1);
    8151           2 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8152           1 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8153           1 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8154           0 :                         result = EX_VAR(opline->result.var);
    8155             :                         fast_long_sub_function(result, op1, op2);
    8156           0 :                         ZEND_VM_NEXT_OPCODE();
    8157           1 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8158           0 :                         result = EX_VAR(opline->result.var);
    8159           0 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2));
    8160           0 :                         ZEND_VM_NEXT_OPCODE();
    8161             :                 }
    8162           0 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8163           0 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8164           0 :                         result = EX_VAR(opline->result.var);
    8165           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2));
    8166           0 :                         ZEND_VM_NEXT_OPCODE();
    8167           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8168           0 :                         result = EX_VAR(opline->result.var);
    8169           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2)));
    8170           0 :                         ZEND_VM_NEXT_OPCODE();
    8171             :                 }
    8172             :         }
    8173             : 
    8174             :         SAVE_OPLINE();
    8175           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8176             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8177             :         }
    8178           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8179           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8180             :         }
    8181           1 :         sub_function(EX_VAR(opline->result.var), op1, op2);
    8182             : 
    8183             : 
    8184           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8185             : }
    8186             : 
    8187        2671 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8188             : {
    8189        2671 :         USE_OPLINE
    8190             : 
    8191             :         zval *op1, *op2, *result;
    8192             : 
    8193        2671 :         op1 = EX_CONSTANT(opline->op1);
    8194        5342 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8195        2671 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8196        2664 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8197             :                         zend_long overflow;
    8198             : 
    8199        2644 :                         result = EX_VAR(opline->result.var);
    8200        2644 :                         ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
    8201        2644 :                         Z_TYPE_INFO_P(result) = overflow ? IS_DOUBLE : IS_LONG;
    8202        2644 :                         ZEND_VM_NEXT_OPCODE();
    8203          20 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8204           2 :                         result = EX_VAR(opline->result.var);
    8205           2 :                         ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2));
    8206           2 :                         ZEND_VM_NEXT_OPCODE();
    8207             :                 }
    8208           7 :         } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8209           7 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8210           0 :                         result = EX_VAR(opline->result.var);
    8211           0 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2));
    8212           0 :                         ZEND_VM_NEXT_OPCODE();
    8213           7 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8214           7 :                         result = EX_VAR(opline->result.var);
    8215           7 :                         ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2)));
    8216           7 :                         ZEND_VM_NEXT_OPCODE();
    8217             :                 }
    8218             :         }
    8219             : 
    8220             :         SAVE_OPLINE();
    8221          18 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8222             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8223             :         }
    8224          18 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8225           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8226             :         }
    8227          18 :         mul_function(EX_VAR(opline->result.var), op1, op2);
    8228             : 
    8229             : 
    8230          18 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8231             : }
    8232             : 
    8233           4 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8234             : {
    8235           4 :         USE_OPLINE
    8236             : 
    8237             :         zval *op1, *op2;
    8238             : 
    8239             :         SAVE_OPLINE();
    8240           4 :         op1 = EX_CONSTANT(opline->op1);
    8241           8 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8242           4 :         fast_div_function(EX_VAR(opline->result.var), op1, op2);
    8243             : 
    8244             : 
    8245           4 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8246             : }
    8247             : 
    8248           2 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8249             : {
    8250           2 :         USE_OPLINE
    8251             : 
    8252             :         zval *op1, *op2, *result;
    8253             : 
    8254           2 :         op1 = EX_CONSTANT(opline->op1);
    8255           4 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8256           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8257           2 :                 if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8258           1 :                         result = EX_VAR(opline->result.var);
    8259           1 :                         if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
    8260             :                                 SAVE_OPLINE();
    8261           1 :                                 zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
    8262           1 :                                 HANDLE_EXCEPTION();
    8263           0 :                         } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
    8264             :                                 /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
    8265           0 :                                 ZVAL_LONG(result, 0);
    8266             :                         } else {
    8267           0 :                                 ZVAL_LONG(result, Z_LVAL_P(op1) % Z_LVAL_P(op2));
    8268             :                         }
    8269           0 :                         ZEND_VM_NEXT_OPCODE();
    8270             :                 }
    8271             :         }
    8272             : 
    8273             :         SAVE_OPLINE();
    8274           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8275             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8276             :         }
    8277           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8278           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8279             :         }
    8280           1 :         mod_function(EX_VAR(opline->result.var), op1, op2);
    8281             : 
    8282             : 
    8283           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8284             : }
    8285             : 
    8286         172 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8287             : {
    8288         172 :         USE_OPLINE
    8289             : 
    8290             :         zval *op1, *op2;
    8291             : 
    8292         172 :         op1 = EX_CONSTANT(opline->op1);
    8293         344 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8294         515 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    8295         172 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)
    8296         343 :                         && EXPECTED((zend_ulong)Z_LVAL_P(op2) < SIZEOF_ZEND_LONG * 8)) {
    8297         171 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) << Z_LVAL_P(op2));
    8298         171 :                 ZEND_VM_NEXT_OPCODE();
    8299             :         }
    8300             : 
    8301             :         SAVE_OPLINE();
    8302           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8303             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8304             :         }
    8305           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8306           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8307             :         }
    8308           1 :         shift_left_function(EX_VAR(opline->result.var), op1, op2);
    8309             : 
    8310             : 
    8311           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8312             : }
    8313             : 
    8314           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8315             : {
    8316           0 :         USE_OPLINE
    8317             : 
    8318             :         zval *op1, *op2;
    8319             : 
    8320           0 :         op1 = EX_CONSTANT(opline->op1);
    8321           0 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8322           0 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    8323           0 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)
    8324           0 :                         && EXPECTED((zend_ulong)Z_LVAL_P(op2) < SIZEOF_ZEND_LONG * 8)) {
    8325           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) >> Z_LVAL_P(op2));
    8326           0 :                 ZEND_VM_NEXT_OPCODE();
    8327             :         }
    8328             : 
    8329             :         SAVE_OPLINE();
    8330           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8331             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8332             :         }
    8333           0 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8334           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8335             :         }
    8336           0 :         shift_right_function(EX_VAR(opline->result.var), op1, op2);
    8337             : 
    8338             : 
    8339           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8340             : }
    8341             : 
    8342           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8343             : {
    8344           1 :         USE_OPLINE
    8345             : 
    8346             :         zval *op1, *op2;
    8347             : 
    8348             :         SAVE_OPLINE();
    8349           1 :         op1 = EX_CONSTANT(opline->op1);
    8350           2 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8351           1 :         pow_function(EX_VAR(opline->result.var), op1, op2);
    8352             : 
    8353             : 
    8354           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8355             : }
    8356             : 
    8357      164682 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8358             : {
    8359      164682 :         USE_OPLINE
    8360             : 
    8361             :         zval *op1, *op2;
    8362             : 
    8363             :         SAVE_OPLINE();
    8364      164682 :         op1 = EX_CONSTANT(opline->op1);
    8365      329364 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8366             : 
    8367             :         do {
    8368      164682 :                 if ((IS_CONST == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) &&
    8369             :                     (IS_CV == IS_CONST || EXPECTED(Z_TYPE_P(op2) == IS_STRING))) {
    8370       84628 :                         zend_string *op1_str = Z_STR_P(op1);
    8371       84628 :                         zend_string *op2_str = Z_STR_P(op2);
    8372             :                         zend_string *str;
    8373             : 
    8374       84628 :                         if (IS_CONST != IS_CONST) {
    8375             :                                 if (UNEXPECTED(ZSTR_LEN(op1_str) == 0)) {
    8376             :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op2_str);
    8377             : 
    8378             :                                         break;
    8379             :                                 }
    8380             :                         }
    8381             :                         if (IS_CV != IS_CONST) {
    8382       84628 :                                 if (UNEXPECTED(ZSTR_LEN(op2_str) == 0)) {
    8383        4271 :                                         ZVAL_STR_COPY(EX_VAR(opline->result.var), op1_str);
    8384             : 
    8385        4271 :                                         break;
    8386             :                                 }
    8387             :                         }
    8388       80357 :                         if (IS_CONST != IS_CONST && IS_CONST != IS_CV &&
    8389             :                             !ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
    8390             :                             size_t len = ZSTR_LEN(op1_str);
    8391             : 
    8392             :                                 str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
    8393             :                                 memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
    8394             :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    8395             :                                 break;
    8396             :                         } else {
    8397      160714 :                                 str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0);
    8398       80357 :                                 memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str));
    8399       80357 :                                 memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
    8400       80357 :                                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    8401             :                         }
    8402             :                 } else {
    8403       80054 :                         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    8404             :                                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8405             :                         }
    8406       80054 :                         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    8407           0 :                                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8408             :                         }
    8409       80054 :                         concat_function(EX_VAR(opline->result.var), op1, op2);
    8410             :                 }
    8411             : 
    8412             :         } while (0);
    8413             : 
    8414      164682 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8415             : }
    8416             : 
    8417         131 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8418             : {
    8419         131 :         USE_OPLINE
    8420             : 
    8421             :         zval *op1, *op2;
    8422             :         int result;
    8423             : 
    8424             :         SAVE_OPLINE();
    8425         131 :         op1 = EX_CONSTANT(opline->op1);
    8426         262 :         op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
    8427         131 :         result = fast_is_identical_function(op1, op2);
    8428             : 
    8429             : 
    8430         131 :         ZEND_VM_SMART_BRANCH(result, 1);
    8431          15 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8432          15 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8433             : }
    8434             : 
    8435         133 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8436             : {
    8437         133 :         USE_OPLINE
    8438             : 
    8439             :         zval *op1, *op2;
    8440             :         int result;
    8441             : 
    8442             :         SAVE_OPLINE();
    8443         133 :         op1 = EX_CONSTANT(opline->op1);
    8444         266 :         op2 = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op2.var);
    8445         133 :         result = fast_is_not_identical_function(op1, op2);
    8446             : 
    8447             : 
    8448         133 :         ZEND_VM_SMART_BRANCH(result, 1);
    8449          10 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8450          10 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8451             : }
    8452             : 
    8453        2800 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8454             : {
    8455        2800 :         USE_OPLINE
    8456             : 
    8457             :         zval *op1, *op2, *result;
    8458             : 
    8459        2800 :         op1 = EX_CONSTANT(opline->op1);
    8460        5600 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8461             :         do {
    8462             :                 int result;
    8463             : 
    8464        2800 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    8465        2785 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8466        2785 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    8467           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8468           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    8469             :                         } else {
    8470           0 :                                 break;
    8471             :                         }
    8472          15 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    8473           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8474           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    8475           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8476           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    8477             :                         } else {
    8478           0 :                                 break;
    8479             :                         }
    8480          15 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    8481          15 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    8482          13 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    8483           2 :                                         result = 1;
    8484          21 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    8485          10 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    8486           9 :                                                 result = 0;
    8487             :                                         } else {
    8488           1 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    8489             :                                         }
    8490             :                                 } else {
    8491           1 :                                         result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
    8492             :                                 }
    8493             : 
    8494             : 
    8495             :                         } else {
    8496           2 :                                 break;
    8497             :                         }
    8498             :                 } else {
    8499           0 :                         break;
    8500             :                 }
    8501        2798 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8502           6 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8503           6 :                 ZEND_VM_NEXT_OPCODE();
    8504             :         } while (0);
    8505             : 
    8506             :         SAVE_OPLINE();
    8507           2 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    8508             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8509             :         }
    8510           2 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    8511           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8512             :         }
    8513           2 :         result = EX_VAR(opline->result.var);
    8514           2 :         compare_function(result, op1, op2);
    8515           2 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    8516             : 
    8517             : 
    8518           2 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8519             : }
    8520             : 
    8521         143 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8522             : {
    8523         143 :         USE_OPLINE
    8524             : 
    8525             :         zval *op1, *op2, *result;
    8526             : 
    8527         143 :         op1 = EX_CONSTANT(opline->op1);
    8528         286 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8529             :         do {
    8530             :                 int result;
    8531             : 
    8532         143 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    8533          17 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8534           1 :                                 result = (Z_LVAL_P(op1) != Z_LVAL_P(op2));
    8535          16 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8536           0 :                                 result = ((double)Z_LVAL_P(op1) != Z_DVAL_P(op2));
    8537             :                         } else {
    8538          16 :                                 break;
    8539             :                         }
    8540         126 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    8541           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    8542           0 :                                 result = (Z_DVAL_P(op1) != Z_DVAL_P(op2));
    8543           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    8544           0 :                                 result = (Z_DVAL_P(op1) != ((double)Z_LVAL_P(op2)));
    8545             :                         } else {
    8546           0 :                                 break;
    8547             :                         }
    8548         126 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    8549         126 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    8550         124 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    8551           1 :                                         result = 0;
    8552         240 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    8553         117 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    8554           6 :                                                 result = 1;
    8555             :                                         } else {
    8556         111 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) != 0);
    8557             :                                         }
    8558             :                                 } else {
    8559           6 :                                         result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) != 0);
    8560             :                                 }
    8561             : 
    8562             : 
    8563             :                         } else {
    8564           2 :                                 break;
    8565             :                         }
    8566             :                 } else {
    8567           0 :                         break;
    8568             :                 }
    8569         125 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8570           2 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8571           2 :                 ZEND_VM_NEXT_OPCODE();
    8572             :         } while (0);
    8573             : 
    8574             :         SAVE_OPLINE();
    8575          18 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    8576             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8577             :         }
    8578          18 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    8579           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8580             :         }
    8581          18 :         result = EX_VAR(opline->result.var);
    8582          18 :         compare_function(result, op1, op2);
    8583          18 :         ZVAL_BOOL(result, Z_LVAL_P(result) != 0);
    8584             : 
    8585             : 
    8586          18 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8587             : }
    8588             : 
    8589      981646 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8590             : {
    8591      981646 :         USE_OPLINE
    8592             : 
    8593             :         zval *op1, *op2, *result;
    8594             : 
    8595      981646 :         op1 = EX_CONSTANT(opline->op1);
    8596     1963292 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8597             :         do {
    8598             :                 int result;
    8599             : 
    8600      981646 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8601      981645 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8602      942447 :                                 result = (Z_LVAL_P(op1) < Z_LVAL_P(op2));
    8603       39198 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8604         286 :                                 result = ((double)Z_LVAL_P(op1) < Z_DVAL_P(op2));
    8605             :                         } else {
    8606       38912 :                                 break;
    8607             :                         }
    8608           1 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8609           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8610           0 :                                 result = (Z_DVAL_P(op1) < Z_DVAL_P(op2));
    8611           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8612           0 :                                 result = (Z_DVAL_P(op1) < ((double)Z_LVAL_P(op2)));
    8613             :                         } else {
    8614           0 :                                 break;
    8615             :                         }
    8616             :                 } else {
    8617           1 :                         break;
    8618             :                 }
    8619      942733 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8620       12935 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8621       12935 :                 ZEND_VM_NEXT_OPCODE();
    8622             :         } while (0);
    8623             : 
    8624             :         SAVE_OPLINE();
    8625       38913 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8626             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8627             :         }
    8628       38913 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8629           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8630             :         }
    8631       38913 :         result = EX_VAR(opline->result.var);
    8632       38913 :         compare_function(result, op1, op2);
    8633       38913 :         ZVAL_BOOL(result, Z_LVAL_P(result) < 0);
    8634             : 
    8635             : 
    8636       38913 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8637             : }
    8638             : 
    8639      158310 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8640             : {
    8641      158310 :         USE_OPLINE
    8642             : 
    8643             :         zval *op1, *op2, *result;
    8644             : 
    8645      158310 :         op1 = EX_CONSTANT(opline->op1);
    8646      316620 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8647             :         do {
    8648             :                 int result;
    8649             : 
    8650      158310 :                 if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) {
    8651      158310 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8652      157857 :                                 result = (Z_LVAL_P(op1) <= Z_LVAL_P(op2));
    8653         453 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8654         452 :                                 result = ((double)Z_LVAL_P(op1) <= Z_DVAL_P(op2));
    8655             :                         } else {
    8656           1 :                                 break;
    8657             :                         }
    8658           0 :                 } else if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_DOUBLE)) {
    8659           0 :                         if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_DOUBLE)) {
    8660           0 :                                 result = (Z_DVAL_P(op1) <= Z_DVAL_P(op2));
    8661           0 :                         } else if (EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8662           0 :                                 result = (Z_DVAL_P(op1) <= ((double)Z_LVAL_P(op2)));
    8663             :                         } else {
    8664           0 :                                 break;
    8665             :                         }
    8666             :                 } else {
    8667           0 :                         break;
    8668             :                 }
    8669      158309 :                 ZEND_VM_SMART_BRANCH(result, 0);
    8670      134859 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    8671      134859 :                 ZEND_VM_NEXT_OPCODE();
    8672             :         } while (0);
    8673             : 
    8674             :         SAVE_OPLINE();
    8675           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8676             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8677             :         }
    8678           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8679           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8680             :         }
    8681           1 :         result = EX_VAR(opline->result.var);
    8682           1 :         compare_function(result, op1, op2);
    8683           1 :         ZVAL_BOOL(result, Z_LVAL_P(result) <= 0);
    8684             : 
    8685             : 
    8686           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8687             : }
    8688             : 
    8689           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SPACESHIP_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8690             : {
    8691           0 :         USE_OPLINE
    8692             : 
    8693             :         zval *op1, *op2;
    8694             : 
    8695             :         SAVE_OPLINE();
    8696           0 :         op1 = EX_CONSTANT(opline->op1);
    8697           0 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8698           0 :         compare_function(EX_VAR(opline->result.var), op1, op2);
    8699             : 
    8700             : 
    8701           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8702             : }
    8703             : 
    8704           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8705             : {
    8706           1 :         USE_OPLINE
    8707             : 
    8708             :         zval *op1, *op2;
    8709             : 
    8710           1 :         op1 = EX_CONSTANT(opline->op1);
    8711           2 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8712           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    8713           2 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8714           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) | Z_LVAL_P(op2));
    8715           0 :                 ZEND_VM_NEXT_OPCODE();
    8716             :         }
    8717             : 
    8718             :         SAVE_OPLINE();
    8719           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8720             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8721             :         }
    8722           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8723           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8724             :         }
    8725           1 :         bitwise_or_function(EX_VAR(opline->result.var), op1, op2);
    8726             : 
    8727             : 
    8728           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8729             : }
    8730             : 
    8731           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8732             : {
    8733           1 :         USE_OPLINE
    8734             : 
    8735             :         zval *op1, *op2;
    8736             : 
    8737           1 :         op1 = EX_CONSTANT(opline->op1);
    8738           2 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8739           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    8740           2 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8741           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) & Z_LVAL_P(op2));
    8742           0 :                 ZEND_VM_NEXT_OPCODE();
    8743             :         }
    8744             : 
    8745             :         SAVE_OPLINE();
    8746           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8747             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8748             :         }
    8749           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8750           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8751             :         }
    8752           1 :         bitwise_and_function(EX_VAR(opline->result.var), op1, op2);
    8753             : 
    8754             : 
    8755           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8756             : }
    8757             : 
    8758           1 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8759             : {
    8760           1 :         USE_OPLINE
    8761             : 
    8762             :         zval *op1, *op2;
    8763             : 
    8764           1 :         op1 = EX_CONSTANT(opline->op1);
    8765           2 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8766           2 :         if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)
    8767           2 :                         && EXPECTED(Z_TYPE_INFO_P(op2) == IS_LONG)) {
    8768           0 :                 ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(op1) ^ Z_LVAL_P(op2));
    8769           0 :                 ZEND_VM_NEXT_OPCODE();
    8770             :         }
    8771             : 
    8772             :         SAVE_OPLINE();
    8773           1 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op1) == IS_UNDEF)) {
    8774             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    8775             :         }
    8776           1 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_INFO_P(op2) == IS_UNDEF)) {
    8777           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    8778             :         }
    8779           1 :         bitwise_xor_function(EX_VAR(opline->result.var), op1, op2);
    8780             : 
    8781             : 
    8782           1 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8783             : }
    8784             : 
    8785           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8786             : {
    8787           0 :         USE_OPLINE
    8788             : 
    8789             :         zval *op1, *op2;
    8790             : 
    8791             :         SAVE_OPLINE();
    8792           0 :         op1 = EX_CONSTANT(opline->op1);
    8793           0 :         op2 = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8794           0 :         boolean_xor_function(EX_VAR(opline->result.var), op1, op2);
    8795             : 
    8796             : 
    8797           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8798             : }
    8799             : 
    8800           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8801             : {
    8802           0 :         USE_OPLINE
    8803             : 
    8804             :         zval *container, *dim, *value, *result;
    8805             : 
    8806             :         SAVE_OPLINE();
    8807           0 :         container = EX_CONSTANT(opline->op1);
    8808           0 :         dim = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    8809           0 :         if (IS_CONST != IS_CONST) {
    8810             :                 if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    8811             : fetch_dim_r_array:
    8812             :                         value = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, IS_CV, BP_VAR_R);
    8813             :                         result = EX_VAR(opline->result.var);
    8814             :                         ZVAL_COPY_UNREF(result, value);
    8815             :                 } else if (EXPECTED(Z_TYPE_P(container) == IS_REFERENCE)) {
    8816             :                         container = Z_REFVAL_P(container);
    8817             :                         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    8818             :                                 goto fetch_dim_r_array;
    8819             :                         } else {
    8820             :                                 goto fetch_dim_r_slow;
    8821             :                         }
    8822             :                 } else {
    8823             : fetch_dim_r_slow:
    8824             :                         result = EX_VAR(opline->result.var);
    8825             :                         zend_fetch_dimension_address_read_R_slow(result, container, dim);
    8826             :                 }
    8827             :         } else {
    8828           0 :                 result = EX_VAR(opline->result.var);
    8829           0 :                 zend_fetch_dimension_address_read_R(result, container, dim, IS_CV);
    8830             :         }
    8831             : 
    8832             : 
    8833           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8834             : }
    8835             : 
    8836           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8837             : {
    8838           0 :         USE_OPLINE
    8839             : 
    8840             :         zval *container;
    8841             : 
    8842             :         SAVE_OPLINE();
    8843           0 :         container = EX_CONSTANT(opline->op1);
    8844           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);
    8845             : 
    8846             : 
    8847           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8848             : }
    8849             : 
    8850           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8851             : {
    8852           0 :         USE_OPLINE
    8853             :         zval *container;
    8854             :         zend_free_op free_op1;
    8855             : 
    8856             :         SAVE_OPLINE();
    8857             : 
    8858           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    8859             :         if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
    8860           0 :             zend_throw_error(NULL, "Cannot use temporary expression in write context");
    8861             : 
    8862             : 
    8863           0 :                         HANDLE_EXCEPTION();
    8864             :         }
    8865             :                 container = NULL;
    8866             :                 zend_fetch_dimension_address_W(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var), IS_CV);
    8867             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    8868             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    8869             :                 }
    8870             : 
    8871             : 
    8872             :         } else {
    8873           0 :                 if (IS_CV == IS_UNUSED) {
    8874             :                         zend_throw_error(NULL, "Cannot use [] for reading");
    8875             : 
    8876             : 
    8877             :                         HANDLE_EXCEPTION();
    8878             :                 }
    8879           0 :                 container = EX_CONSTANT(opline->op1);
    8880           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);
    8881             : 
    8882             : 
    8883             :         }
    8884           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8885             : }
    8886             : 
    8887           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8888             : {
    8889           0 :         USE_OPLINE
    8890             : 
    8891             :         zval *container;
    8892             : 
    8893             :         zval *offset;
    8894             : 
    8895             :         SAVE_OPLINE();
    8896           0 :         container = EX_CONSTANT(opline->op1);
    8897             : 
    8898           0 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    8899             :                 zend_throw_error(NULL, "Using $this when not in object context");
    8900             : 
    8901             :                 HANDLE_EXCEPTION();
    8902             :         }
    8903             : 
    8904           0 :         offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8905             : 
    8906             :         if (IS_CONST == IS_CONST ||
    8907             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    8908           0 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    8909             :                         container = Z_REFVAL_P(container);
    8910             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    8911             :                                 goto fetch_obj_r_no_object;
    8912             :                         }
    8913             :                 } else {
    8914           0 :                         goto fetch_obj_r_no_object;
    8915             :                 }
    8916             :         }
    8917             : 
    8918             :         /* here we are sure we are dealing with an object */
    8919             :         do {
    8920             :                 zend_object *zobj = Z_OBJ_P(container);
    8921             :                 zval *retval;
    8922             : 
    8923             :                 if (IS_CV == IS_CONST &&
    8924             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    8925             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    8926             : 
    8927             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    8928             :                                 retval = OBJ_PROP(zobj, prop_offset);
    8929             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    8930             :                                         ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    8931             :                                         break;
    8932             :                                 }
    8933             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    8934             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    8935             :                                 if (EXPECTED(retval)) {
    8936             :                                         ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    8937             :                                         break;
    8938             :                                 }
    8939             :                         }
    8940             :                 }
    8941             : 
    8942             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    8943             : fetch_obj_r_no_object:
    8944           0 :                         zend_error(E_NOTICE, "Trying to get property of non-object");
    8945           0 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    8946             :                 } else {
    8947             :                         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));
    8948             : 
    8949             :                         if (retval != EX_VAR(opline->result.var)) {
    8950             :                                 ZVAL_COPY_UNREF(EX_VAR(opline->result.var), retval);
    8951             :                         }
    8952             :                 }
    8953             :         } while (0);
    8954             : 
    8955             : 
    8956           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    8957             : }
    8958             : 
    8959           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8960             : {
    8961           0 :         USE_OPLINE
    8962             : 
    8963             :         zval *container;
    8964             : 
    8965             :         zval *offset;
    8966             : 
    8967             :         SAVE_OPLINE();
    8968           0 :         container = EX_CONSTANT(opline->op1);
    8969             : 
    8970           0 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    8971             :                 zend_throw_error(NULL, "Using $this when not in object context");
    8972             : 
    8973             :                 HANDLE_EXCEPTION();
    8974             :         }
    8975             : 
    8976           0 :         offset  = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    8977             : 
    8978             :         if (IS_CONST == IS_CONST ||
    8979             :             (IS_CONST != IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT))) {
    8980           0 :                 if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    8981             :                         container = Z_REFVAL_P(container);
    8982             :                         if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) {
    8983             :                                 goto fetch_obj_is_no_object;
    8984             :                         }
    8985             :                 } else {
    8986           0 :                         goto fetch_obj_is_no_object;
    8987             :                 }
    8988             :         }
    8989             : 
    8990             :         /* here we are sure we are dealing with an object */
    8991             :         do {
    8992             :                 zend_object *zobj = Z_OBJ_P(container);
    8993             :                 zval *retval;
    8994             : 
    8995             :                 if (IS_CV == IS_CONST &&
    8996             :                         EXPECTED(zobj->ce == CACHED_PTR(Z_CACHE_SLOT_P(offset)))) {
    8997             :                         uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(offset) + sizeof(void*));
    8998             : 
    8999             :                         if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
    9000             :                                 retval = OBJ_PROP(zobj, prop_offset);
    9001             :                                 if (EXPECTED(Z_TYPE_P(retval) != IS_UNDEF)) {
    9002             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9003             :                                         break;
    9004             :                                 }
    9005             :                         } else if (EXPECTED(zobj->properties != NULL)) {
    9006             :                                 retval = zend_hash_find(zobj->properties, Z_STR_P(offset));
    9007             :                                 if (EXPECTED(retval)) {
    9008             :                                         ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9009             :                                         break;
    9010             :                                 }
    9011             :                         }
    9012             :                 }
    9013             : 
    9014             :                 if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
    9015             : fetch_obj_is_no_object:
    9016           0 :                         ZVAL_NULL(EX_VAR(opline->result.var));
    9017             :                 } else {
    9018             : 
    9019             :                         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));
    9020             : 
    9021             :                         if (retval != EX_VAR(opline->result.var)) {
    9022             :                                 ZVAL_COPY(EX_VAR(opline->result.var), retval);
    9023             :                         }
    9024             :                 }
    9025             :         } while (0);
    9026             : 
    9027             : 
    9028           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9029             : }
    9030             : 
    9031           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9032             : {
    9033           0 :         USE_OPLINE
    9034             :         zval *container;
    9035             : 
    9036           0 :         if (zend_is_by_ref_func_arg_fetch(opline, EX(call))) {
    9037             :                 /* Behave like FETCH_OBJ_W */
    9038             :                 zend_free_op free_op1;
    9039             :                 zval *property;
    9040             : 
    9041             :                 SAVE_OPLINE();
    9042           0 :                 property = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9043           0 :                 container = NULL;
    9044             : 
    9045           0 :                 if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(container) == IS_UNDEF)) {
    9046             :                         zend_throw_error(NULL, "Using $this when not in object context");
    9047             : 
    9048             :                         HANDLE_EXCEPTION();
    9049             :                 }
    9050             :                 if ((IS_CONST & (IS_CONST|IS_TMP_VAR))) {
    9051           0 :                         zend_throw_error(NULL, "Cannot use temporary expression in write context");
    9052             : 
    9053             : 
    9054           0 :                         HANDLE_EXCEPTION();
    9055             :                 }
    9056             :                 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);
    9057             : 
    9058             :                 if (IS_CONST == IS_VAR && READY_TO_DESTROY(free_op1)) {
    9059             :                         EXTRACT_ZVAL_PTR(EX_VAR(opline->result.var));
    9060             :                 }
    9061             : 
    9062             :                 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9063             :         } else {
    9064           0 :                 ZEND_VM_TAIL_CALL(ZEND_FETCH_OBJ_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    9065             :         }
    9066             : }
    9067             : 
    9068           3 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9069             : {
    9070           3 :         USE_OPLINE
    9071             : 
    9072             :         zval *container;
    9073             : 
    9074             :         SAVE_OPLINE();
    9075           3 :         container = EX_CONSTANT(opline->op1);
    9076           6 :         zend_fetch_dimension_address_read_LIST(EX_VAR(opline->result.var), container, _get_zval_ptr_cv_undef(execute_data, opline->op2.var));
    9077             : 
    9078           3 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9079             : }
    9080             : 
    9081       20039 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FAST_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9082             : {
    9083       20039 :         USE_OPLINE
    9084             : 
    9085             :         zval *op1, *op2;
    9086             :         zend_string *op1_str, *op2_str, *str;
    9087             : 
    9088             :         SAVE_OPLINE();
    9089       20039 :         op1 = EX_CONSTANT(opline->op1);
    9090             :         if (IS_CONST == IS_CONST) {
    9091       20039 :                 op1_str = Z_STR_P(op1);
    9092             :         } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    9093             :                 op1_str = zend_string_copy(Z_STR_P(op1));
    9094             :         } else {
    9095             :                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    9096             :                         GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    9097             :                 }
    9098             :                 op1_str = _zval_get_string_func(op1);
    9099             :         }
    9100       40078 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9101       20039 :         if (IS_CV == IS_CONST) {
    9102             :                 op2_str = Z_STR_P(op2);
    9103       20039 :         } else if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    9104       11770 :                 op2_str = zend_string_copy(Z_STR_P(op2));
    9105             :         } else {
    9106       14154 :                 if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    9107           0 :                         GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    9108             :                 }
    9109       14154 :                 op2_str = _zval_get_string_func(op2);
    9110             :         }
    9111             :         do {
    9112       20039 :                 if (IS_CONST != IS_CONST) {
    9113             :                         if (UNEXPECTED(ZSTR_LEN(op1_str) == 0)) {
    9114             :                                 if (IS_CV == IS_CONST) {
    9115             :                                         zend_string_addref(op2_str);
    9116             :                                 }
    9117             :                                 ZVAL_STR(EX_VAR(opline->result.var), op2_str);
    9118             :                                 zend_string_release(op1_str);
    9119             :                                 break;
    9120             :                         }
    9121             :                 }
    9122             :                 if (IS_CV != IS_CONST) {
    9123       20039 :                         if (UNEXPECTED(ZSTR_LEN(op2_str) == 0)) {
    9124             :                                 if (IS_CONST == IS_CONST) {
    9125             :                                         zend_string_addref(op1_str);
    9126             :                                 }
    9127         232 :                                 ZVAL_STR(EX_VAR(opline->result.var), op1_str);
    9128             :                                 zend_string_release(op2_str);
    9129         232 :                                 break;
    9130             :                         }
    9131             :                 }
    9132       39614 :                 str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0);
    9133       19807 :                 memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str));
    9134       19807 :                 memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
    9135       19807 :                 ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
    9136       19807 :                 if (IS_CONST != IS_CONST) {
    9137             :                         zend_string_release(op1_str);
    9138             :                 }
    9139             :                 if (IS_CV != IS_CONST) {
    9140             :                         zend_string_release(op2_str);
    9141             :                 }
    9142             :         } while (0);
    9143             : 
    9144             : 
    9145       20039 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9146             : }
    9147             : 
    9148           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9149             : {
    9150           0 :         USE_OPLINE
    9151             :         zval *function_name;
    9152             : 
    9153             :         zval *object;
    9154             :         zend_function *fbc;
    9155             :         zend_class_entry *called_scope;
    9156             :         zend_object *obj;
    9157             :         zend_execute_data *call;
    9158             :         uint32_t call_info;
    9159             : 
    9160             :         SAVE_OPLINE();
    9161             : 
    9162           0 :         function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9163             : 
    9164           0 :         if (IS_CV != IS_CONST &&
    9165             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    9166             :                 do {
    9167           0 :                         if ((IS_CV & (IS_VAR|IS_CV)) && Z_ISREF_P(function_name)) {
    9168           0 :                                 function_name = Z_REFVAL_P(function_name);
    9169           0 :                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    9170           0 :                                         break;
    9171             :                                 }
    9172           0 :                         } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    9173           0 :                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    9174           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9175           0 :                                         HANDLE_EXCEPTION();
    9176             :                                 }
    9177             :                         }
    9178           0 :                         zend_throw_error(NULL, "Method name must be a string");
    9179             : 
    9180             : 
    9181           0 :                         HANDLE_EXCEPTION();
    9182             :                 } while (0);
    9183             :         }
    9184             : 
    9185           0 :         object = EX_CONSTANT(opline->op1);
    9186             : 
    9187           0 :         if (IS_CONST == IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
    9188             :                 zend_throw_error(NULL, "Using $this when not in object context");
    9189             : 
    9190             :                 HANDLE_EXCEPTION();
    9191             :         }
    9192             : 
    9193             :         if (IS_CONST != IS_UNUSED) {
    9194             :                 do {
    9195             :                         if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
    9196           0 :                                 if ((IS_CONST & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(object))) {
    9197             :                                         object = Z_REFVAL_P(object);
    9198             :                                         if (EXPECTED(Z_TYPE_P(object) == IS_OBJECT)) {
    9199             :                                                 break;
    9200             :                                         }
    9201             :                                 }
    9202           0 :                                 if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(object) == IS_UNDEF)) {
    9203             :                                         object = GET_OP1_UNDEF_CV(object, BP_VAR_R);
    9204             :                                         if (UNEXPECTED(EG(exception) != NULL)) {
    9205             : 
    9206             :                                                 HANDLE_EXCEPTION();
    9207             :                                         }
    9208             :                                 }
    9209           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)));
    9210             : 
    9211             : 
    9212           0 :                                 HANDLE_EXCEPTION();
    9213             :                         }
    9214             :                 } while (0);
    9215             :         }
    9216             : 
    9217             :         obj = Z_OBJ_P(object);
    9218             :         called_scope = obj->ce;
    9219             : 
    9220             :         if (IS_CV != IS_CONST ||
    9221             :             UNEXPECTED((fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope)) == NULL)) {
    9222             :             zend_object *orig_obj = obj;
    9223             : 
    9224             :                 if (UNEXPECTED(obj->handlers->get_method == NULL)) {
    9225             :                         zend_throw_error(NULL, "Object does not support method calls");
    9226             : 
    9227             : 
    9228             :                         HANDLE_EXCEPTION();
    9229             :                 }
    9230             : 
    9231             :                 /* First, locate the function. */
    9232             :                 fbc = obj->handlers->get_method(&obj, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    9233             :                 if (UNEXPECTED(fbc == NULL)) {
    9234             :                         if (EXPECTED(!EG(exception))) {
    9235             :                                 zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(obj->ce->name), Z_STRVAL_P(function_name));
    9236             :                         }
    9237             : 
    9238             : 
    9239             :                         HANDLE_EXCEPTION();
    9240             :                 }
    9241             :                 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             :                     EXPECTED(obj == orig_obj)) {
    9245             :                         CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), called_scope, fbc);
    9246             :                 }
    9247             :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    9248             :                         init_func_run_time_cache(&fbc->op_array);
    9249             :                 }
    9250             :         }
    9251             : 
    9252             :         call_info = ZEND_CALL_NESTED_FUNCTION;
    9253             :         if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_STATIC) != 0)) {
    9254             :                 obj = NULL;
    9255             :         } else if (IS_CONST & (IS_VAR|IS_TMP_VAR|IS_CV)) {
    9256             :                 /* CV may be changed indirectly (e.g. when it's a reference) */
    9257             :                 call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_RELEASE_THIS;
    9258             :                 GC_REFCOUNT(obj)++; /* For $this pointer */
    9259             :         }
    9260             : 
    9261             :         call = zend_vm_stack_push_call_frame(call_info,
    9262             :                 fbc, opline->extended_value, called_scope, obj);
    9263             :         call->prev_execute_data = EX(call);
    9264             :         EX(call) = call;
    9265             : 
    9266             : 
    9267             :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9268             : }
    9269             : 
    9270          82 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9271             : {
    9272          82 :         USE_OPLINE
    9273             :         zval *function_name;
    9274             :         zend_class_entry *ce;
    9275             :         zend_object *object;
    9276             :         zend_function *fbc;
    9277             :         zend_execute_data *call;
    9278             : 
    9279             :         SAVE_OPLINE();
    9280             : 
    9281             :         if (IS_CONST == IS_CONST) {
    9282             :                 /* no function found. try a static method in class */
    9283          82 :                 ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    9284          82 :                 if (UNEXPECTED(ce == NULL)) {
    9285           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);
    9286           9 :                         if (UNEXPECTED(ce == NULL)) {
    9287           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9288           0 :                                         HANDLE_EXCEPTION();
    9289             :                                 }
    9290           0 :                                 zend_throw_error(NULL, "Class '%s' not found", Z_STRVAL_P(EX_CONSTANT(opline->op1)));
    9291           0 :                                 HANDLE_EXCEPTION();
    9292             :                         }
    9293           9 :                         CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce);
    9294             :                 }
    9295             :         } else if (IS_CONST == IS_UNUSED) {
    9296             :                 ce = zend_fetch_class(NULL, opline->op1.num);
    9297             :                 if (UNEXPECTED(ce == NULL)) {
    9298             :                         ZEND_ASSERT(EG(exception));
    9299             : 
    9300             :                         HANDLE_EXCEPTION();
    9301             :                 }
    9302             :         } else {
    9303             :                 ce = Z_CE_P(EX_VAR(opline->op1.var));
    9304             :         }
    9305             : 
    9306          82 :         if (IS_CONST == IS_CONST &&
    9307             :             IS_CV == IS_CONST &&
    9308             :             EXPECTED((fbc = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)))) != NULL)) {
    9309             :                 /* nothing to do */
    9310          82 :         } else if (IS_CONST != IS_CONST &&
    9311             :                    IS_CV == IS_CONST &&
    9312             :                    (fbc = CACHED_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op2)), ce))) {
    9313             :                 /* do nothing */
    9314             :         } else if (IS_CV != IS_UNUSED) {
    9315             : 
    9316             : 
    9317         164 :                 function_name = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9318             :                 if (IS_CV != IS_CONST) {
    9319          82 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    9320             :                                 do {
    9321           2 :                                         if (IS_CV & (IS_VAR|IS_CV) && Z_ISREF_P(function_name)) {
    9322           0 :                                                 function_name = Z_REFVAL_P(function_name);
    9323           0 :                                                 if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
    9324           0 :                                                         break;
    9325             :                                                 }
    9326           2 :                                         } else if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(function_name) == IS_UNDEF)) {
    9327           1 :                                                 GET_OP2_UNDEF_CV(function_name, BP_VAR_R);
    9328           1 :                                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9329           1 :                                                         HANDLE_EXCEPTION();
    9330             :                                                 }
    9331             :                                         }
    9332           1 :                                         zend_throw_error(NULL, "Function name must be a string");
    9333             : 
    9334           1 :                                         HANDLE_EXCEPTION();
    9335             :                                 } while (0);
    9336             :                         }
    9337             :                 }
    9338             : 
    9339          80 :                 if (ce->get_static_method) {
    9340           0 :                         fbc = ce->get_static_method(ce, Z_STR_P(function_name));
    9341             :                 } else {
    9342          80 :                         fbc = zend_std_get_static_method(ce, Z_STR_P(function_name), ((IS_CV == IS_CONST) ? (EX_CONSTANT(opline->op2) + 1) : NULL));
    9343             :                 }
    9344          80 :                 if (UNEXPECTED(fbc == NULL)) {
    9345           0 :                         if (EXPECTED(!EG(exception))) {
    9346           0 :                                 zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), Z_STRVAL_P(function_name));
    9347             :                         }
    9348             : 
    9349           0 :                         HANDLE_EXCEPTION();
    9350             :                 }
    9351          80 :                 if (IS_CV == IS_CONST &&
    9352             :                     EXPECTED(fbc->type <= ZEND_USER_FUNCTION) &&
    9353             :                     EXPECTED(!(fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)))) {
    9354             :                         if (IS_CONST == IS_CONST) {
    9355             :                                 CACHE_PTR(Z_CACHE_SLOT_P(function_name), fbc);
    9356             :                         } else {
    9357             :                                 CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(function_name), ce, fbc);
    9358             :                         }
    9359             :                 }
    9360          80 :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    9361           4 :                         init_func_run_time_cache(&fbc->op_array);
    9362             :                 }
    9363             :                 if (IS_CV != IS_CONST) {
    9364             : 
    9365             :                 }
    9366             :         } else {
    9367             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    9368             :                         zend_throw_error(NULL, "Cannot call constructor");
    9369             :                         HANDLE_EXCEPTION();
    9370             :                 }
    9371             :                 if (Z_TYPE(EX(This)) == IS_OBJECT && Z_OBJ(EX(This))->ce != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    9372             :                         zend_throw_error(NULL, "Cannot call private %s::__construct()", ZSTR_VAL(ce->name));
    9373             :                         HANDLE_EXCEPTION();
    9374             :                 }
    9375             :                 fbc = ce->constructor;
    9376             :                 if (EXPECTED(fbc->type == ZEND_USER_FUNCTION) && UNEXPECTED(!fbc->op_array.run_time_cache)) {
    9377             :                         init_func_run_time_cache(&fbc->op_array);
    9378             :                 }
    9379             :         }
    9380             : 
    9381          80 :         object = NULL;
    9382          80 :         if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
    9383           2 :                 if (Z_TYPE(EX(This)) == IS_OBJECT && instanceof_function(Z_OBJCE(EX(This)), ce)) {
    9384           0 :                         object = Z_OBJ(EX(This));
    9385           0 :                         ce = object->ce;
    9386             :                 } else {
    9387           1 :                         if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    9388             :                                 /* Allowed for PHP 4 compatibility. */
    9389           2 :                                 zend_error(
    9390             :                                         E_DEPRECATED,
    9391             :                                         "Non-static method %s::%s() should not be called statically",
    9392           2 :                                         ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
    9393           1 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9394           0 :                                         HANDLE_EXCEPTION();
    9395             :                                 }
    9396             :                         } else {
    9397             :                                 /* An internal function assumes $this is present and won't check that.
    9398             :                                  * So PHP would crash by allowing the call. */
    9399           0 :                                 zend_throw_error(
    9400             :                                         zend_ce_error,
    9401             :                                         "Non-static method %s::%s() cannot be called statically",
    9402           0 :                                         ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name));
    9403           0 :                                 HANDLE_EXCEPTION();
    9404             :                         }
    9405             :                 }
    9406             :         }
    9407             : 
    9408          80 :         if (IS_CONST == IS_UNUSED) {
    9409             :                 /* previous opcode is ZEND_FETCH_CLASS */
    9410             :                 if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT ||
    9411             :                     (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) {
    9412             :                         if (Z_TYPE(EX(This)) == IS_OBJECT) {
    9413             :                                 ce = Z_OBJCE(EX(This));
    9414             :                         } else {
    9415             :                                 ce = Z_CE(EX(This));
    9416             :                         }
    9417             :                 }
    9418             :         }
    9419             : 
    9420         160 :         call = zend_vm_stack_push_call_frame(ZEND_CALL_NESTED_FUNCTION,
    9421             :                 fbc, opline->extended_value, ce, object);
    9422          80 :         call->prev_execute_data = EX(call);
    9423          80 :         EX(call) = call;
    9424             : 
    9425          80 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9426             : }
    9427             : 
    9428          98 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9429             : {
    9430          98 :         USE_OPLINE
    9431             : 
    9432             :         zval *function_name;
    9433             :         zend_fcall_info_cache fcc;
    9434          98 :         char *error = NULL;
    9435             :         zend_function *func;
    9436             :         zend_class_entry *called_scope;
    9437             :         zend_object *object;
    9438             :         zend_execute_data *call;
    9439          98 :         uint32_t call_info = ZEND_CALL_NESTED_FUNCTION | ZEND_CALL_DYNAMIC;
    9440             : 
    9441             :         SAVE_OPLINE();
    9442         196 :         function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var);
    9443          98 :         if (zend_is_callable_ex(function_name, NULL, 0, NULL, &fcc, &error)) {
    9444          72 :                 func = fcc.function_handler;
    9445          72 :                 called_scope = fcc.called_scope;
    9446          72 :                 object = fcc.object;
    9447          72 :                 if (func->common.fn_flags & ZEND_ACC_CLOSURE) {
    9448             :                         /* Delay closure destruction until its invocation */
    9449             :                         if (IS_CV & (IS_VAR|IS_CV)) {
    9450           3 :                                 ZVAL_DEREF(function_name);
    9451             :                         }
    9452             :                         ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT);
    9453           3 :                         GC_REFCOUNT((zend_object*)func->common.prototype)++;
    9454           3 :                         call_info |= ZEND_CALL_CLOSURE;
    9455          69 :                 } else if (object) {
    9456          19 :                         call_info |= ZEND_CALL_RELEASE_THIS;
    9457          19 :                         GC_REFCOUNT(object)++; /* For $this pointer */
    9458             :                 }
    9459          72 :                 if (error) {
    9460           1 :                         efree(error);
    9461             :                         /* This is the only soft error is_callable() can generate */
    9462           2 :                         zend_error(E_DEPRECATED,
    9463             :                                 "Non-static method %s::%s() should not be called statically",
    9464           2 :                                 ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
    9465           1 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    9466           0 :                                 HANDLE_EXCEPTION();
    9467             :                         }
    9468             :                 }
    9469          72 :                 if (EXPECTED(func->type == ZEND_USER_FUNCTION) && UNEXPECTED(!func->op_array.run_time_cache)) {
    9470          12 :                         init_func_run_time_cache(&func->op_array);
    9471             :                 }
    9472             :         } else {
    9473          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);
    9474          26 :                 efree(error);
    9475          26 :                 func = (zend_function*)&zend_pass_function;
    9476          26 :                 called_scope = NULL;
    9477          26 :                 object = NULL;
    9478             :         }
    9479             : 
    9480         196 :         call = zend_vm_stack_push_call_frame(call_info,
    9481             :                 func, opline->extended_value, called_scope, object);
    9482          98 :         call->prev_execute_data = EX(call);
    9483          98 :         EX(call) = call;
    9484             : 
    9485          98 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9486             : }
    9487             : 
    9488        2358 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9489             : {
    9490        2358 :         USE_OPLINE
    9491             :         zend_class_entry *ce, *catch_ce;
    9492             :         zend_object *exception;
    9493             :         zval *ex;
    9494             : 
    9495             :         SAVE_OPLINE();
    9496             :         /* Check whether an exception has been thrown, if not, jump over code */
    9497        2358 :         zend_exception_restore();
    9498        2358 :         if (EG(exception) == NULL) {
    9499           0 :                 ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
    9500           0 :                 ZEND_VM_CONTINUE();
    9501             :         }
    9502        2358 :         catch_ce = CACHED_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)));
    9503        2358 :         if (UNEXPECTED(catch_ce == NULL)) {
    9504        1369 :                 catch_ce = zend_fetch_class_by_name(Z_STR_P(EX_CONSTANT(opline->op1)), EX_CONSTANT(opline->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
    9505             : 
    9506        1369 :                 CACHE_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), catch_ce);
    9507             :         }
    9508        2358 :         ce = EG(exception)->ce;
    9509             : 
    9510             : #ifdef HAVE_DTRACE
    9511             :         if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
    9512             :                 DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
    9513             :         }
    9514             : #endif /* HAVE_DTRACE */
    9515             : 
    9516        2358 :         if (ce != catch_ce) {
    9517        1006 :                 if (!catch_ce || !instanceof_function(ce, catch_ce)) {
    9518         100 :                         if (opline->result.num) {
    9519          22 :                                 zend_throw_exception_internal(NULL);
    9520          22 :                                 HANDLE_EXCEPTION();
    9521             :                         }
    9522          78 :                         ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value);
    9523          78 :                         ZEND_VM_CONTINUE();
    9524             :                 }
    9525             :         }
    9526             : 
    9527        2258 :         exception = EG(exception);
    9528        2258 :         ex = EX_VAR(opline->op2.var);
    9529        2258 :         if (UNEXPECTED(Z_ISREF_P(ex))) {
    9530           1 :                 ex = Z_REFVAL_P(ex);
    9531             :         }
    9532             :         zval_ptr_dtor(ex);
    9533        2258 :         ZVAL_OBJ(ex, EG(exception));
    9534        2258 :         if (UNEXPECTED(EG(exception) != exception)) {
    9535           1 :                 GC_REFCOUNT(EG(exception))++;
    9536           1 :                 HANDLE_EXCEPTION();
    9537             :         } else {
    9538        2257 :                 EG(exception) = NULL;
    9539        2257 :                 ZEND_VM_NEXT_OPCODE();
    9540             :         }
    9541             : }
    9542             : 
    9543           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9544             : {
    9545           0 :         USE_OPLINE
    9546             : 
    9547             :         zval *op1, *op2, *result;
    9548             : 
    9549           0 :         op1 = EX_CONSTANT(opline->op1);
    9550           0 :         op2 = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9551             :         do {
    9552             :                 int result;
    9553             : 
    9554           0 :                 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
    9555           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    9556           0 :                                 result = (Z_LVAL_P(op1) == Z_LVAL_P(op2));
    9557           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    9558           0 :                                 result = ((double)Z_LVAL_P(op1) == Z_DVAL_P(op2));
    9559             :                         } else {
    9560           0 :                                 break;
    9561             :                         }
    9562           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
    9563           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
    9564           0 :                                 result = (Z_DVAL_P(op1) == Z_DVAL_P(op2));
    9565           0 :                         } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
    9566           0 :                                 result = (Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2)));
    9567             :                         } else {
    9568           0 :                                 break;
    9569             :                         }
    9570           0 :                 } else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
    9571           0 :                         if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
    9572           0 :                                 if (Z_STR_P(op1) == Z_STR_P(op2)) {
    9573           0 :                                         result = 1;
    9574           0 :                                 } else if (Z_STRVAL_P(op1)[0] > '9' || Z_STRVAL_P(op2)[0] > '9') {
    9575           0 :                                         if (Z_STRLEN_P(op1) != Z_STRLEN_P(op2)) {
    9576           0 :                                                 result = 0;
    9577             :                                         } else {
    9578           0 :                                                 result = (memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0);
    9579             :                                         }
    9580             :                                 } else {
    9581           0 :                                         result = (zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2)) == 0);
    9582             :                                 }
    9583             : 
    9584             :                         } else {
    9585           0 :                                 break;
    9586             :                         }
    9587             :                 } else {
    9588           0 :                         break;
    9589             :                 }
    9590           0 :                 ZEND_VM_SMART_BRANCH(result, 0);
    9591           0 :                 ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9592           0 :                 ZEND_VM_NEXT_OPCODE();
    9593             :         } while (0);
    9594             : 
    9595             :         SAVE_OPLINE();
    9596           0 :         if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
    9597             :                 op1 = GET_OP1_UNDEF_CV(op1, BP_VAR_R);
    9598             :         }
    9599           0 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op2) == IS_UNDEF)) {
    9600           0 :                 op2 = GET_OP2_UNDEF_CV(op2, BP_VAR_R);
    9601             :         }
    9602           0 :         result = EX_VAR(opline->result.var);
    9603           0 :         compare_function(result, op1, op2);
    9604           0 :         ZVAL_BOOL(result, Z_LVAL_P(result) == 0);
    9605             : 
    9606           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9607             : }
    9608             : 
    9609          73 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9610             : {
    9611          73 :         USE_OPLINE
    9612             : 
    9613             :         zval *expr_ptr, new_expr;
    9614             : 
    9615             :         SAVE_OPLINE();
    9616          73 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) &&
    9617             :             UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) {
    9618             :                 expr_ptr = NULL;
    9619             :                 ZVAL_MAKE_REF(expr_ptr);
    9620             :                 Z_ADDREF_P(expr_ptr);
    9621             : 
    9622             :         } else {
    9623          73 :                 expr_ptr = EX_CONSTANT(opline->op1);
    9624          73 :                 if (IS_CONST == IS_TMP_VAR) {
    9625             :                         /* pass */
    9626             :                 } else if (IS_CONST == IS_CONST) {
    9627          73 :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    9628             :                                 Z_ADDREF_P(expr_ptr);
    9629             :                         }
    9630             :                 } else if (IS_CONST == IS_CV) {
    9631             :                         ZVAL_DEREF(expr_ptr);
    9632             :                         if (Z_REFCOUNTED_P(expr_ptr)) {
    9633             :                                 Z_ADDREF_P(expr_ptr);
    9634             :                         }
    9635             :                 } else /* if (IS_CONST == IS_VAR) */ {
    9636             :                         if (UNEXPECTED(Z_ISREF_P(expr_ptr))) {
    9637             :                                 zend_refcounted *ref = Z_COUNTED_P(expr_ptr);
    9638             : 
    9639             :                                 expr_ptr = Z_REFVAL_P(expr_ptr);
    9640             :                                 if (UNEXPECTED(--GC_REFCOUNT(ref) == 0)) {
    9641             :                                         ZVAL_COPY_VALUE(&new_expr, expr_ptr);
    9642             :                                         expr_ptr = &new_expr;
    9643             :                                         efree_size(ref, sizeof(zend_reference));
    9644             :                                 } else if (Z_OPT_REFCOUNTED_P(expr_ptr)) {
    9645             :                                         Z_ADDREF_P(expr_ptr);
    9646             :                                 }
    9647             :                         }
    9648             :                 }
    9649             :         }
    9650             : 
    9651             :         if (IS_CV != IS_UNUSED) {
    9652             : 
    9653         146 :                 zval *offset = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9654             :                 zend_string *str;
    9655             :                 zend_ulong hval;
    9656             : 
    9657             : add_again:
    9658          74 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    9659          59 :                         str = Z_STR_P(offset);
    9660             :                         if (IS_CV != IS_CONST) {
    9661         118 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    9662           0 :                                         goto num_index;
    9663             :                                 }
    9664             :                         }
    9665             : str_index:
    9666          59 :                         zend_hash_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), str, expr_ptr);
    9667          15 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9668           4 :                         hval = Z_LVAL_P(offset);
    9669             : num_index:
    9670           4 :                         zend_hash_index_update(Z_ARRVAL_P(EX_VAR(opline->result.var)), hval, expr_ptr);
    9671          11 :                 } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_TYPE_P(offset) == IS_REFERENCE)) {
    9672           1 :                         offset = Z_REFVAL_P(offset);
    9673           1 :                         goto add_again;
    9674          10 :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    9675           0 :                         str = ZSTR_EMPTY_ALLOC();
    9676           0 :                         goto str_index;
    9677          10 :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    9678           0 :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    9679           0 :                         goto num_index;
    9680          10 :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    9681           0 :                         hval = 0;
    9682           0 :                         goto num_index;
    9683          10 :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    9684           0 :                         hval = 1;
    9685           0 :                         goto num_index;
    9686          10 :                 } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    9687           0 :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    9688           0 :                         str = ZSTR_EMPTY_ALLOC();
    9689           0 :                         goto str_index;
    9690             :                 } else {
    9691          10 :                         zend_error(E_WARNING, "Illegal offset type");
    9692             :                         zval_ptr_dtor(expr_ptr);
    9693             :                 }
    9694             : 
    9695             :         } else {
    9696             :                 zend_hash_next_index_insert(Z_ARRVAL_P(EX_VAR(opline->result.var)), expr_ptr);
    9697             :         }
    9698          73 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9699             : }
    9700             : 
    9701           6 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9702             : {
    9703             :         zval *array;
    9704             :         uint32_t size;
    9705           6 :         USE_OPLINE
    9706             : 
    9707           6 :         array = EX_VAR(opline->result.var);
    9708             :         if (IS_CONST != IS_UNUSED) {
    9709           6 :                 size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;
    9710             :         } else {
    9711             :                 size = 0;
    9712             :         }
    9713           6 :         ZVAL_NEW_ARR(array);
    9714           6 :         zend_hash_init(Z_ARRVAL_P(array), size, NULL, ZVAL_PTR_DTOR, 0);
    9715             : 
    9716             :         if (IS_CONST != IS_UNUSED) {
    9717             :                 /* Explicitly initialize array as not-packed if flag is set */
    9718           6 :                 if (opline->extended_value & ZEND_ARRAY_NOT_PACKED) {
    9719           0 :                         zend_hash_real_init(Z_ARRVAL_P(array), 0);
    9720             :                 }
    9721             :         }
    9722             : 
    9723           6 :         if (IS_CONST == IS_UNUSED) {
    9724             :                 ZEND_VM_NEXT_OPCODE();
    9725             : #if 0 || (IS_CONST != IS_UNUSED)
    9726             :         } else {
    9727           6 :                 ZEND_VM_TAIL_CALL(ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU));
    9728             : #endif
    9729             :         }
    9730             : }
    9731             : 
    9732           0 : static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ISSET_ISEMPTY_DIM_OBJ_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9733             : {
    9734           0 :         USE_OPLINE
    9735             : 
    9736             :         zval *container;
    9737             :         int result;
    9738             :         zend_ulong hval;
    9739             :         zval *offset;
    9740             : 
    9741             :         SAVE_OPLINE();
    9742           0 :         container = EX_CONSTANT(opline->op1);
    9743           0 :         offset = _get_zval_ptr_cv_undef(execute_data, opline->op2.var);
    9744             : 
    9745           0 :         if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    9746             :                 HashTable *ht;
    9747             :                 zval *value;
    9748             :                 zend_string *str;
    9749             : 
    9750             : isset_dim_obj_array:
    9751           0 :                 ht = Z_ARRVAL_P(container);
    9752             : isset_again:
    9753           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_STRING)) {
    9754           0 :                         str = Z_STR_P(offset);
    9755             :                         if (IS_CV != IS_CONST) {
    9756           0 :                                 if (ZEND_HANDLE_NUMERIC(str, hval)) {
    9757           0 :                                         goto num_index_prop;
    9758             :                                 }
    9759             :                         }
    9760             : str_index_prop:
    9761           0 :                         value = zend_hash_find_ind(ht, str);
    9762           0 :                 } else if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9763           0 :                         hval = Z_LVAL_P(offset);
    9764             : num_index_prop:
    9765           0 :                         value = zend_hash_index_find(ht, hval);
    9766           0 :                 } else if ((IS_CV & (IS_VAR|IS_CV)) && EXPECTED(Z_ISREF_P(offset))) {
    9767           0 :                         offset = Z_REFVAL_P(offset);
    9768           0 :                         goto isset_again;
    9769           0 :                 } else if (Z_TYPE_P(offset) == IS_DOUBLE) {
    9770           0 :                         hval = zend_dval_to_lval(Z_DVAL_P(offset));
    9771           0 :                         goto num_index_prop;
    9772           0 :                 } else if (Z_TYPE_P(offset) == IS_NULL) {
    9773           0 :                         str = ZSTR_EMPTY_ALLOC();
    9774           0 :                         goto str_index_prop;
    9775           0 :                 } else if (Z_TYPE_P(offset) == IS_FALSE) {
    9776           0 :                         hval = 0;
    9777           0 :                         goto num_index_prop;
    9778           0 :                 } else if (Z_TYPE_P(offset) == IS_TRUE) {
    9779           0 :                         hval = 1;
    9780           0 :                         goto num_index_prop;
    9781           0 :                 } else if (Z_TYPE_P(offset) == IS_RESOURCE) {
    9782           0 :                         hval = Z_RES_HANDLE_P(offset);
    9783           0 :                         goto num_index_prop;
    9784           0 :                 } else if (IS_CV == IS_CV && Z_TYPE_P(offset) == IS_UNDEF) {
    9785           0 :                         GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    9786           0 :                         str = ZSTR_EMPTY_ALLOC();
    9787           0 :                         goto str_index_prop;
    9788             :                 } else {
    9789           0 :                         zend_error(E_WARNING, "Illegal offset type in isset or empty");
    9790           0 :                         goto isset_not_found;
    9791             :                 }
    9792             : 
    9793           0 :                 if (opline->extended_value & ZEND_ISSET) {
    9794             :                         /* > IS_NULL means not IS_UNDEF and not IS_NULL */
    9795           0 :                         result = value != NULL && Z_TYPE_P(value) > IS_NULL &&
    9796           0 :                             (!Z_ISREF_P(value) || Z_TYPE_P(Z_REFVAL_P(value)) != IS_NULL);
    9797             :                 } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    9798           0 :                         result = (value == NULL || !i_zend_is_true(value));
    9799             :                 }
    9800           0 :                 goto isset_dim_obj_exit;
    9801           0 :         } else if ((IS_CONST & (IS_VAR|IS_CV)) && Z_ISREF_P(container)) {
    9802             :                 container = Z_REFVAL_P(container);
    9803             :                 if (EXPECTED(Z_TYPE_P(container) == IS_ARRAY)) {
    9804             :                         goto isset_dim_obj_array;
    9805             :                 }
    9806             :         }
    9807             : 
    9808           0 :         if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(offset) == IS_UNDEF)) {
    9809           0 :                 offset = GET_OP2_UNDEF_CV(offset, BP_VAR_R);
    9810             :         }
    9811             : 
    9812           0 :         if ((IS_CONST != IS_CONST && EXPECTED(Z_TYPE_P(container) == IS_OBJECT))) {
    9813             :                 if (EXPECTED(Z_OBJ_HT_P(container)->has_dimension)) {
    9814             :                         result =
    9815             :                                 ((opline->extended_value & ZEND_ISSET) == 0) ^
    9816             :                                 Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISSET) == 0);
    9817             :                 } else {
    9818             :                         zend_error(E_NOTICE, "Trying to check element of non-array");
    9819             :                         goto isset_not_found;
    9820             :                 }
    9821           0 :         } else if (EXPECTED(Z_TYPE_P(container) == IS_STRING)) { /* string offsets */
    9822             :                 zend_long lval;
    9823             : 
    9824           0 :                 if (EXPECTED(Z_TYPE_P(offset) == IS_LONG)) {
    9825           0 :                         lval = Z_LVAL_P(offset);
    9826             : isset_str_offset:
    9827           0 :                         if (UNEXPECTED(lval < 0)) { /* Handle negative offset */
    9828           0 :                                 lval += (zend_long)Z_STRLEN_P(container);
    9829             :                         }
    9830           0 :                         if (EXPECTED(lval >= 0) && (size_t)lval < Z_STRLEN_P(container)) {
    9831           0 :                                 if (opline->extended_value & ZEND_ISSET) {
    9832           0 :                                         result = 1;
    9833             :                                 } else {
    9834           0 :                                         result = (Z_STRVAL_P(container)[lval] == '0');
    9835             :                                 }
    9836             :                         } else {
    9837             :                                 goto isset_not_found;
    9838             :                         }
    9839             :                 } else {
    9840             :                         if (IS_CV & (IS_CV|IS_VAR)) {
    9841           0 :                                 ZVAL_DEREF(offset);
    9842             :                         }
    9843           0 :                         if (Z_TYPE_P(offset) < IS_STRING /* simple scalar types */
    9844             :                                         || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
    9845           0 :                                                 && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
    9846           0 :                                 lval = zval_get_long(offset);
    9847           0 :                                 goto isset_str_offset;
    9848             :                         }
    9849           0 :                         goto isset_not_found;
    9850             :                 }
    9851             :         } else {
    9852             : isset_not_found:
    9853           0 :                 result = ((opline->extended_value & ZEND_ISSET) == 0);
    9854             :         }
    9855             : 
    9856             : isset_dim_obj_exit:
    9857             : 
    9858             : 
    9859           0 :         ZEND_VM_SMART_BRANCH(result, 1);
    9860           0 :         ZVAL_BOOL(EX_VAR(opline->result.var), result);
    9861           0 :         ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
    9862             : }
    9863             :