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: 7334 16617 44.1 %
Date: 2014-10-22 Functions: 637 1296 49.2 %
Legend: Lines: hit not hit

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