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