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