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