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: 9029 16815 53.7 %
Date: 2015-05-21 Functions: 587 996 58.9 %
Legend: Lines: hit not hit

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