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: 6836 14571 46.9 %
Date: 2014-04-10 Functions: 607 1163 52.2 %
Legend: Lines: hit not hit

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