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