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