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: 6840 14575 46.9 %
Date: 2014-07-25 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      471109 : ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
     343             : {
     344             :         DCL_OPLINE
     345             :         zend_execute_data *execute_data;
     346      471109 :         zend_bool nested = 0;
     347      471109 :         zend_bool original_in_execution = EG(in_execution);
     348             : 
     349             : 
     350      471109 :         if (EG(exception)) {
     351           0 :                 return;
     352             :         }
     353             : 
     354      471109 :         EG(in_execution) = 1;
     355             : 
     356             : zend_vm_enter:
     357             :         /* Initialize execute_data */
     358     3921756 :         execute_data = (zend_execute_data *)zend_vm_stack_alloc(
     359             :                 ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) +
     360     1960878 :                 ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)) +
     361     1960878 :                 ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T TSRMLS_CC);
     362             : 
     363     1960878 :         EX(CVs) = (zval***)((char*)execute_data + ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)));
     364     1960878 :         memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var);
     365     1960878 :         EX(Ts) = (temp_variable *)(((char*)EX(CVs)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)));
     366     1960878 :         EX(fbc) = NULL;
     367     1960878 :         EX(called_scope) = NULL;
     368     1960878 :         EX(object) = NULL;
     369     1960878 :         EX(old_error_reporting) = NULL;
     370     1960878 :         EX(op_array) = op_array;
     371     1960878 :         EX(symbol_table) = EG(active_symbol_table);
     372     1960878 :         EX(prev_execute_data) = EG(current_execute_data);
     373     1960878 :         EG(current_execute_data) = execute_data;
     374     1960878 :         EX(nested) = nested;
     375     1960878 :         nested = 1;
     376             : 
     377             :         LOAD_REGS();
     378             : 
     379     1960878 :         if (!op_array->run_time_cache && op_array->last_cache_slot) {
     380       35445 :                 op_array->run_time_cache = ecalloc(op_array->last_cache_slot, sizeof(void*));
     381             :         }
     382             : 
     383     1960878 :         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     1960878 :         EX(opline) = UNEXPECTED((op_array->fn_flags & ZEND_ACC_INTERACTIVE) != 0) && EG(start_op) ? EG(start_op) : op_array->opcodes;
     396     1960878 :         EG(opline_ptr) = &EX(opline);
     397             :         LOAD_OPLINE();
     398             : 
     399     1960878 :         EX(function_state).function = (zend_function *) op_array;
     400     1960878 :         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   190027683 :                 if ((ret = OPLINE->handler(execute_data TSRMLS_CC)) > 0) {
     411     3449075 :                         switch (ret) {
     412             :                                 case 1:
     413      469704 :                                         EG(in_execution) = original_in_execution;
     414      469704 :                                         return;
     415             :                                 case 2:
     416     1489769 :                                         op_array = EG(active_op_array);
     417     1489769 :                                         goto zend_vm_enter;
     418             :                                 case 3:
     419     1489602 :                                         execute_data = EG(current_execute_data);
     420             :                                 default:
     421             :                                         break;
     422             :                         }
     423             :                 }
     424             : 
     425   188066805 :         }
     426             :         zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
     427             : }
     428             : 
     429    17512675 : static int ZEND_FASTCALL  ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     430             : {
     431    17512675 :         USE_OPLINE
     432             : 
     433             : #if DEBUG_ZEND>=2
     434             :         printf("Jumping to %d\n", opline->op1.opline_num);
     435             : #endif
     436    17512675 :         ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
     437    17512675 :         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     1959306 : static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     457             : {
     458             :         zend_bool nested;
     459     1959306 :         zend_op_array *op_array = EX(op_array);
     460             : 
     461     1959306 :         EG(current_execute_data) = EX(prev_execute_data);
     462     1959306 :         EG(opline_ptr) = NULL;
     463     1959306 :         if (!EG(active_symbol_table)) {
     464     1895448 :                 zval ***cv = EX_CVs();
     465     1895448 :                 zval ***end = cv + op_array->last_var;
     466    11809386 :                 while (cv != end) {
     467     8018490 :                         if (*cv) {
     468     6741581 :                                 zval_ptr_dtor(*cv);
     469             :                         }
     470     8018490 :                         cv++;
     471             :                 }
     472             :         }
     473             : 
     474     1959306 :         if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
     475           1 :                 zval_ptr_dtor((zval**)&op_array->prototype);
     476             :         }
     477             : 
     478     1959306 :         nested = EX(nested);
     479             : 
     480             :         zend_vm_stack_free(execute_data TSRMLS_CC);
     481             : 
     482     1959306 :         if (nested) {
     483     1489602 :                 execute_data = EG(current_execute_data);
     484             :         }
     485     1959306 :         if (nested) {
     486     1489602 :                 USE_OPLINE
     487             : 
     488             :                 LOAD_REGS();
     489             :                 LOAD_OPLINE();
     490     1489602 :                 if (UNEXPECTED(opline->opcode == ZEND_INCLUDE_OR_EVAL)) {
     491             : 
     492       10272 :                         EX(function_state).function = (zend_function *) EX(op_array);
     493       10272 :                         EX(function_state).arguments = NULL;
     494       10272 :                         EX(object) = EX(current_object);
     495             : 
     496       10272 :                         EG(opline_ptr) = &EX(opline);
     497       10272 :                         EG(active_op_array) = EX(op_array);
     498       10272 :                         EG(return_value_ptr_ptr) = EX(original_return_value);
     499       10272 :                         destroy_op_array(op_array TSRMLS_CC);
     500       10272 :                         efree(op_array);
     501       10272 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     502          21 :                                 zend_throw_exception_internal(NULL TSRMLS_CC);
     503          21 :                                 HANDLE_EXCEPTION_LEAVE();
     504       10251 :                         } else if (RETURN_VALUE_USED(opline)) {
     505         517 :                                 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       10251 :                         ZEND_VM_INC_OPCODE();
     516       10251 :                         ZEND_VM_LEAVE();
     517             :                 } else {
     518             : 
     519     1479330 :                         EG(opline_ptr) = &EX(opline);
     520     1479330 :                         EG(active_op_array) = EX(op_array);
     521     1479330 :                         EG(return_value_ptr_ptr) = EX(original_return_value);
     522     1479330 :                         if (EG(active_symbol_table)) {
     523       34672 :                                 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       34672 :                                         zend_hash_clean(EG(active_symbol_table));
     530       34672 :                                         *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
     531             :                                 }
     532             :                         }
     533     1479330 :                         EG(active_symbol_table) = EX(symbol_table);
     534             : 
     535     1479330 :                         EX(function_state).function = (zend_function *) EX(op_array);
     536     1479330 :                         EX(function_state).arguments = NULL;
     537             : 
     538     1479330 :                         if (EG(This)) {
     539      100450 :                                 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      100450 :                                 zval_ptr_dtor(&EG(This));
     548             :                         }
     549     1479330 :                         EG(This) = EX(current_this);
     550     1479330 :                         EG(scope) = EX(current_scope);
     551     1479330 :                         EG(called_scope) = EX(current_called_scope);
     552             : 
     553     1479330 :                         EX(object) = EX(current_object);
     554     1479330 :                         EX(called_scope) = DECODE_CTOR(EX(called_scope));
     555             : 
     556             :                         zend_vm_stack_clear_multiple(TSRMLS_C);
     557             : 
     558     1479330 :                         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     1479185 :                         ZEND_VM_INC_OPCODE();
     567     1479185 :                         ZEND_VM_LEAVE();
     568             :                 }
     569             :         }
     570      469704 :         ZEND_VM_RETURN();
     571             : }
     572             : 
     573    20283397 : static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     574             : {
     575    20283397 :         USE_OPLINE
     576    20283397 :         zend_bool should_change_scope = 0;
     577    20283397 :         zend_function *fbc = EX(function_state).function;
     578             : 
     579             :         SAVE_OPLINE();
     580    20283397 :         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    22048651 :         if (fbc->common.scope &&
     594      885596 :                 !(fbc->common.fn_flags & ZEND_ACC_STATIC) &&
     595      879660 :                 !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    20283386 :         if (fbc->type == ZEND_USER_FUNCTION || fbc->common.scope) {
     608     2261591 :                 should_change_scope = 1;
     609     2261591 :                 EX(current_this) = EG(This);
     610     2261591 :                 EX(current_scope) = EG(scope);
     611     2261591 :                 EX(current_called_scope) = EG(called_scope);
     612     2261591 :                 EG(This) = EX(object);
     613     2261591 :                 EG(scope) = (fbc->type == ZEND_USER_FUNCTION || !EX(object)) ? fbc->common.scope : NULL;
     614     2261591 :                 EG(called_scope) = EX(called_scope);
     615             :         }
     616             : 
     617    20283386 :         zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc));
     618    40566772 :         EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
     619             :         LOAD_OPLINE();
     620             : 
     621    20283386 :         if (fbc->type == ZEND_INTERNAL_FUNCTION) {
     622    18803956 :                 temp_variable *ret = &EX_T(opline->result.var);
     623             : 
     624    18803956 :                 if (fbc->common.arg_info) {
     625    18801531 :                         zend_uint i=0;
     626    18801531 :                         zval **p = (zval**)EX(function_state).arguments;
     627    18801531 :                         ulong arg_count = opline->extended_value;
     628             : 
     629    70006871 :                         while (arg_count>0) {
     630    32403816 :                                 zend_verify_arg_type(fbc, ++i, *(p-arg_count), 0 TSRMLS_CC);
     631    32403809 :                                 arg_count--;
     632             :                         }
     633             :                 }
     634             : 
     635    18803949 :                 if (EXPECTED(EG(exception) == NULL)) {
     636    18803948 :                         MAKE_STD_ZVAL(ret->var.ptr);
     637    18803948 :                         ZVAL_NULL(ret->var.ptr);
     638    18803948 :                         ret->var.ptr_ptr = &ret->var.ptr;
     639    18803948 :                         ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
     640             : 
     641    18803948 :                         if (!zend_execute_internal) {
     642             :                                 /* saves one function call if zend_execute_internal is not used */
     643    18803948 :                                 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    18803791 :                         if (!RETURN_VALUE_USED(opline)) {
     649     1622783 :                                 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     1479430 :         } else if (fbc->type == ZEND_USER_FUNCTION) {
     655     1479430 :                 EX(original_return_value) = EG(return_value_ptr_ptr);
     656     1479430 :                 EG(active_symbol_table) = NULL;
     657     1479430 :                 EG(active_op_array) = &fbc->op_array;
     658     1479430 :                 EG(return_value_ptr_ptr) = NULL;
     659     1479430 :                 if (RETURN_VALUE_USED(opline)) {
     660     1193055 :                         temp_variable *ret = &EX_T(opline->result.var);
     661             : 
     662     1193055 :                         ret->var.ptr = NULL;
     663     1193055 :                         EG(return_value_ptr_ptr) = &ret->var.ptr;
     664     1193055 :                         ret->var.ptr_ptr = &ret->var.ptr;
     665     1193055 :                         ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
     666             :                 }
     667             : 
     668     1479430 :                 if (EXPECTED(zend_execute == execute)) {
     669     1479430 :                         if (EXPECTED(EG(exception) == NULL)) {
     670     1479429 :                                 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    18803793 :         EX(function_state).function = (zend_function *) EX(op_array);
     718    18803793 :         EX(function_state).arguments = NULL;
     719             : 
     720    18803793 :         if (should_change_scope) {
     721      782011 :                 if (EG(This)) {
     722      779081 :                         if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
     723         295 :                                 if (IS_CTOR_USED(EX(called_scope))) {
     724         229 :                                         Z_DELREF_P(EG(This));
     725             :                                 }
     726         590 :                                 if (Z_REFCOUNT_P(EG(This)) == 1) {
     727         295 :                                         zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
     728             :                                 }
     729             :                         }
     730      779081 :                         zval_ptr_dtor(&EG(This));
     731             :                 }
     732      782011 :                 EG(This) = EX(current_this);
     733      782011 :                 EG(scope) = EX(current_scope);
     734      782011 :                 EG(called_scope) = EX(current_called_scope);
     735             :         }
     736             : 
     737    18803793 :         EX(object) = EX(current_object);
     738    18803793 :         EX(called_scope) = DECODE_CTOR(EX(called_scope));
     739             : 
     740             :         zend_vm_stack_clear_multiple(TSRMLS_C);
     741             : 
     742    18803793 :         if (UNEXPECTED(EG(exception) != NULL)) {
     743         968 :                 zend_throw_exception_internal(NULL TSRMLS_CC);
     744         968 :                 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         968 :                 HANDLE_EXCEPTION();
     748             :         }
     749             : 
     750    18802825 :         ZEND_VM_NEXT_OPCODE();
     751             : }
     752             : 
     753     1275457 : static int ZEND_FASTCALL  ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     754             : {
     755     1275457 :         EX(function_state).function = EX(fbc);
     756     1275457 :         return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
     757             : }
     758             : 
     759     4625809 : static int ZEND_FASTCALL  ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     760             : {
     761     4625809 :         USE_OPLINE
     762     4625809 :         zend_uint arg_num = opline->op1.num;
     763     9251618 :         zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
     764             : 
     765             :         SAVE_OPLINE();
     766     4625809 :         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     4625735 :                 zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param, opline->extended_value TSRMLS_CC);
     790     9251444 :                 var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->result.var TSRMLS_CC);
     791     4625722 :                 Z_DELREF_PP(var_ptr);
     792     4625722 :                 *var_ptr = *param;
     793     4625722 :                 Z_ADDREF_PP(var_ptr);
     794             :         }
     795             : 
     796             :         CHECK_EXCEPTION();
     797     4625792 :         ZEND_VM_NEXT_OPCODE();
     798             : }
     799             : 
     800      460648 : static int ZEND_FASTCALL  ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     801             : {
     802      460648 :         USE_OPLINE
     803             :         zval *object_zval;
     804             :         zend_function *constructor;
     805             : 
     806             :         SAVE_OPLINE();
     807      460648 :         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      460641 :         ALLOC_ZVAL(object_zval);
     817      460641 :         object_init_ex(object_zval, EX_T(opline->op1.var).class_entry);
     818      460640 :         INIT_PZVAL(object_zval);
     819             : 
     820      460640 :         constructor = Z_OBJ_HT_P(object_zval)->get_constructor(object_zval TSRMLS_CC);
     821             : 
     822      460634 :         if (constructor == NULL) {
     823      174289 :                 if (RETURN_VALUE_USED(opline)) {
     824      174276 :                         AI_SET_PTR(&EX_T(opline->result.var), object_zval);
     825             :                 } else {
     826          13 :                         zval_ptr_dtor(&object_zval);
     827             :                 }
     828      174289 :                 ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.opline_num);
     829             :         } else {
     830      286345 :                 if (RETURN_VALUE_USED(opline)) {
     831      276184 :                         PZVAL_LOCK(object_zval);
     832      276184 :                         AI_SET_PTR(&EX_T(opline->result.var), object_zval);
     833             :                 }
     834             : 
     835      286345 :                 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      286345 :                 EX(object) = object_zval;
     839      286345 :                 EX(fbc) = constructor;
     840      286345 :                 EX(called_scope) = EX_T(opline->op1.var).class_entry;
     841             : 
     842             :                 CHECK_EXCEPTION();
     843      286345 :                 ZEND_VM_NEXT_OPCODE();
     844             :         }
     845             : }
     846             : 
     847     1427547 : static int ZEND_FASTCALL  ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     848             : {
     849     1427547 :         USE_OPLINE
     850             : 
     851             :         SAVE_OPLINE();
     852     1427547 :         Z_LVAL(EX_T(opline->result.var).tmp_var) = EG(error_reporting);
     853     1427547 :         Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_LONG;  /* shouldn't be necessary */
     854     1427547 :         if (EX(old_error_reporting) == NULL) {
     855     1427534 :                 EX(old_error_reporting) = &EX_T(opline->result.var).tmp_var;
     856             :         }
     857             : 
     858     1427547 :         if (EG(error_reporting)) {
     859             :                 do {
     860     1184810 :                         EG(error_reporting) = 0;
     861     1184810 :                         if (!EG(error_reporting_ini_entry)) {
     862        2838 :                                 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     1184810 :                         if (!EG(error_reporting_ini_entry)->modified) {
     867        2772 :                                 if (!EG(modified_ini_directives)) {
     868        2089 :                                         ALLOC_HASHTABLE(EG(modified_ini_directives));
     869        2089 :                                         zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
     870             :                                 }
     871        2772 :                                 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        2772 :                                         EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
     873        2772 :                                         EG(error_reporting_ini_entry)->orig_value_length = EG(error_reporting_ini_entry)->value_length;
     874        2772 :                                         EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
     875        2772 :                                         EG(error_reporting_ini_entry)->modified = 1;
     876             :                                 }
     877     1182038 :                         } else if (EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value) {
     878     1182038 :                                 efree(EG(error_reporting_ini_entry)->value);
     879             :                         }
     880     1184810 :                         EG(error_reporting_ini_entry)->value = estrndup("0", sizeof("0")-1);
     881     1184810 :                         EG(error_reporting_ini_entry)->value_length = sizeof("0")-1;
     882             :                 } while (0);
     883             :         }
     884             :         CHECK_EXCEPTION();
     885     1427547 :         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       20079 : static int ZEND_FASTCALL  ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     991             : {
     992       20079 :         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        1513 : static int ZEND_FASTCALL  ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1037             : {
    1038        1513 :         zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
    1039             :         int i;
    1040        1513 :         zend_uint catch_op_num = 0;
    1041        1513 :         int catched = 0;
    1042             :         zval restored_error_reporting;
    1043             : 
    1044        3026 :         void **stack_frame = (void**)(((char*)EX_Ts()) +
    1045        3026 :                 (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T));
    1046             : 
    1047        3088 :         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        4059 :         for (i=0; i<EG(active_op_array)->last_try_catch; i++) {
    1053        2958 :                 if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
    1054             :                         /* further blocks will not be relevant... */
    1055         412 :                         break;
    1056        2546 :                 } else if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
    1057        1081 :                         catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
    1058        1081 :                         catched = 1;
    1059             :                 }
    1060             :         }
    1061             : 
    1062        3046 :         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        1955 :         for (i=0; i<EX(op_array)->last_brk_cont; i++) {
    1080         522 :                 if (EX(op_array)->brk_cont_array[i].start < 0) {
    1081          90 :                         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        1513 :         if (!EG(error_reporting) && EX(old_error_reporting) != NULL && Z_LVAL_P(EX(old_error_reporting)) != 0) {
    1108          26 :                 Z_TYPE(restored_error_reporting) = IS_LONG;
    1109          26 :                 Z_LVAL(restored_error_reporting) = Z_LVAL_P(EX(old_error_reporting));
    1110          26 :                 convert_to_string(&restored_error_reporting);
    1111          26 :                 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        1513 :         EX(old_error_reporting) = NULL;
    1115             : 
    1116        1513 :         if (!catched) {
    1117         450 :                 return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1118             :         } else {
    1119        1063 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
    1120        1063 :                 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      460800 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1160             : {
    1161      460800 :         USE_OPLINE
    1162             : 
    1163             :         SAVE_OPLINE();
    1164      460800 :         EG(exception) = NULL;
    1165      460800 :         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      460800 :                 zval *class_name = opline->op2.zv;
    1172             : 
    1173             :                 if (IS_CONST == IS_CONST) {
    1174      460800 :                         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       12864 :                                 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       12852 :                                 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      460788 :                 ZEND_VM_NEXT_OPCODE();
    1190             :         }
    1191             : }
    1192             : 
    1193      376235 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1194             : {
    1195      376235 :         USE_OPLINE
    1196             :         zval *function_name;
    1197      376235 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    1198             : 
    1199             :         if (IS_CONST == IS_CONST) {
    1200      376235 :                 function_name = (zval*)(opline->op2.literal+1);
    1201      376235 :                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    1202      373092 :                         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      376222 :                 EX(object) = NULL;
    1210             :                 /*CHECK_EXCEPTION();*/
    1211      376222 :                 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      303184 : static int ZEND_FASTCALL  ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1355             : {
    1356      303184 :         USE_OPLINE
    1357             :         zval *assignment_value;
    1358      303184 :         zend_uint arg_num = opline->op1.num;
    1359      606368 :         zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
    1360             :         zval **var_ptr;
    1361             : 
    1362             :         SAVE_OPLINE();
    1363      303184 :         if (param == NULL) {
    1364       97511 :                 ALLOC_ZVAL(assignment_value);
    1365       97511 :                 *assignment_value = *opline->op2.zv;
    1366      195054 :                 if ((Z_TYPE_P(assignment_value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT ||
    1367       97431 :                      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       97379 :                         zval_copy_ctor(assignment_value);
    1372             :                 }
    1373       97491 :                 INIT_PZVAL(assignment_value);
    1374             :         } else {
    1375      205673 :                 assignment_value = *param;
    1376      205673 :                 Z_ADDREF_P(assignment_value);
    1377             :         }
    1378             : 
    1379      303164 :         zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
    1380      606324 :         var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->result.var TSRMLS_CC);
    1381      303162 :         zval_ptr_dtor(var_ptr);
    1382      303162 :         *var_ptr = assignment_value;
    1383             : 
    1384             :         CHECK_EXCEPTION();
    1385      303162 :         ZEND_VM_NEXT_OPCODE();
    1386             : }
    1387             : 
    1388       32939 : static int ZEND_FASTCALL  ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1389             : {
    1390       32939 :         USE_OPLINE
    1391             :         zend_brk_cont_element *el;
    1392             : 
    1393             :         SAVE_OPLINE();
    1394       32939 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1395       32939 :                            EX(op_array), EX_Ts() TSRMLS_CC);
    1396       32939 :         ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
    1397             : }
    1398             : 
    1399       42665 : static int ZEND_FASTCALL  ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1400             : {
    1401       42665 :         USE_OPLINE
    1402             :         zend_brk_cont_element *el;
    1403             : 
    1404             :         SAVE_OPLINE();
    1405       42665 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1406       42665 :                            EX(op_array), EX_Ts() TSRMLS_CC);
    1407       42665 :         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        2637 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1805             : {
    1806        2637 :         USE_OPLINE
    1807             : 
    1808             :         SAVE_OPLINE();
    1809        2637 :         EG(exception) = NULL;
    1810             :         if (IS_UNUSED == IS_UNUSED) {
    1811        2637 :                 EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
    1812             :                 CHECK_EXCEPTION();
    1813        2637 :                 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       13449 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1873             : {
    1874       13449 :         USE_OPLINE
    1875             :         zval *function_name;
    1876       13449 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    1877             : 
    1878       13449 :         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       26898 :                 function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
    1898             : 
    1899       13449 :                 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         662 :                 } else if (IS_CV != IS_CONST && IS_CV != IS_TMP_VAR &&
    1917         234 :                     EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
    1918         214 :                         Z_OBJ_HANDLER_P(function_name, get_closure) &&
    1919         214 :                         Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
    1920         214 :                         if (EX(object)) {
    1921          56 :                                 Z_ADDREF_P(EX(object));
    1922             :                         }
    1923         214 :                         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         214 :                         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       48155 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2034             : {
    2035       48155 :         USE_OPLINE
    2036             : 
    2037             :         zval *z;
    2038             : 
    2039             :         SAVE_OPLINE();
    2040       48155 :         z = opline->op1.zv;
    2041             : 
    2042       48155 :         if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) {
    2043             :                 INIT_PZVAL(z);
    2044             :         }
    2045       48155 :         zend_print_variable(z);
    2046             : 
    2047             :         CHECK_EXCEPTION();
    2048       48154 :         ZEND_VM_NEXT_OPCODE();
    2049             : }
    2050             : 
    2051        1556 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2052             : {
    2053        1556 :         USE_OPLINE
    2054             : 
    2055        1556 :         ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
    2056        1556 :         return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2057             : }
    2058             : 
    2059      922448 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2060             : {
    2061      922448 :         USE_OPLINE
    2062             : 
    2063             :         zval *val;
    2064             :         int ret;
    2065             : 
    2066             :         SAVE_OPLINE();
    2067      922448 :         val = opline->op1.zv;
    2068             : 
    2069      922448 :         if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    2070             :                 ret = Z_LVAL_P(val);
    2071             :         } else {
    2072      922448 :                 ret = i_zend_is_true(val);
    2073             : 
    2074      922448 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2075           0 :                         HANDLE_EXCEPTION();
    2076             :                 }
    2077             :         }
    2078      922448 :         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      922338 :         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      750820 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2120             : {
    2121      750820 :         USE_OPLINE
    2122             : 
    2123             :         zval *val;
    2124             :         int retval;
    2125             : 
    2126             :         SAVE_OPLINE();
    2127      750820 :         val = opline->op1.zv;
    2128             : 
    2129      750820 :         if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    2130             :                 retval = Z_LVAL_P(val);
    2131             :         } else {
    2132      750820 :                 retval = i_zend_is_true(val);
    2133             : 
    2134      750820 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2135           0 :                         HANDLE_EXCEPTION();
    2136             :                 }
    2137             :         }
    2138      750820 :         if (EXPECTED(retval != 0)) {
    2139             : #if DEBUG_ZEND>=2
    2140             :                 printf("Conditional jmp on true to %d\n", opline->extended_value);
    2141             : #endif
    2142      750820 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    2143      750820 :                 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    19007940 : static int ZEND_FASTCALL  ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2216             : {
    2217    19007940 :         USE_OPLINE
    2218             : 
    2219    19007940 :         zval *fname = opline->op1.zv;
    2220             : 
    2221    19007940 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    2222             : 
    2223    19007940 :         if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    2224    18838356 :                 EX(function_state).function = CACHED_PTR(opline->op1.literal->cache_slot);
    2225      169584 :         } 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      169584 :                 CACHE_PTR(opline->op1.literal->cache_slot, EX(function_state).function);
    2230             :         }
    2231    19007940 :         EX(object) = NULL;
    2232             : 
    2233    19007940 :         return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2234             : }
    2235             : 
    2236      556504 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2237             : {
    2238      556504 :         USE_OPLINE
    2239             :         zval *retval_ptr;
    2240             : 
    2241             : 
    2242             :         SAVE_OPLINE();
    2243      556504 :         retval_ptr = opline->op1.zv;
    2244             : 
    2245      556504 :         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      244319 :                         ALLOC_ZVAL(ret);
    2255      244319 :                         INIT_PZVAL_COPY(ret, retval_ptr);
    2256             :                         zval_copy_ctor(ret);
    2257      244319 :                         *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      556504 :         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     9600075 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2377             : {
    2378     9600075 :         USE_OPLINE
    2379             : 
    2380             :         SAVE_OPLINE();
    2381    10573111 :         if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
    2382    10573111 :                 && 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     9600073 :                 value = opline->op1.zv;
    2391             : 
    2392     9600073 :                 ALLOC_ZVAL(valptr);
    2393     9600073 :                 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     9600073 :         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        6718 : static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2541             : {
    2542        6718 :         USE_OPLINE
    2543        6718 :         zend_op_array *new_op_array=NULL;
    2544             : 
    2545             :         zval *inc_filename;
    2546        6718 :     zval *tmp_inc_filename = NULL;
    2547        6718 :         zend_bool failure_retval=0;
    2548             : 
    2549             :         SAVE_OPLINE();
    2550        6718 :         inc_filename = opline->op1.zv;
    2551             : 
    2552        6718 :         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        6718 :         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        6718 :                 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        4252 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
    2574        4252 :                                         if (resolved_path) {
    2575        4248 :                                                 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        4252 :                                         if (failure_retval) {
    2581             :                                                 /* do nothing, file already included */
    2582        3601 :                                         } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
    2583             : 
    2584        3599 :                                                 if (!file_handle.opened_path) {
    2585           4 :                                                         file_handle.opened_path = estrdup(resolved_path);
    2586             :                                                 }
    2587             : 
    2588        3599 :                                                 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
    2589        3598 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
    2590        3598 :                                                         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        4250 :                                         if (resolved_path != Z_STRVAL_P(inc_filename)) {
    2603        4248 :                                                 efree(resolved_path);
    2604             :                                         }
    2605             :                                 }
    2606        4250 :                                 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        6712 :         if (tmp_inc_filename) {
    2622           0 :                 zval_ptr_dtor(&tmp_inc_filename);
    2623             :         }
    2624             : 
    2625        6712 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2626           0 :                 HANDLE_EXCEPTION();
    2627        6712 :         } else if (EXPECTED(new_op_array != NULL)) {
    2628        6049 :                 EX(original_return_value) = EG(return_value_ptr_ptr);
    2629        6049 :                 EG(active_op_array) = new_op_array;
    2630        6049 :                 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        6049 :                         EG(return_value_ptr_ptr) = NULL;
    2636             :                 }
    2637             : 
    2638        6049 :                 EX(current_object) = EX(object);
    2639             : 
    2640        6049 :                 EX(function_state).function = (zend_function *) new_op_array;
    2641        6049 :                 EX(object) = NULL;
    2642             : 
    2643        6049 :                 if (!EG(active_symbol_table)) {
    2644          26 :                         zend_rebuild_symbol_table(TSRMLS_C);
    2645             :                 }
    2646             : 
    2647        6049 :                 if (EXPECTED(zend_execute == execute)) {
    2648        6049 :                         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         746 : static int ZEND_FASTCALL  ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2829             : {
    2830             : #if 0 || (IS_CONST != IS_UNUSED)
    2831         746 :         USE_OPLINE
    2832             : 
    2833             :         SAVE_OPLINE();
    2834             :         if (IS_CONST != IS_UNUSED) {
    2835             : 
    2836         746 :                 zval *ptr = opline->op1.zv;
    2837             : 
    2838         746 :                 if (Z_TYPE_P(ptr) == IS_LONG) {
    2839          32 :                         EG(exit_status) = Z_LVAL_P(ptr);
    2840             :                 } else {
    2841         714 :                         zend_print_variable(ptr);
    2842             :                 }
    2843             : 
    2844             :         }
    2845             : #endif
    2846         746 :         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      551283 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2910             : {
    2911      551283 :         USE_OPLINE
    2912             : 
    2913             :         zval *value;
    2914             : 
    2915             :         SAVE_OPLINE();
    2916      551283 :         value = opline->op1.zv;
    2917             : 
    2918      551283 :         ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
    2919             :         if (!0) {
    2920      551283 :                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    2921             :         }
    2922             : 
    2923             :         CHECK_EXCEPTION();
    2924      551283 :         ZEND_VM_NEXT_OPCODE();
    2925             : }
    2926             : 
    2927       40483 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2928             : {
    2929       40483 :         USE_OPLINE
    2930             : 
    2931             :         zval *value, *ret;
    2932             : 
    2933             :         SAVE_OPLINE();
    2934       40483 :         value = opline->op1.zv;
    2935             : 
    2936       40483 :         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       40483 :                 ALLOC_ZVAL(ret);
    2942       40483 :                 INIT_PZVAL_COPY(ret, value);
    2943       40483 :                 EX_T(opline->result.var).var.ptr = ret;
    2944       40483 :                 EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    2945             :                 if (!0) {
    2946       40483 :                         zval_copy_ctor(EX_T(opline->result.var).var.ptr);
    2947             :                 }
    2948             :         }
    2949             : 
    2950             :         CHECK_EXCEPTION();
    2951       40483 :         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       22841 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3060             : {
    3061       22841 :         USE_OPLINE
    3062             : 
    3063             : 
    3064             :         SAVE_OPLINE();
    3065       22841 :         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       22841 :         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         101 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3107             : {
    3108         101 :         USE_OPLINE
    3109             : 
    3110         101 :         zval *result = &EX_T(opline->result.var).tmp_var;
    3111             : 
    3112             :         SAVE_OPLINE();
    3113         202 :         ZVAL_BOOL(result, fast_equal_function(result,
    3114             :                 opline->op1.zv,
    3115             :                 opline->op2.zv TSRMLS_CC));
    3116             : 
    3117             : 
    3118             :         CHECK_EXCEPTION();
    3119         101 :         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        5354 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3419             : {
    3420        5354 :         USE_OPLINE
    3421             :         zval *function_name;
    3422             :         zend_class_entry *ce;
    3423             : 
    3424             :         SAVE_OPLINE();
    3425        5354 :         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        5354 :                 if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    3430        2655 :                         ce = CACHED_PTR(opline->op1.literal->cache_slot);
    3431             :                 } else {
    3432        2699 :                         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        2699 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    3434           2 :                                 HANDLE_EXCEPTION();
    3435             :                         }
    3436        2697 :                         if (UNEXPECTED(ce == NULL)) {
    3437           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    3438             :                         }
    3439        2697 :                         CACHE_PTR(opline->op1.literal->cache_slot, ce);
    3440             :                 }
    3441        5352 :                 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        5352 :         if (IS_CONST == IS_CONST &&
    3453             :             IS_CONST == IS_CONST &&
    3454        5352 :             CACHED_PTR(opline->op2.literal->cache_slot)) {
    3455        2655 :                 EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
    3456        2697 :         } 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        2697 :                 char *function_name_strval = NULL;
    3462        2697 :                 int function_name_strlen = 0;
    3463             : 
    3464             : 
    3465             :                 if (IS_CONST == IS_CONST) {
    3466        2697 :                         function_name_strval = Z_STRVAL_P(opline->op2.zv);
    3467        2697 :                         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        2697 :                 if (function_name_strval) {
    3480        2697 :                         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        2697 :                                 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        2690 :                         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        5374 :                         if (IS_CONST == IS_CONST &&
    3489        2687 :                             EXPECTED(EX(fbc)->type <= ZEND_USER_FUNCTION) &&
    3490        2687 :                             EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    3491             :                                 if (IS_CONST == IS_CONST) {
    3492        2661 :                                         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        5342 :         if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
    3512        5260 :                 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        5341 :         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        9943 : static int ZEND_FASTCALL  ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3554             : {
    3555        9943 :         USE_OPLINE
    3556             : 
    3557             :         SAVE_OPLINE();
    3558        9943 :         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        9943 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    3595        1957 :                                 value = CACHED_PTR(opline->op2.literal->cache_slot);
    3596        1957 :                                 ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
    3597        1957 :                                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    3598             :                                 CHECK_EXCEPTION();
    3599        1957 :                                 ZEND_VM_NEXT_OPCODE();
    3600        7986 :                         } else if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    3601           0 :                                 ce = CACHED_PTR(opline->op1.literal->cache_slot);
    3602             :                         } else {
    3603        7986 :                                 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        7985 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3605           1 :                                         HANDLE_EXCEPTION();
    3606             :                                 }
    3607        7984 :                                 if (UNEXPECTED(ce == NULL)) {
    3608           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    3609             :                                 }
    3610        7984 :                                 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        7984 :                 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       15964 :                         if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY ||
    3624        7982 :                             (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        7980 :                                 CACHE_PTR(opline->op2.literal->cache_slot, value);
    3633             :                         } else {
    3634             :                                 CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, value);
    3635             :                         }
    3636        7980 :                         ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
    3637        7980 :                         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        7980 :                 ZEND_VM_NEXT_OPCODE();
    3644             :         }
    3645             : }
    3646             : 
    3647       74110 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3648             : {
    3649       74110 :         USE_OPLINE
    3650             : 
    3651             :         zval *expr_ptr;
    3652             : 
    3653             :         SAVE_OPLINE();
    3654       74110 :         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       74110 :                 expr_ptr=opline->op1.zv;
    3665       74110 :                 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       74110 :                         ALLOC_ZVAL(new_expr);
    3675       74110 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    3676       74110 :                         expr_ptr = new_expr;
    3677       74110 :                         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       74110 :                 zval *offset = opline->op2.zv;
    3686             :                 ulong hval;
    3687             : 
    3688       74110 :                 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        2759 :                                 hval = Z_LVAL_P(offset);
    3695             : num_index:
    3696        3032 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    3697        3032 :                                 break;
    3698             :                         case IS_STRING:
    3699             :                                 if (IS_CONST == IS_CONST) {
    3700       70955 :                                         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       70955 :                                 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       70955 :                                 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       74110 :         ZEND_VM_NEXT_OPCODE();
    3731             : }
    3732             : 
    3733       38784 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3734             : {
    3735       38784 :         USE_OPLINE
    3736             : 
    3737       38784 :         array_init(&EX_T(opline->result.var).tmp_var);
    3738       38784 :         if (IS_CONST == IS_UNUSED) {
    3739             :                 ZEND_VM_NEXT_OPCODE();
    3740             : #if 0 || IS_CONST != IS_UNUSED
    3741             :         } else {
    3742       38784 :                 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       72214 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3951             : {
    3952       72214 :         USE_OPLINE
    3953             :         zend_free_op free_op2;
    3954             : 
    3955             :         SAVE_OPLINE();
    3956      144428 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    3957             :                 opline->op1.zv,
    3958       72214 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    3959             : 
    3960       72214 :         zval_dtor(free_op2.var);
    3961             :         CHECK_EXCEPTION();
    3962       72214 :         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      446448 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4135             : {
    4136      446448 :         USE_OPLINE
    4137             :         zend_free_op free_op2;
    4138      446448 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4139             : 
    4140             :         SAVE_OPLINE();
    4141     1339344 :         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      446448 :         zval_dtor(free_op2.var);
    4146             :         CHECK_EXCEPTION();
    4147      446448 :         ZEND_VM_NEXT_OPCODE();
    4148             : }
    4149             : 
    4150       18365 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4151             : {
    4152       18365 :         USE_OPLINE
    4153             :         zend_free_op free_op2;
    4154       18365 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4155             : 
    4156             :         SAVE_OPLINE();
    4157       55095 :         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       18365 :         zval_dtor(free_op2.var);
    4162             :         CHECK_EXCEPTION();
    4163       18365 :         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        2196 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4478             : {
    4479        2196 :         USE_OPLINE
    4480             :         zend_free_op free_op2;
    4481             : 
    4482             :         SAVE_OPLINE();
    4483        4392 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    4484             :                 opline->op1.zv,
    4485        2196 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    4486             : 
    4487        2196 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    4488             :         CHECK_EXCEPTION();
    4489        2196 :         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      148051 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4568             : {
    4569      148051 :         USE_OPLINE
    4570             :         zend_free_op free_op2;
    4571             : 
    4572             :         SAVE_OPLINE();
    4573      296102 :         concat_function(&EX_T(opline->result.var).tmp_var,
    4574             :                 opline->op1.zv,
    4575      148051 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    4576             : 
    4577      148051 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    4578             :         CHECK_EXCEPTION();
    4579      148051 :         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        7639 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4598             : {
    4599        7639 :         USE_OPLINE
    4600             :         zend_free_op free_op2;
    4601        7639 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4602             : 
    4603             :         SAVE_OPLINE();
    4604       15278 :         is_identical_function(result,
    4605             :                 opline->op1.zv,
    4606        7639 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    4607        7639 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    4608             : 
    4609        7639 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    4610             :         CHECK_EXCEPTION();
    4611        7639 :         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      268245 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4647             : {
    4648      268245 :         USE_OPLINE
    4649             :         zend_free_op free_op2;
    4650      268245 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4651             : 
    4652             :         SAVE_OPLINE();
    4653      804735 :         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      268245 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    4658             :         CHECK_EXCEPTION();
    4659      268245 :         ZEND_VM_NEXT_OPCODE();
    4660             : }
    4661             : 
    4662          60 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4663             : {
    4664          60 :         USE_OPLINE
    4665             :         zend_free_op free_op2;
    4666          60 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4667             : 
    4668             :         SAVE_OPLINE();
    4669         180 :         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          60 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    4674             :         CHECK_EXCEPTION();
    4675          60 :         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     1965595 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
    5302             : {
    5303     1965595 :         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     1965595 :         varname = opline->op1.zv;
    5313             : 
    5314     1965595 :         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     1965595 :         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     1965595 :                 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     1965595 :                         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     1965595 :                 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     1965595 :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    5382             :                         case ZEND_FETCH_GLOBAL:
    5383             :                                 if (IS_CONST != IS_TMP_VAR) {
    5384             : 
    5385             :                                 }
    5386       13445 :                                 break;
    5387             :                         case ZEND_FETCH_LOCAL:
    5388             : 
    5389     1182900 :                                 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      767760 :                                 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     1965595 :         if (IS_CONST != IS_CONST && varname == &tmp_varname) {
    5403             :                 zval_dtor(&tmp_varname);
    5404             :         }
    5405     1965595 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    5406           8 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    5407             :         }
    5408     1965595 :         PZVAL_LOCK(*retval);
    5409     1965595 :         switch (type) {
    5410             :                 case BP_VAR_R:
    5411             :                 case BP_VAR_IS:
    5412      359340 :                         AI_SET_PTR(&EX_T(opline->result.var), *retval);
    5413      359340 :                         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     1606255 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    5427             :                         break;
    5428             :         }
    5429             :         CHECK_EXCEPTION();
    5430     1965595 :         ZEND_VM_NEXT_OPCODE();
    5431             : }
    5432             : 
    5433      359320 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5434             : {
    5435      359320 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5436             : }
    5437             : 
    5438     1606221 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5439             : {
    5440     1606221 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5441             : }
    5442             : 
    5443           4 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5444             : {
    5445           4 :         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      341946 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5584             : {
    5585      341946 :         USE_OPLINE
    5586             : 
    5587             :         zval *expr_ptr;
    5588             : 
    5589             :         SAVE_OPLINE();
    5590      341946 :         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      341946 :                 expr_ptr=opline->op1.zv;
    5601      341946 :                 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      341946 :                         ALLOC_ZVAL(new_expr);
    5611      341946 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    5612      341946 :                         expr_ptr = new_expr;
    5613      341946 :                         zendi_zval_copy_ctor(*expr_ptr);
    5614             :                 } else {
    5615             :                         Z_ADDREF_P(expr_ptr);
    5616             :                 }
    5617             :         }
    5618             : 
    5619      341946 :         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      341946 :                 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      341946 :         ZEND_VM_NEXT_OPCODE();
    5667             : }
    5668             : 
    5669      220707 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5670             : {
    5671      220707 :         USE_OPLINE
    5672             : 
    5673      220707 :         array_init(&EX_T(opline->result.var).tmp_var);
    5674      220707 :         if (IS_CONST == IS_UNUSED) {
    5675             :                 ZEND_VM_NEXT_OPCODE();
    5676             : #if 0 || IS_CONST != IS_UNUSED
    5677             :         } else {
    5678      220707 :                 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         262 : static int ZEND_FASTCALL  ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5847             : {
    5848         262 :         USE_OPLINE
    5849             :         zend_function *op_array;
    5850             :         int closure_is_static, closure_is_being_defined_inside_static_context;
    5851             : 
    5852             :         SAVE_OPLINE();
    5853             : 
    5854         524 :         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) ||
    5855         262 :             UNEXPECTED(op_array->type != ZEND_USER_FUNCTION)) {
    5856           0 :                 zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
    5857             :         }
    5858             : 
    5859         262 :         closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
    5860         262 :         closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
    5861         274 :         if (closure_is_static || closure_is_being_defined_inside_static_context) {
    5862          12 :                 zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array,  EG(called_scope), NULL TSRMLS_CC);
    5863             :         } else {
    5864         250 :                 zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array,  EG(scope), EG(This) TSRMLS_CC);
    5865             :         }
    5866             : 
    5867             :         CHECK_EXCEPTION();
    5868         262 :         ZEND_VM_NEXT_OPCODE();
    5869             : }
    5870             : 
    5871          52 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5872             : {
    5873          52 :         USE_OPLINE
    5874             : 
    5875             : 
    5876             :         SAVE_OPLINE();
    5877         104 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    5878             :                 opline->op1.zv,
    5879             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5880             : 
    5881             : 
    5882             :         CHECK_EXCEPTION();
    5883          52 :         ZEND_VM_NEXT_OPCODE();
    5884             : }
    5885             : 
    5886         119 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5887             : {
    5888         119 :         USE_OPLINE
    5889             : 
    5890             : 
    5891             :         SAVE_OPLINE();
    5892         238 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    5893             :                 opline->op1.zv,
    5894             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5895             : 
    5896             : 
    5897             :         CHECK_EXCEPTION();
    5898         119 :         ZEND_VM_NEXT_OPCODE();
    5899             : }
    5900             : 
    5901        2115 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5902             : {
    5903        2115 :         USE_OPLINE
    5904             : 
    5905             : 
    5906             :         SAVE_OPLINE();
    5907        4230 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    5908             :                 opline->op1.zv,
    5909             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5910             : 
    5911             : 
    5912             :         CHECK_EXCEPTION();
    5913        2115 :         ZEND_VM_NEXT_OPCODE();
    5914             : }
    5915             : 
    5916           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5917             : {
    5918           0 :         USE_OPLINE
    5919             : 
    5920             : 
    5921             :         SAVE_OPLINE();
    5922           0 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    5923             :                 opline->op1.zv,
    5924             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5925             : 
    5926             : 
    5927             :         CHECK_EXCEPTION();
    5928           0 :         ZEND_VM_NEXT_OPCODE();
    5929             : }
    5930             : 
    5931           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5932             : {
    5933           0 :         USE_OPLINE
    5934             : 
    5935             : 
    5936             :         SAVE_OPLINE();
    5937           0 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    5938             :                 opline->op1.zv,
    5939             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5940             : 
    5941             : 
    5942             :         CHECK_EXCEPTION();
    5943           0 :         ZEND_VM_NEXT_OPCODE();
    5944             : }
    5945             : 
    5946           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5947             : {
    5948           0 :         USE_OPLINE
    5949             : 
    5950             : 
    5951             :         SAVE_OPLINE();
    5952           0 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    5953             :                 opline->op1.zv,
    5954             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5955             : 
    5956             : 
    5957             :         CHECK_EXCEPTION();
    5958           0 :         ZEND_VM_NEXT_OPCODE();
    5959             : }
    5960             : 
    5961           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5962             : {
    5963           0 :         USE_OPLINE
    5964             : 
    5965             : 
    5966             :         SAVE_OPLINE();
    5967           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    5968             :                 opline->op1.zv,
    5969             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5970             : 
    5971             : 
    5972             :         CHECK_EXCEPTION();
    5973           0 :         ZEND_VM_NEXT_OPCODE();
    5974             : }
    5975             : 
    5976      179592 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5977             : {
    5978      179592 :         USE_OPLINE
    5979             : 
    5980             : 
    5981             :         SAVE_OPLINE();
    5982      359184 :         concat_function(&EX_T(opline->result.var).tmp_var,
    5983             :                 opline->op1.zv,
    5984             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    5985             : 
    5986             : 
    5987             :         CHECK_EXCEPTION();
    5988      179592 :         ZEND_VM_NEXT_OPCODE();
    5989             : }
    5990             : 
    5991          49 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5992             : {
    5993          49 :         USE_OPLINE
    5994             : 
    5995             : 
    5996             :         SAVE_OPLINE();
    5997          98 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    5998             :                 opline->op1.zv,
    5999             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6000             : 
    6001             : 
    6002             :         CHECK_EXCEPTION();
    6003          49 :         ZEND_VM_NEXT_OPCODE();
    6004             : }
    6005             : 
    6006         137 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6007             : {
    6008         137 :         USE_OPLINE
    6009             : 
    6010         137 :         zval *result = &EX_T(opline->result.var).tmp_var;
    6011             : 
    6012             :         SAVE_OPLINE();
    6013         274 :         is_identical_function(result,
    6014             :                 opline->op1.zv,
    6015             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6016         137 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    6017             : 
    6018             : 
    6019             :         CHECK_EXCEPTION();
    6020         137 :         ZEND_VM_NEXT_OPCODE();
    6021             : }
    6022             : 
    6023        3205 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6024             : {
    6025        3205 :         USE_OPLINE
    6026             : 
    6027        3205 :         zval *result = &EX_T(opline->result.var).tmp_var;
    6028             : 
    6029             :         SAVE_OPLINE();
    6030        9615 :         ZVAL_BOOL(result, fast_equal_function(result,
    6031             :                 opline->op1.zv,
    6032             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
    6033             : 
    6034             : 
    6035             :         CHECK_EXCEPTION();
    6036        3205 :         ZEND_VM_NEXT_OPCODE();
    6037             : }
    6038             : 
    6039         136 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6040             : {
    6041         136 :         USE_OPLINE
    6042             : 
    6043         136 :         zval *result = &EX_T(opline->result.var).tmp_var;
    6044             : 
    6045             :         SAVE_OPLINE();
    6046         408 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    6047             :                 opline->op1.zv,
    6048             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
    6049             : 
    6050             : 
    6051             :         CHECK_EXCEPTION();
    6052         136 :         ZEND_VM_NEXT_OPCODE();
    6053             : }
    6054             : 
    6055      977553 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6056             : {
    6057      977553 :         USE_OPLINE
    6058             : 
    6059      977553 :         zval *result = &EX_T(opline->result.var).tmp_var;
    6060             : 
    6061             :         SAVE_OPLINE();
    6062     2932659 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    6063             :                 opline->op1.zv,
    6064             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
    6065             : 
    6066             : 
    6067             :         CHECK_EXCEPTION();
    6068      977553 :         ZEND_VM_NEXT_OPCODE();
    6069             : }
    6070             : 
    6071      158259 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6072             : {
    6073      158259 :         USE_OPLINE
    6074             : 
    6075      158259 :         zval *result = &EX_T(opline->result.var).tmp_var;
    6076             : 
    6077             :         SAVE_OPLINE();
    6078      474777 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    6079             :                 opline->op1.zv,
    6080             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
    6081             : 
    6082             : 
    6083             :         CHECK_EXCEPTION();
    6084      158259 :         ZEND_VM_NEXT_OPCODE();
    6085             : }
    6086             : 
    6087           0 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6088             : {
    6089           0 :         USE_OPLINE
    6090             : 
    6091             : 
    6092             :         SAVE_OPLINE();
    6093           0 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    6094             :                 opline->op1.zv,
    6095             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6096             : 
    6097             : 
    6098             :         CHECK_EXCEPTION();
    6099           0 :         ZEND_VM_NEXT_OPCODE();
    6100             : }
    6101             : 
    6102           0 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6103             : {
    6104           0 :         USE_OPLINE
    6105             : 
    6106             : 
    6107             :         SAVE_OPLINE();
    6108           0 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    6109             :                 opline->op1.zv,
    6110             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6111             : 
    6112             : 
    6113             :         CHECK_EXCEPTION();
    6114           0 :         ZEND_VM_NEXT_OPCODE();
    6115             : }
    6116             : 
    6117           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6118             : {
    6119           0 :         USE_OPLINE
    6120             : 
    6121             : 
    6122             :         SAVE_OPLINE();
    6123           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    6124             :                 opline->op1.zv,
    6125             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6126             : 
    6127             : 
    6128             :         CHECK_EXCEPTION();
    6129           0 :         ZEND_VM_NEXT_OPCODE();
    6130             : }
    6131             : 
    6132           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6133             : {
    6134           0 :         USE_OPLINE
    6135             : 
    6136             : 
    6137             :         SAVE_OPLINE();
    6138           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    6139             :                 opline->op1.zv,
    6140             :                 _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6141             : 
    6142             : 
    6143             :         CHECK_EXCEPTION();
    6144           0 :         ZEND_VM_NEXT_OPCODE();
    6145             : }
    6146             : 
    6147           9 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6148             : {
    6149           9 :         USE_OPLINE
    6150             :         zval *function_name;
    6151             :         zend_class_entry *ce;
    6152             : 
    6153             :         SAVE_OPLINE();
    6154           9 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    6155             : 
    6156             :         if (IS_CONST == IS_CONST) {
    6157             :                 /* no function found. try a static method in class */
    6158           9 :                 if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    6159           2 :                         ce = CACHED_PTR(opline->op1.literal->cache_slot);
    6160             :                 } else {
    6161           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);
    6162           7 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    6163           0 :                                 HANDLE_EXCEPTION();
    6164             :                         }
    6165           7 :                         if (UNEXPECTED(ce == NULL)) {
    6166           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    6167             :                         }
    6168           7 :                         CACHE_PTR(opline->op1.literal->cache_slot, ce);
    6169             :                 }
    6170           9 :                 EX(called_scope) = ce;
    6171             :         } else {
    6172             :                 ce = EX_T(opline->op1.var).class_entry;
    6173             : 
    6174             :                 if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
    6175             :                         EX(called_scope) = EG(called_scope);
    6176             :                 } else {
    6177             :                         EX(called_scope) = ce;
    6178             :                 }
    6179             :         }
    6180             : 
    6181           9 :         if (IS_CONST == IS_CONST &&
    6182             :             IS_CV == IS_CONST &&
    6183             :             CACHED_PTR(opline->op2.literal->cache_slot)) {
    6184             :                 EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
    6185           9 :         } else if (IS_CONST != IS_CONST &&
    6186             :                    IS_CV == IS_CONST &&
    6187             :                    (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
    6188             :                 /* do nothing */
    6189             :         } else if (IS_CV != IS_UNUSED) {
    6190           9 :                 char *function_name_strval = NULL;
    6191           9 :                 int function_name_strlen = 0;
    6192             : 
    6193             : 
    6194           9 :                 if (IS_CV == IS_CONST) {
    6195             :                         function_name_strval = Z_STRVAL_P(opline->op2.zv);
    6196             :                         function_name_strlen = Z_STRLEN_P(opline->op2.zv);
    6197             :                 } else {
    6198          18 :                         function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
    6199             : 
    6200           9 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    6201           1 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    6202             :                         } else {
    6203           8 :                                 function_name_strval = Z_STRVAL_P(function_name);
    6204           8 :                                 function_name_strlen = Z_STRLEN_P(function_name);
    6205             :                         }
    6206             :                 }
    6207             : 
    6208           8 :                 if (function_name_strval) {
    6209           8 :                         if (ce->get_static_method) {
    6210           0 :                                 EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
    6211             :                         } else {
    6212           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);
    6213             :                         }
    6214           8 :                         if (UNEXPECTED(EX(fbc) == NULL)) {
    6215           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
    6216             :                         }
    6217           8 :                         if (IS_CV == IS_CONST &&
    6218             :                             EXPECTED(EX(fbc)->type <= ZEND_USER_FUNCTION) &&
    6219             :                             EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    6220             :                                 if (IS_CONST == IS_CONST) {
    6221             :                                         CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
    6222             :                                 } else {
    6223             :                                         CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
    6224             :                                 }
    6225             :                         }
    6226             :                 }
    6227             :                 if (IS_CV != IS_CONST) {
    6228             : 
    6229             :                 }
    6230             :         } else {
    6231             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    6232             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    6233             :                 }
    6234             :                 if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    6235             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
    6236             :                 }
    6237             :                 EX(fbc) = ce->constructor;
    6238             :         }
    6239             : 
    6240           8 :         if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
    6241           7 :                 EX(object) = NULL;
    6242             :         } else {
    6243           1 :                 if (EG(This) &&
    6244           0 :                     Z_OBJ_HT_P(EG(This))->get_class_entry &&
    6245           0 :                     !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
    6246             :                     /* We are calling method of the other (incompatible) class,
    6247             :                        but passing $this. This is done for compatibility with php-4. */
    6248           0 :                         if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    6249           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);
    6250             :                         } else {
    6251             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    6252           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);
    6253             :                         }
    6254             :                 }
    6255           1 :                 if ((EX(object) = EG(This))) {
    6256           0 :                         Z_ADDREF_P(EX(object));
    6257           0 :                         EX(called_scope) = Z_OBJCE_P(EX(object));
    6258             :                 }
    6259             :         }
    6260             : 
    6261             :         CHECK_EXCEPTION();
    6262           8 :         ZEND_VM_NEXT_OPCODE();
    6263             : }
    6264             : 
    6265        1065 : static int ZEND_FASTCALL  ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6266             : {
    6267        1065 :         USE_OPLINE
    6268             :         zend_class_entry *ce, *catch_ce;
    6269             :         zval *exception;
    6270             : 
    6271             :         SAVE_OPLINE();
    6272             :         /* Check whether an exception has been thrown, if not, jump over code */
    6273        1065 :         zend_exception_restore(TSRMLS_C);
    6274        1065 :         if (EG(exception) == NULL) {
    6275           0 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    6276           0 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    6277             :         }
    6278        1065 :         if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    6279         296 :                 catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
    6280             :         } else {
    6281         769 :                 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);
    6282             : 
    6283         769 :                 CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
    6284             :         }
    6285        1065 :         ce = Z_OBJCE_P(EG(exception));
    6286             : 
    6287             : #ifdef HAVE_DTRACE
    6288             :         if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
    6289             :                 DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
    6290             :         }
    6291             : #endif /* HAVE_DTRACE */
    6292             : 
    6293        1065 :         if (ce != catch_ce) {
    6294         498 :                 if (!instanceof_function(ce, catch_ce TSRMLS_CC)) {
    6295           2 :                         if (opline->result.num) {
    6296           0 :                                 zend_throw_exception_internal(NULL TSRMLS_CC);
    6297           0 :                                 HANDLE_EXCEPTION();
    6298             :                         }
    6299           2 :                         ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    6300           2 :                         ZEND_VM_CONTINUE(); /* CHECK_ME */
    6301             :                 }
    6302             :         }
    6303             : 
    6304        1063 :         exception = EG(exception);
    6305        1063 :         if (!EG(active_symbol_table)) {
    6306         147 :                 if (EX_CV(opline->op2.var)) {
    6307          34 :                         zval_ptr_dtor(EX_CV(opline->op2.var));
    6308             :                 }
    6309         147 :                 EX_CV(opline->op2.var) = (zval**)EX_CVs() + (EX(op_array)->last_var + opline->op2.var);
    6310         147 :                 *EX_CV(opline->op2.var) = EG(exception);
    6311             :         } else {
    6312         916 :                 zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.var);
    6313         916 :                 zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value,
    6314             :                     &EG(exception), sizeof(zval *), (void**)&EX_CV(opline->op2.var));
    6315             :         }
    6316        1063 :         if (UNEXPECTED(EG(exception) != exception)) {
    6317           1 :                 Z_ADDREF_P(EG(exception));
    6318           1 :                 HANDLE_EXCEPTION();
    6319             :         } else {
    6320        1062 :                 EG(exception) = NULL;
    6321        1062 :                 ZEND_VM_NEXT_OPCODE();
    6322             :         }
    6323             : }
    6324             : 
    6325           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6326             : {
    6327           0 :         USE_OPLINE
    6328             : 
    6329             : 
    6330             :         SAVE_OPLINE();
    6331           0 :         if (IS_CONST==IS_VAR) {
    6332             :                 PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
    6333             :         }
    6334           0 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    6335             :                                  opline->op1.zv,
    6336             :                                  _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6337             : 
    6338             :         CHECK_EXCEPTION();
    6339           0 :         ZEND_VM_NEXT_OPCODE();
    6340             : }
    6341             : 
    6342          66 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6343             : {
    6344          66 :         USE_OPLINE
    6345             : 
    6346             :         zval *expr_ptr;
    6347             : 
    6348             :         SAVE_OPLINE();
    6349          66 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    6350             :                 zval **expr_ptr_ptr = NULL;
    6351             : 
    6352             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    6353             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    6354             :                 }
    6355             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    6356             :                 expr_ptr = *expr_ptr_ptr;
    6357             :                 Z_ADDREF_P(expr_ptr);
    6358             :         } else {
    6359          66 :                 expr_ptr=opline->op1.zv;
    6360          66 :                 if (0) { /* temporary variable */
    6361             :                         zval *new_expr;
    6362             : 
    6363             :                         ALLOC_ZVAL(new_expr);
    6364             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    6365             :                         expr_ptr = new_expr;
    6366             :                 } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    6367             :                         zval *new_expr;
    6368             : 
    6369          66 :                         ALLOC_ZVAL(new_expr);
    6370          66 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    6371          66 :                         expr_ptr = new_expr;
    6372          66 :                         zendi_zval_copy_ctor(*expr_ptr);
    6373             :                 } else {
    6374             :                         Z_ADDREF_P(expr_ptr);
    6375             :                 }
    6376             :         }
    6377             : 
    6378             :         if (IS_CV != IS_UNUSED) {
    6379             : 
    6380         132 :                 zval *offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
    6381             :                 ulong hval;
    6382             : 
    6383          66 :                 switch (Z_TYPE_P(offset)) {
    6384             :                         case IS_DOUBLE:
    6385           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6386           0 :                                 goto num_index;
    6387             :                         case IS_LONG:
    6388             :                         case IS_BOOL:
    6389           1 :                                 hval = Z_LVAL_P(offset);
    6390             : num_index:
    6391           1 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    6392           1 :                                 break;
    6393             :                         case IS_STRING:
    6394          55 :                                 if (IS_CV == IS_CONST) {
    6395             :                                         hval = Z_HASH_P(offset);
    6396             :                                 } else {
    6397          55 :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    6398         110 :                                         if (IS_INTERNED(Z_STRVAL_P(offset))) {
    6399          55 :                                                 hval = INTERNED_HASH(Z_STRVAL_P(offset));
    6400             :                                         } else {
    6401           0 :                                                 hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
    6402             :                                         }
    6403             :                                 }
    6404          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);
    6405          55 :                                 break;
    6406             :                         case IS_NULL:
    6407           0 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    6408           0 :                                 break;
    6409             :                         default:
    6410          10 :                                 zend_error(E_WARNING, "Illegal offset type");
    6411          10 :                                 zval_ptr_dtor(&expr_ptr);
    6412             :                                 /* do nothing */
    6413             :                                 break;
    6414             :                 }
    6415             : 
    6416             :         } else {
    6417             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    6418             :         }
    6419             :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    6420             : 
    6421             :         } else {
    6422             : 
    6423             :         }
    6424             :         CHECK_EXCEPTION();
    6425          66 :         ZEND_VM_NEXT_OPCODE();
    6426             : }
    6427             : 
    6428           6 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6429             : {
    6430           6 :         USE_OPLINE
    6431             : 
    6432           6 :         array_init(&EX_T(opline->result.var).tmp_var);
    6433           6 :         if (IS_CONST == IS_UNUSED) {
    6434             :                 ZEND_VM_NEXT_OPCODE();
    6435             : #if 0 || IS_CONST != IS_UNUSED
    6436             :         } else {
    6437           6 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6438             : #endif
    6439             :         }
    6440             : }
    6441             : 
    6442           0 : static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6443             : {
    6444           0 :         USE_OPLINE
    6445             :         zend_free_op free_op1;
    6446             : 
    6447             :         SAVE_OPLINE();
    6448           0 :         bitwise_not_function(&EX_T(opline->result.var).tmp_var,
    6449           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC) TSRMLS_CC);
    6450           0 :         zval_dtor(free_op1.var);
    6451             :         CHECK_EXCEPTION();
    6452           0 :         ZEND_VM_NEXT_OPCODE();
    6453             : }
    6454             : 
    6455      172696 : static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6456             : {
    6457      172696 :         USE_OPLINE
    6458             :         zend_free_op free_op1;
    6459             : 
    6460             :         SAVE_OPLINE();
    6461      345392 :         boolean_not_function(&EX_T(opline->result.var).tmp_var,
    6462      172696 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC) TSRMLS_CC);
    6463      172696 :         zval_dtor(free_op1.var);
    6464             :         CHECK_EXCEPTION();
    6465      172696 :         ZEND_VM_NEXT_OPCODE();
    6466             : }
    6467             : 
    6468      109331 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6469             : {
    6470      109331 :         USE_OPLINE
    6471             :         zend_free_op free_op1;
    6472             :         zval *z;
    6473             : 
    6474             :         SAVE_OPLINE();
    6475      218662 :         z = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6476             : 
    6477      109331 :         if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) {
    6478           1 :                 INIT_PZVAL(z);
    6479             :         }
    6480      109331 :         zend_print_variable(z);
    6481             : 
    6482      109331 :         zval_dtor(free_op1.var);
    6483             :         CHECK_EXCEPTION();
    6484      109331 :         ZEND_VM_NEXT_OPCODE();
    6485             : }
    6486             : 
    6487        8162 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6488             : {
    6489        8162 :         USE_OPLINE
    6490             : 
    6491        8162 :         ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
    6492        8162 :         return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6493             : }
    6494             : 
    6495    14230526 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6496             : {
    6497    14230526 :         USE_OPLINE
    6498             :         zend_free_op free_op1;
    6499             :         zval *val;
    6500             :         int ret;
    6501             : 
    6502             :         SAVE_OPLINE();
    6503    28461052 :         val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6504             : 
    6505    14230526 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    6506    14044623 :                 ret = Z_LVAL_P(val);
    6507             :         } else {
    6508      185903 :                 ret = i_zend_is_true(val);
    6509      185903 :                 zval_dtor(free_op1.var);
    6510      185903 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    6511           0 :                         HANDLE_EXCEPTION();
    6512             :                 }
    6513             :         }
    6514    14230526 :         if (!ret) {
    6515             : #if DEBUG_ZEND>=2
    6516             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    6517             : #endif
    6518     9254295 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    6519     9254295 :                 ZEND_VM_CONTINUE();
    6520             :         }
    6521             : 
    6522     4976231 :         ZEND_VM_NEXT_OPCODE();
    6523             : }
    6524             : 
    6525       95626 : static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6526             : {
    6527       95626 :         USE_OPLINE
    6528             :         zend_free_op free_op1;
    6529             :         zval *val;
    6530             :         int ret;
    6531             : 
    6532             :         SAVE_OPLINE();
    6533      191252 :         val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6534             : 
    6535       95626 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    6536       95626 :                 ret = Z_LVAL_P(val);
    6537             :         } else {
    6538           0 :                 ret = i_zend_is_true(val);
    6539           0 :                 zval_dtor(free_op1.var);
    6540           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    6541           0 :                         HANDLE_EXCEPTION();
    6542             :                 }
    6543             :         }
    6544       95626 :         if (ret) {
    6545             : #if DEBUG_ZEND>=2
    6546             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    6547             : #endif
    6548       95298 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    6549       95298 :                 ZEND_VM_CONTINUE();
    6550             :         }
    6551             : 
    6552         328 :         ZEND_VM_NEXT_OPCODE();
    6553             : }
    6554             : 
    6555     4185160 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6556             : {
    6557     4185160 :         USE_OPLINE
    6558             :         zend_free_op free_op1;
    6559             :         zval *val;
    6560             :         int retval;
    6561             : 
    6562             :         SAVE_OPLINE();
    6563     8370320 :         val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6564             : 
    6565     4185160 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    6566     4185160 :                 retval = Z_LVAL_P(val);
    6567             :         } else {
    6568           0 :                 retval = i_zend_is_true(val);
    6569           0 :                 zval_dtor(free_op1.var);
    6570           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    6571           0 :                         HANDLE_EXCEPTION();
    6572             :                 }
    6573             :         }
    6574     4185160 :         if (EXPECTED(retval != 0)) {
    6575             : #if DEBUG_ZEND>=2
    6576             :                 printf("Conditional jmp on true to %d\n", opline->extended_value);
    6577             : #endif
    6578     4030904 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    6579     4030904 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    6580             :         } else {
    6581             : #if DEBUG_ZEND>=2
    6582             :                 printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
    6583             : #endif
    6584      154256 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
    6585      154256 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    6586             :         }
    6587             : }
    6588             : 
    6589     2115711 : static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6590             : {
    6591     2115711 :         USE_OPLINE
    6592             :         zend_free_op free_op1;
    6593             :         zval *val;
    6594             :         int retval;
    6595             : 
    6596             :         SAVE_OPLINE();
    6597     4231422 :         val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6598             : 
    6599     2115711 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    6600     2115702 :                 retval = Z_LVAL_P(val);
    6601             :         } else {
    6602           9 :                 retval = i_zend_is_true(val);
    6603           9 :                 zval_dtor(free_op1.var);
    6604           9 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    6605           0 :                         HANDLE_EXCEPTION();
    6606             :                 }
    6607             :         }
    6608     2115711 :         Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
    6609     2115711 :         Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
    6610     2115711 :         if (!retval) {
    6611             : #if DEBUG_ZEND>=2
    6612             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    6613             : #endif
    6614      901956 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    6615      901956 :                 ZEND_VM_CONTINUE();
    6616             :         }
    6617     1213755 :         ZEND_VM_NEXT_OPCODE();
    6618             : }
    6619             : 
    6620      353374 : static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6621             : {
    6622      353374 :         USE_OPLINE
    6623             :         zend_free_op free_op1;
    6624             :         zval *val;
    6625             :         int retval;
    6626             : 
    6627             :         SAVE_OPLINE();
    6628      706748 :         val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6629             : 
    6630      353374 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    6631      353374 :                 retval = Z_LVAL_P(val);
    6632             :         } else {
    6633           0 :                 retval = i_zend_is_true(val);
    6634           0 :                 zval_dtor(free_op1.var);
    6635           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    6636           0 :                         HANDLE_EXCEPTION();
    6637             :                 }
    6638             :         }
    6639      353374 :         Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
    6640      353374 :         Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
    6641      353374 :         if (retval) {
    6642             : #if DEBUG_ZEND>=2
    6643             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    6644             : #endif
    6645       50529 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    6646       50529 :                 ZEND_VM_CONTINUE();
    6647             :         }
    6648      302845 :         ZEND_VM_NEXT_OPCODE();
    6649             : }
    6650             : 
    6651     4534766 : static int ZEND_FASTCALL  ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6652             : {
    6653     4534766 :         USE_OPLINE
    6654             : 
    6655             :         SAVE_OPLINE();
    6656             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    6657     4534766 :                 zendi_zval_dtor(EX_T(opline->op1.var).tmp_var);
    6658             :         } else {
    6659             :                 zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
    6660             :         }
    6661             :         CHECK_EXCEPTION();
    6662     4534766 :         ZEND_VM_NEXT_OPCODE();
    6663             : }
    6664             : 
    6665      244721 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6666             : {
    6667      244721 :         USE_OPLINE
    6668             :         zval *retval_ptr;
    6669             :         zend_free_op free_op1;
    6670             : 
    6671             :         SAVE_OPLINE();
    6672      489442 :         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6673             : 
    6674      244721 :         if (!EG(return_value_ptr_ptr)) {
    6675             :                 if (IS_TMP_VAR == IS_TMP_VAR) {
    6676           0 :                         zval_dtor(free_op1.var);
    6677             :                 }
    6678      244721 :         } else if (!1) { /* Not a temp var */
    6679             :                 if (IS_TMP_VAR == IS_CONST ||
    6680             :                     (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
    6681             :                         zval *ret;
    6682             : 
    6683             :                         ALLOC_ZVAL(ret);
    6684             :                         INIT_PZVAL_COPY(ret, retval_ptr);
    6685             :                         zval_copy_ctor(ret);
    6686             :                         *EG(return_value_ptr_ptr) = ret;
    6687             :                 } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
    6688             :                            retval_ptr == &EG(uninitialized_zval)) {
    6689             :                         zval *ret;
    6690             : 
    6691             :                         ALLOC_INIT_ZVAL(ret);
    6692             :                         *EG(return_value_ptr_ptr) = ret;
    6693             :                 } else {
    6694             :                         *EG(return_value_ptr_ptr) = retval_ptr;
    6695             :                         Z_ADDREF_P(retval_ptr);
    6696             :                 }
    6697             :         } else {
    6698             :                 zval *ret;
    6699             : 
    6700      244721 :                 ALLOC_ZVAL(ret);
    6701      244721 :                 INIT_PZVAL_COPY(ret, retval_ptr);
    6702      244721 :                 *EG(return_value_ptr_ptr) = ret;
    6703             :         }
    6704             : 
    6705      244721 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6706             : }
    6707             : 
    6708           0 : static int ZEND_FASTCALL  ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6709             : {
    6710           0 :         USE_OPLINE
    6711             :         zval *retval_ptr;
    6712             :         zval **retval_ptr_ptr;
    6713             :         zend_free_op free_op1;
    6714             : 
    6715             :         SAVE_OPLINE();
    6716             : 
    6717             :         do {
    6718             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
    6719             :                         /* Not supposed to happen, but we'll allow it */
    6720           0 :                         zend_error(E_NOTICE, "Only variable references should be returned by reference");
    6721             : 
    6722           0 :                         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6723           0 :                         if (!EG(return_value_ptr_ptr)) {
    6724             :                                 if (IS_TMP_VAR == IS_TMP_VAR) {
    6725           0 :                                         zval_dtor(free_op1.var);
    6726             :                                 }
    6727           0 :                         } else if (!1) { /* Not a temp var */
    6728             :                                 zval *ret;
    6729             : 
    6730             :                                 ALLOC_ZVAL(ret);
    6731             :                                 INIT_PZVAL_COPY(ret, retval_ptr);
    6732             :                                 zval_copy_ctor(ret);
    6733             :                                 *EG(return_value_ptr_ptr) = ret;
    6734             :                         } else {
    6735             :                                 zval *ret;
    6736             : 
    6737           0 :                                 ALLOC_ZVAL(ret);
    6738           0 :                                 INIT_PZVAL_COPY(ret, retval_ptr);
    6739           0 :                                 *EG(return_value_ptr_ptr) = ret;
    6740             :                         }
    6741           0 :                         break;
    6742             :                 }
    6743             : 
    6744             :                 retval_ptr_ptr = NULL;
    6745             : 
    6746             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
    6747             :                         zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
    6748             :                 }
    6749             : 
    6750             :                 if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
    6751             :                         if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    6752             :                             EX_T(opline->op1.var).var.fcall_returned_reference) {
    6753             :                         } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    6754             :                                 zend_error(E_NOTICE, "Only variable references should be returned by reference");
    6755             :                                 if (EG(return_value_ptr_ptr)) {
    6756             :                                         zval *ret;
    6757             : 
    6758             :                                         ALLOC_ZVAL(ret);
    6759             :                                         INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
    6760             :                                         zval_copy_ctor(ret);
    6761             :                                         *EG(return_value_ptr_ptr) = ret;
    6762             :                                 }
    6763             :                                 break;
    6764             :                         }
    6765             :                 }
    6766             : 
    6767             :                 if (EG(return_value_ptr_ptr)) {
    6768             :                         SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
    6769             :                         Z_ADDREF_PP(retval_ptr_ptr);
    6770             : 
    6771             :                         *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
    6772             :                 }
    6773             :         } while (0);
    6774             : 
    6775           0 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6776             : }
    6777             : 
    6778           0 : static int ZEND_FASTCALL  ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6779             : {
    6780           0 :         USE_OPLINE
    6781             :         zval *value;
    6782             :         zval *exception;
    6783             :         zend_free_op free_op1;
    6784             : 
    6785             :         SAVE_OPLINE();
    6786           0 :         value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6787             : 
    6788           0 :         if (IS_TMP_VAR == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
    6789           0 :                 zend_error_noreturn(E_ERROR, "Can only throw objects");
    6790             :         }
    6791           0 :         zend_exception_save(TSRMLS_C);
    6792             :         /* Not sure if a complete copy is what we want here */
    6793           0 :         ALLOC_ZVAL(exception);
    6794           0 :         INIT_PZVAL_COPY(exception, value);
    6795           0 :         if (!1) {
    6796             :                 zval_copy_ctor(exception);
    6797             :         }
    6798             : 
    6799           0 :         zend_throw_exception_object(exception TSRMLS_CC);
    6800           0 :         zend_exception_restore(TSRMLS_C);
    6801             : 
    6802           0 :         HANDLE_EXCEPTION();
    6803             : }
    6804             : 
    6805     1915598 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6806             : {
    6807     1915598 :         USE_OPLINE
    6808             : 
    6809             :         SAVE_OPLINE();
    6810     2042005 :         if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
    6811     2042005 :                 && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
    6812           0 :                         zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.opline_num);
    6813             :         }
    6814             :         {
    6815             :                 zval *valptr;
    6816             :                 zval *value;
    6817             :                 zend_free_op free_op1;
    6818             : 
    6819     3831196 :                 value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6820             : 
    6821     1915598 :                 ALLOC_ZVAL(valptr);
    6822     1915598 :                 INIT_PZVAL_COPY(valptr, value);
    6823     1915598 :                 if (!1) {
    6824             :                         zval_copy_ctor(valptr);
    6825             :                 }
    6826             :                 zend_vm_stack_push(valptr TSRMLS_CC);
    6827             : 
    6828             :         }
    6829             :         CHECK_EXCEPTION();
    6830     1915598 :         ZEND_VM_NEXT_OPCODE();
    6831             : }
    6832             : 
    6833     1254232 : static int ZEND_FASTCALL  ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6834             : {
    6835     1254232 :         USE_OPLINE
    6836             :         zend_free_op free_op1;
    6837     1254232 :         zval *retval = &EX_T(opline->result.var).tmp_var;
    6838             : 
    6839             :         SAVE_OPLINE();
    6840             :         /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
    6841     2508464 :         ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)));
    6842     1254232 :         zval_dtor(free_op1.var);
    6843             : 
    6844             :         CHECK_EXCEPTION();
    6845     1254232 :         ZEND_VM_NEXT_OPCODE();
    6846             : }
    6847             : 
    6848           2 : static int ZEND_FASTCALL  ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6849             : {
    6850           2 :         USE_OPLINE
    6851             :         zend_free_op free_op1;
    6852             :         zval *obj;
    6853             :         zend_class_entry *ce;
    6854             :         zend_function *clone;
    6855             :         zend_object_clone_obj_t clone_call;
    6856             : 
    6857             :         SAVE_OPLINE();
    6858           4 :         obj = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6859             : 
    6860           2 :         if (IS_TMP_VAR == IS_CONST ||
    6861             :             UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
    6862           2 :                 zend_error_noreturn(E_ERROR, "__clone method called on non-object");
    6863             :         }
    6864             : 
    6865           0 :         ce = Z_OBJCE_P(obj);
    6866           0 :         clone = ce ? ce->clone : NULL;
    6867           0 :         clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
    6868           0 :         if (UNEXPECTED(clone_call == NULL)) {
    6869           0 :                 if (ce) {
    6870           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
    6871             :                 } else {
    6872           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
    6873             :                 }
    6874             :         }
    6875             : 
    6876           0 :         if (ce && clone) {
    6877           0 :                 if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
    6878             :                         /* Ensure that if we're calling a private function, we're allowed to do so.
    6879             :                          */
    6880           0 :                         if (UNEXPECTED(ce != EG(scope))) {
    6881           0 :                                 zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
    6882             :                         }
    6883           0 :                 } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
    6884             :                         /* Ensure that if we're calling a protected function, we're allowed to do so.
    6885             :                          */
    6886           0 :                         if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
    6887           0 :                                 zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
    6888             :                         }
    6889             :                 }
    6890             :         }
    6891             : 
    6892           0 :         if (EXPECTED(EG(exception) == NULL)) {
    6893             :                 zval *retval;
    6894             : 
    6895           0 :                 ALLOC_ZVAL(retval);
    6896           0 :                 Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
    6897           0 :                 Z_TYPE_P(retval) = IS_OBJECT;
    6898           0 :                 Z_SET_REFCOUNT_P(retval, 1);
    6899           0 :                 Z_SET_ISREF_P(retval);
    6900           0 :                 if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
    6901           0 :                         zval_ptr_dtor(&retval);
    6902             :                 } else {
    6903           0 :                         AI_SET_PTR(&EX_T(opline->result.var), retval);
    6904             :                 }
    6905             :         }
    6906             : 
    6907             :         CHECK_EXCEPTION();
    6908           0 :         ZEND_VM_NEXT_OPCODE();
    6909             : }
    6910             : 
    6911         182 : static int ZEND_FASTCALL  ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6912             : {
    6913         182 :         USE_OPLINE
    6914             :         zend_free_op free_op1;
    6915             :         zval *expr;
    6916         182 :         zval *result = &EX_T(opline->result.var).tmp_var;
    6917             : 
    6918             :         SAVE_OPLINE();
    6919         364 :         expr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6920             : 
    6921         182 :         if (opline->extended_value != IS_STRING) {
    6922         105 :                 ZVAL_COPY_VALUE(result, expr);
    6923         105 :                 if (!1) {
    6924             :                         zendi_zval_copy_ctor(*result);
    6925             :                 }
    6926             :         }
    6927         182 :         switch (opline->extended_value) {
    6928             :                 case IS_NULL:
    6929           0 :                         convert_to_null(result);
    6930           0 :                         break;
    6931             :                 case IS_BOOL:
    6932           3 :                         convert_to_boolean(result);
    6933           3 :                         break;
    6934             :                 case IS_LONG:
    6935          40 :                         convert_to_long(result);
    6936          40 :                         break;
    6937             :                 case IS_DOUBLE:
    6938           4 :                         convert_to_double(result);
    6939           4 :                         break;
    6940             :                 case IS_STRING: {
    6941             :                         zval var_copy;
    6942             :                         int use_copy;
    6943             : 
    6944          77 :                         zend_make_printable_zval(expr, &var_copy, &use_copy);
    6945          77 :                         if (use_copy) {
    6946          77 :                                 ZVAL_COPY_VALUE(result, &var_copy);
    6947             :                                 if (1) {
    6948          77 :                                         zval_dtor(free_op1.var);
    6949             :                                 }
    6950             :                         } else {
    6951           0 :                                 ZVAL_COPY_VALUE(result, expr);
    6952           0 :                                 if (!1) {
    6953             :                                         zendi_zval_copy_ctor(*result);
    6954             :                                 }
    6955             :                         }
    6956          77 :                         break;
    6957             :                 }
    6958             :                 case IS_ARRAY:
    6959           1 :                         convert_to_array(result);
    6960           1 :                         break;
    6961             :                 case IS_OBJECT:
    6962          57 :                         convert_to_object(result);
    6963             :                         break;
    6964             :         }
    6965             : 
    6966             :         CHECK_EXCEPTION();
    6967         182 :         ZEND_VM_NEXT_OPCODE();
    6968             : }
    6969             : 
    6970        3865 : static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6971             : {
    6972        3865 :         USE_OPLINE
    6973        3865 :         zend_op_array *new_op_array=NULL;
    6974             :         zend_free_op free_op1;
    6975             :         zval *inc_filename;
    6976        3865 :     zval *tmp_inc_filename = NULL;
    6977        3865 :         zend_bool failure_retval=0;
    6978             : 
    6979             :         SAVE_OPLINE();
    6980        7730 :         inc_filename = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    6981             : 
    6982        3865 :         if (inc_filename->type!=IS_STRING) {
    6983           0 :                 MAKE_STD_ZVAL(tmp_inc_filename);
    6984           0 :                 ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename);
    6985           0 :                 zval_copy_ctor(tmp_inc_filename);
    6986           0 :                 convert_to_string(tmp_inc_filename);
    6987           0 :                 inc_filename = tmp_inc_filename;
    6988             :         }
    6989             : 
    6990        3865 :         if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
    6991           0 :                 if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
    6992           0 :                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    6993             :                 } else {
    6994           0 :                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    6995             :                 }
    6996             :         } else {
    6997        3865 :                 switch (opline->extended_value) {
    6998             :                         case ZEND_INCLUDE_ONCE:
    6999             :                         case ZEND_REQUIRE_ONCE: {
    7000             :                                         zend_file_handle file_handle;
    7001             :                                         char *resolved_path;
    7002             : 
    7003        1968 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
    7004        1968 :                                         if (resolved_path) {
    7005        1968 :                                                 failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
    7006             :                                         } else {
    7007           0 :                                                 resolved_path = Z_STRVAL_P(inc_filename);
    7008             :                                         }
    7009             : 
    7010        1968 :                                         if (failure_retval) {
    7011             :                                                 /* do nothing, file already included */
    7012        1962 :                                         } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
    7013             : 
    7014        1962 :                                                 if (!file_handle.opened_path) {
    7015           0 :                                                         file_handle.opened_path = estrdup(resolved_path);
    7016             :                                                 }
    7017             : 
    7018        1962 :                                                 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
    7019        1962 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
    7020        1962 :                                                         zend_destroy_file_handle(&file_handle TSRMLS_CC);
    7021             :                                                 } else {
    7022           0 :                                                         zend_file_handle_dtor(&file_handle TSRMLS_CC);
    7023           0 :                                                         failure_retval=1;
    7024             :                                                 }
    7025             :                                         } else {
    7026           0 :                                                 if (opline->extended_value == ZEND_INCLUDE_ONCE) {
    7027           0 :                                                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    7028             :                                                 } else {
    7029           0 :                                                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    7030             :                                                 }
    7031             :                                         }
    7032        1968 :                                         if (resolved_path != Z_STRVAL_P(inc_filename)) {
    7033        1968 :                                                 efree(resolved_path);
    7034             :                                         }
    7035             :                                 }
    7036        1968 :                                 break;
    7037             :                         case ZEND_INCLUDE:
    7038             :                         case ZEND_REQUIRE:
    7039        1431 :                                 new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
    7040        1430 :                                 break;
    7041             :                         case ZEND_EVAL: {
    7042         466 :                                         char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
    7043             : 
    7044         466 :                                         new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
    7045         466 :                                         efree(eval_desc);
    7046             :                                 }
    7047             :                                 break;
    7048             :                         EMPTY_SWITCH_DEFAULT_CASE()
    7049             :                 }
    7050             :         }
    7051        3864 :         if (tmp_inc_filename) {
    7052           0 :                 zval_ptr_dtor(&tmp_inc_filename);
    7053             :         }
    7054        3864 :         zval_dtor(free_op1.var);
    7055        3864 :         if (UNEXPECTED(EG(exception) != NULL)) {
    7056           0 :                 HANDLE_EXCEPTION();
    7057        3864 :         } else if (EXPECTED(new_op_array != NULL)) {
    7058        3843 :                 EX(original_return_value) = EG(return_value_ptr_ptr);
    7059        3843 :                 EG(active_op_array) = new_op_array;
    7060        3843 :                 if (RETURN_VALUE_USED(opline)) {
    7061         392 :                         EX_T(opline->result.var).var.ptr = NULL;
    7062         392 :                         EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    7063         392 :                         EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
    7064             :                 } else {
    7065        3451 :                         EG(return_value_ptr_ptr) = NULL;
    7066             :                 }
    7067             : 
    7068        3843 :                 EX(current_object) = EX(object);
    7069             : 
    7070        3843 :                 EX(function_state).function = (zend_function *) new_op_array;
    7071        3843 :                 EX(object) = NULL;
    7072             : 
    7073        3843 :                 if (!EG(active_symbol_table)) {
    7074          57 :                         zend_rebuild_symbol_table(TSRMLS_C);
    7075             :                 }
    7076             : 
    7077        3843 :                 if (EXPECTED(zend_execute == execute)) {
    7078        3843 :                         ZEND_VM_ENTER();
    7079             :                 } else {
    7080           0 :                         zend_execute(new_op_array TSRMLS_CC);
    7081             :                 }
    7082             : 
    7083           0 :                 EX(function_state).function = (zend_function *) EX(op_array);
    7084           0 :                 EX(object) = EX(current_object);
    7085             : 
    7086           0 :                 EG(opline_ptr) = &EX(opline);
    7087           0 :                 EG(active_op_array) = EX(op_array);
    7088           0 :                 EG(return_value_ptr_ptr) = EX(original_return_value);
    7089           0 :                 destroy_op_array(new_op_array TSRMLS_CC);
    7090           0 :                 efree(new_op_array);
    7091           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7092           0 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
    7093           0 :                         HANDLE_EXCEPTION();
    7094           0 :                 } else if (RETURN_VALUE_USED(opline)) {
    7095           0 :                         if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
    7096             :                                 zval *retval;
    7097             : 
    7098           0 :                                 ALLOC_ZVAL(retval);
    7099           0 :                                 ZVAL_BOOL(retval, 1);
    7100           0 :                                 INIT_PZVAL(retval);
    7101           0 :                                 EX_T(opline->result.var).var.ptr = retval;
    7102             :                         }
    7103             :                 }
    7104             : 
    7105          21 :         } else if (RETURN_VALUE_USED(opline)) {
    7106             :                 zval *retval;
    7107             : 
    7108           0 :                 ALLOC_ZVAL(retval);
    7109           0 :                 ZVAL_BOOL(retval, failure_retval);
    7110           0 :                 INIT_PZVAL(retval);
    7111           0 :                 AI_SET_PTR(&EX_T(opline->result.var), retval);
    7112             :         }
    7113          21 :         ZEND_VM_NEXT_OPCODE();
    7114             : }
    7115             : 
    7116       20141 : static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7117             : {
    7118       20141 :         USE_OPLINE
    7119             :         zend_free_op free_op1;
    7120             :         zval *array_ptr, **array_ptr_ptr;
    7121             :         HashTable *fe_ht;
    7122       20141 :         zend_object_iterator *iter = NULL;
    7123       20141 :         zend_class_entry *ce = NULL;
    7124       20141 :         zend_bool is_empty = 0;
    7125             : 
    7126             :         SAVE_OPLINE();
    7127             : 
    7128       20141 :         if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
    7129             :             (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
    7130             :                 array_ptr_ptr = NULL;
    7131             :                 if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
    7132             :                         MAKE_STD_ZVAL(array_ptr);
    7133             :                         ZVAL_NULL(array_ptr);
    7134             :                 } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
    7135             :                         if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
    7136             :                                 zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
    7137             :                                 ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
    7138             :                         }
    7139             : 
    7140             :                         ce = Z_OBJCE_PP(array_ptr_ptr);
    7141             :                         if (!ce || ce->get_iterator == NULL) {
    7142             :                                 SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
    7143             :                                 Z_ADDREF_PP(array_ptr_ptr);
    7144             :                         }
    7145             :                         array_ptr = *array_ptr_ptr;
    7146             :                 } else {
    7147             :                         if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
    7148             :                                 SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
    7149             :                                 if (opline->extended_value & ZEND_FE_FETCH_BYREF) {
    7150             :                                         Z_SET_ISREF_PP(array_ptr_ptr);
    7151             :                                 }
    7152             :                         }
    7153             :                         array_ptr = *array_ptr_ptr;
    7154             :                         Z_ADDREF_P(array_ptr);
    7155             :                 }
    7156             :         } else {
    7157       40282 :                 array_ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7158             :                 if (1) { /* IS_TMP_VAR */
    7159             :                         zval *tmp;
    7160             : 
    7161       20141 :                         ALLOC_ZVAL(tmp);
    7162       20141 :                         INIT_PZVAL_COPY(tmp, array_ptr);
    7163       20141 :                         array_ptr = tmp;
    7164       20141 :                         if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    7165           1 :                                 ce = Z_OBJCE_P(array_ptr);
    7166           1 :                                 if (ce && ce->get_iterator) {
    7167           0 :                                         Z_DELREF_P(array_ptr);
    7168             :                                 }
    7169             :                         }
    7170             :                 } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    7171             :                         ce = Z_OBJCE_P(array_ptr);
    7172             :                         if (!ce || !ce->get_iterator) {
    7173             :                                 Z_ADDREF_P(array_ptr);
    7174             :                         }
    7175             :                 } else if (IS_TMP_VAR == IS_CONST ||
    7176             :                            ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
    7177             :                             !Z_ISREF_P(array_ptr) &&
    7178             :                             Z_REFCOUNT_P(array_ptr) > 1)) {
    7179             :                         zval *tmp;
    7180             : 
    7181             :                         ALLOC_ZVAL(tmp);
    7182             :                         INIT_PZVAL_COPY(tmp, array_ptr);
    7183             :                         zval_copy_ctor(tmp);
    7184             :                         array_ptr = tmp;
    7185             :                 } else {
    7186             :                         Z_ADDREF_P(array_ptr);
    7187             :                 }
    7188             :         }
    7189             : 
    7190       20141 :         if (ce && ce->get_iterator) {
    7191           0 :                 iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
    7192             : 
    7193           0 :                 if (iter && EXPECTED(EG(exception) == NULL)) {
    7194           0 :                         array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
    7195             :                 } else {
    7196             : 
    7197           0 :                         if (!EG(exception)) {
    7198           0 :                                 zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
    7199             :                         }
    7200           0 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
    7201           0 :                         HANDLE_EXCEPTION();
    7202             :                 }
    7203             :         }
    7204             : 
    7205       20141 :         EX_T(opline->result.var).fe.ptr = array_ptr;
    7206             : 
    7207       20141 :         if (iter) {
    7208           0 :                 iter->index = 0;
    7209           0 :                 if (iter->funcs->rewind) {
    7210           0 :                         iter->funcs->rewind(iter TSRMLS_CC);
    7211           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    7212           0 :                                 zval_ptr_dtor(&array_ptr);
    7213             : 
    7214           0 :                                 HANDLE_EXCEPTION();
    7215             :                         }
    7216             :                 }
    7217           0 :                 is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
    7218           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7219           0 :                         zval_ptr_dtor(&array_ptr);
    7220             : 
    7221           0 :                         HANDLE_EXCEPTION();
    7222             :                 }
    7223           0 :                 iter->index = -1; /* will be set to 0 before using next handler */
    7224       20141 :         } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
    7225       20141 :                 zend_hash_internal_pointer_reset(fe_ht);
    7226       20141 :                 if (ce) {
    7227           1 :                         zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC);
    7228           2 :                         while (zend_hash_has_more_elements(fe_ht) == SUCCESS) {
    7229             :                                 char *str_key;
    7230             :                                 uint str_key_len;
    7231             :                                 ulong int_key;
    7232             :                                 zend_uchar key_type;
    7233             : 
    7234           0 :                                 key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
    7235           0 :                                 if (key_type != HASH_KEY_NON_EXISTANT &&
    7236             :                                         (key_type == HASH_KEY_IS_LONG ||
    7237           0 :                                      zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
    7238             :                                         break;
    7239             :                                 }
    7240           0 :                                 zend_hash_move_forward(fe_ht);
    7241             :                         }
    7242             :                 }
    7243       20141 :                 is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
    7244       20141 :                 zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
    7245             :         } else {
    7246           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    7247           0 :                 is_empty = 1;
    7248             :         }
    7249             : 
    7250       20141 :         if (is_empty) {
    7251           1 :                 ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
    7252             :         } else {
    7253             :                 CHECK_EXCEPTION();
    7254       20140 :                 ZEND_VM_NEXT_OPCODE();
    7255             :         }
    7256             : }
    7257             : 
    7258          64 : static int ZEND_FASTCALL  ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7259             : {
    7260             : #if 0 || (IS_TMP_VAR != IS_UNUSED)
    7261          64 :         USE_OPLINE
    7262             : 
    7263             :         SAVE_OPLINE();
    7264             :         if (IS_TMP_VAR != IS_UNUSED) {
    7265             :                 zend_free_op free_op1;
    7266         128 :                 zval *ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7267             : 
    7268          64 :                 if (Z_TYPE_P(ptr) == IS_LONG) {
    7269           0 :                         EG(exit_status) = Z_LVAL_P(ptr);
    7270             :                 } else {
    7271          64 :                         zend_print_variable(ptr);
    7272             :                 }
    7273          64 :                 zval_dtor(free_op1.var);
    7274             :         }
    7275             : #endif
    7276          64 :         zend_bailout();
    7277           0 :         ZEND_VM_NEXT_OPCODE(); /* Never reached */
    7278             : }
    7279             : 
    7280     1427507 : static int ZEND_FASTCALL  ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7281             : {
    7282     1427507 :         USE_OPLINE
    7283             :         zval restored_error_reporting;
    7284             : 
    7285             :         SAVE_OPLINE();
    7286     1427507 :         if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.var).tmp_var) != 0) {
    7287     1184778 :                 Z_TYPE(restored_error_reporting) = IS_LONG;
    7288     1184778 :                 Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.var).tmp_var);
    7289     1184778 :                 EG(error_reporting) = Z_LVAL(restored_error_reporting);
    7290     1184778 :                 convert_to_string(&restored_error_reporting);
    7291     1184778 :                 if (EXPECTED(EG(error_reporting_ini_entry) != NULL)) {
    7292     1184778 :                         if (EXPECTED(EG(error_reporting_ini_entry)->modified &&
    7293             :                             EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value)) {
    7294     1184778 :                                 efree(EG(error_reporting_ini_entry)->value);
    7295             :                         }
    7296     1184778 :                         EG(error_reporting_ini_entry)->value = Z_STRVAL(restored_error_reporting);
    7297     1184778 :                         EG(error_reporting_ini_entry)->value_length = Z_STRLEN(restored_error_reporting);
    7298             :                 } else {
    7299             :                         zendi_zval_dtor(restored_error_reporting);
    7300             :                 }
    7301             :         }
    7302     1427507 :         if (EX(old_error_reporting) == &EX_T(opline->op1.var).tmp_var) {
    7303     1427504 :                 EX(old_error_reporting) = NULL;
    7304             :         }
    7305             :         CHECK_EXCEPTION();
    7306     1427507 :         ZEND_VM_NEXT_OPCODE();
    7307             : }
    7308             : 
    7309           0 : static int ZEND_FASTCALL  ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7310             : {
    7311           0 :         USE_OPLINE
    7312             :         zend_free_op free_op1;
    7313             :         zval *value;
    7314             : 
    7315             :         SAVE_OPLINE();
    7316           0 :         value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7317             : 
    7318           0 :         if (i_zend_is_true(value)) {
    7319           0 :                 ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
    7320           0 :                 if (!1) {
    7321             :                         zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
    7322             :                 }
    7323             : 
    7324             : #if DEBUG_ZEND>=2
    7325             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    7326             : #endif
    7327           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    7328             :         }
    7329             : 
    7330           0 :         zval_dtor(free_op1.var);
    7331             :         CHECK_EXCEPTION();
    7332           0 :         ZEND_VM_NEXT_OPCODE();
    7333             : }
    7334             : 
    7335           0 : static int ZEND_FASTCALL  ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7336             : {
    7337           0 :         USE_OPLINE
    7338             :         zend_free_op free_op1;
    7339             :         zval *value, *ret;
    7340             : 
    7341             :         SAVE_OPLINE();
    7342           0 :         value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7343             : 
    7344           0 :         if (i_zend_is_true(value)) {
    7345           0 :                 if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    7346             :                         Z_ADDREF_P(value);
    7347             :                         EX_T(opline->result.var).var.ptr = value;
    7348             :                         EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    7349             :                 } else {
    7350           0 :                         ALLOC_ZVAL(ret);
    7351           0 :                         INIT_PZVAL_COPY(ret, value);
    7352           0 :                         EX_T(opline->result.var).var.ptr = ret;
    7353           0 :                         EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    7354           0 :                         if (!1) {
    7355             :                                 zval_copy_ctor(EX_T(opline->result.var).var.ptr);
    7356             :                         }
    7357             :                 }
    7358             : 
    7359             : #if DEBUG_ZEND>=2
    7360             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    7361             : #endif
    7362           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    7363             :         }
    7364             : 
    7365           0 :         zval_dtor(free_op1.var);
    7366             :         CHECK_EXCEPTION();
    7367           0 :         ZEND_VM_NEXT_OPCODE();
    7368             : }
    7369             : 
    7370       26423 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7371             : {
    7372       26423 :         USE_OPLINE
    7373             :         zend_free_op free_op1;
    7374             :         zval *value;
    7375             : 
    7376             :         SAVE_OPLINE();
    7377       52846 :         value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7378             : 
    7379       26423 :         ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
    7380       26423 :         if (!1) {
    7381             :                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    7382             :         }
    7383             : 
    7384             :         CHECK_EXCEPTION();
    7385       26423 :         ZEND_VM_NEXT_OPCODE();
    7386             : }
    7387             : 
    7388          70 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7389             : {
    7390          70 :         USE_OPLINE
    7391             :         zend_free_op free_op1;
    7392             :         zval *value, *ret;
    7393             : 
    7394             :         SAVE_OPLINE();
    7395         140 :         value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7396             : 
    7397          70 :         if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    7398             :                 Z_ADDREF_P(value);
    7399             :                 EX_T(opline->result.var).var.ptr = value;
    7400             :                 EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    7401             :         } else {
    7402          70 :                 ALLOC_ZVAL(ret);
    7403          70 :                 INIT_PZVAL_COPY(ret, value);
    7404          70 :                 EX_T(opline->result.var).var.ptr = ret;
    7405          70 :                 EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    7406          70 :                 if (!1) {
    7407             :                         zval_copy_ctor(EX_T(opline->result.var).var.ptr);
    7408             :                 }
    7409             :         }
    7410             : 
    7411             :         CHECK_EXCEPTION();
    7412          70 :         ZEND_VM_NEXT_OPCODE();
    7413             : }
    7414             : 
    7415           5 : static int ZEND_FASTCALL  ZEND_INSTANCEOF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7416             : {
    7417           5 :         USE_OPLINE
    7418             :         zend_free_op free_op1;
    7419             :         zval *expr;
    7420             :         zend_bool result;
    7421             : 
    7422             :         SAVE_OPLINE();
    7423          10 :         expr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7424             : 
    7425          10 :         if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
    7426           5 :                 result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.var).class_entry TSRMLS_CC);
    7427             :         } else {
    7428           0 :                 result = 0;
    7429             :         }
    7430           5 :         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, result);
    7431           5 :         zval_dtor(free_op1.var);
    7432             :         CHECK_EXCEPTION();
    7433           5 :         ZEND_VM_NEXT_OPCODE();
    7434             : }
    7435             : 
    7436      158712 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7437             : {
    7438      158712 :         USE_OPLINE
    7439             :         zend_free_op free_op1;
    7440             : 
    7441             :         SAVE_OPLINE();
    7442      476136 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    7443      158712 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7444             :                 opline->op2.zv TSRMLS_CC);
    7445      158712 :         zval_dtor(free_op1.var);
    7446             : 
    7447             :         CHECK_EXCEPTION();
    7448      158712 :         ZEND_VM_NEXT_OPCODE();
    7449             : }
    7450             : 
    7451         405 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7452             : {
    7453         405 :         USE_OPLINE
    7454             :         zend_free_op free_op1;
    7455             : 
    7456             :         SAVE_OPLINE();
    7457        1215 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    7458         405 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7459             :                 opline->op2.zv TSRMLS_CC);
    7460         405 :         zval_dtor(free_op1.var);
    7461             : 
    7462             :         CHECK_EXCEPTION();
    7463         405 :         ZEND_VM_NEXT_OPCODE();
    7464             : }
    7465             : 
    7466      176375 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7467             : {
    7468      176375 :         USE_OPLINE
    7469             :         zend_free_op free_op1;
    7470             : 
    7471             :         SAVE_OPLINE();
    7472      529125 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    7473      176375 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7474             :                 opline->op2.zv TSRMLS_CC);
    7475      176375 :         zval_dtor(free_op1.var);
    7476             : 
    7477             :         CHECK_EXCEPTION();
    7478      176375 :         ZEND_VM_NEXT_OPCODE();
    7479             : }
    7480             : 
    7481          36 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7482             : {
    7483          36 :         USE_OPLINE
    7484             :         zend_free_op free_op1;
    7485             : 
    7486             :         SAVE_OPLINE();
    7487         108 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    7488          36 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7489             :                 opline->op2.zv TSRMLS_CC);
    7490          36 :         zval_dtor(free_op1.var);
    7491             : 
    7492             :         CHECK_EXCEPTION();
    7493          36 :         ZEND_VM_NEXT_OPCODE();
    7494             : }
    7495             : 
    7496           6 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7497             : {
    7498           6 :         USE_OPLINE
    7499             :         zend_free_op free_op1;
    7500             : 
    7501             :         SAVE_OPLINE();
    7502          18 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    7503           6 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7504             :                 opline->op2.zv TSRMLS_CC);
    7505           6 :         zval_dtor(free_op1.var);
    7506             : 
    7507             :         CHECK_EXCEPTION();
    7508           6 :         ZEND_VM_NEXT_OPCODE();
    7509             : }
    7510             : 
    7511          39 : static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7512             : {
    7513          39 :         USE_OPLINE
    7514             :         zend_free_op free_op1;
    7515             : 
    7516             :         SAVE_OPLINE();
    7517         117 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    7518          39 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7519             :                 opline->op2.zv TSRMLS_CC);
    7520          39 :         zval_dtor(free_op1.var);
    7521             : 
    7522             :         CHECK_EXCEPTION();
    7523          39 :         ZEND_VM_NEXT_OPCODE();
    7524             : }
    7525             : 
    7526           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7527             : {
    7528           0 :         USE_OPLINE
    7529             :         zend_free_op free_op1;
    7530             : 
    7531             :         SAVE_OPLINE();
    7532           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    7533           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7534             :                 opline->op2.zv TSRMLS_CC);
    7535           0 :         zval_dtor(free_op1.var);
    7536             : 
    7537             :         CHECK_EXCEPTION();
    7538           0 :         ZEND_VM_NEXT_OPCODE();
    7539             : }
    7540             : 
    7541      397806 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7542             : {
    7543      397806 :         USE_OPLINE
    7544             :         zend_free_op free_op1;
    7545             : 
    7546             :         SAVE_OPLINE();
    7547     1193418 :         concat_function(&EX_T(opline->result.var).tmp_var,
    7548      397806 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7549             :                 opline->op2.zv TSRMLS_CC);
    7550      397806 :         zval_dtor(free_op1.var);
    7551             : 
    7552             :         CHECK_EXCEPTION();
    7553      397806 :         ZEND_VM_NEXT_OPCODE();
    7554             : }
    7555             : 
    7556        2999 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7557             : {
    7558        2999 :         USE_OPLINE
    7559             :         zend_free_op free_op1;
    7560             : 
    7561             :         SAVE_OPLINE();
    7562        8997 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    7563        2999 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7564             :                 opline->op2.zv TSRMLS_CC);
    7565        2999 :         zval_dtor(free_op1.var);
    7566             : 
    7567             :         CHECK_EXCEPTION();
    7568        2999 :         ZEND_VM_NEXT_OPCODE();
    7569             : }
    7570             : 
    7571           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7572             : {
    7573           0 :         USE_OPLINE
    7574             :         zend_free_op free_op1;
    7575           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7576             : 
    7577             :         SAVE_OPLINE();
    7578           0 :         is_identical_function(result,
    7579           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7580             :                 opline->op2.zv TSRMLS_CC);
    7581           0 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    7582           0 :         zval_dtor(free_op1.var);
    7583             : 
    7584             :         CHECK_EXCEPTION();
    7585           0 :         ZEND_VM_NEXT_OPCODE();
    7586             : }
    7587             : 
    7588        1048 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7589             : {
    7590        1048 :         USE_OPLINE
    7591             :         zend_free_op free_op1;
    7592        1048 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7593             : 
    7594             :         SAVE_OPLINE();
    7595        2096 :         ZVAL_BOOL(result, fast_equal_function(result,
    7596             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7597             :                 opline->op2.zv TSRMLS_CC));
    7598        1048 :         zval_dtor(free_op1.var);
    7599             : 
    7600             :         CHECK_EXCEPTION();
    7601        1048 :         ZEND_VM_NEXT_OPCODE();
    7602             : }
    7603             : 
    7604       25668 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7605             : {
    7606       25668 :         USE_OPLINE
    7607             :         zend_free_op free_op1;
    7608       25668 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7609             : 
    7610             :         SAVE_OPLINE();
    7611       51336 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    7612             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7613             :                 opline->op2.zv TSRMLS_CC));
    7614       25668 :         zval_dtor(free_op1.var);
    7615             : 
    7616             :         CHECK_EXCEPTION();
    7617       25668 :         ZEND_VM_NEXT_OPCODE();
    7618             : }
    7619             : 
    7620      216856 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7621             : {
    7622      216856 :         USE_OPLINE
    7623             :         zend_free_op free_op1;
    7624      216856 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7625             : 
    7626             :         SAVE_OPLINE();
    7627      433712 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    7628             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7629             :                 opline->op2.zv TSRMLS_CC));
    7630      216856 :         zval_dtor(free_op1.var);
    7631             : 
    7632             :         CHECK_EXCEPTION();
    7633      216856 :         ZEND_VM_NEXT_OPCODE();
    7634             : }
    7635             : 
    7636           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7637             : {
    7638           0 :         USE_OPLINE
    7639             :         zend_free_op free_op1;
    7640           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7641             : 
    7642             :         SAVE_OPLINE();
    7643           0 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    7644             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7645             :                 opline->op2.zv TSRMLS_CC));
    7646           0 :         zval_dtor(free_op1.var);
    7647             : 
    7648             :         CHECK_EXCEPTION();
    7649           0 :         ZEND_VM_NEXT_OPCODE();
    7650             : }
    7651             : 
    7652          22 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7653             : {
    7654          22 :         USE_OPLINE
    7655             :         zend_free_op free_op1;
    7656             : 
    7657             :         SAVE_OPLINE();
    7658          66 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    7659          22 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7660             :                 opline->op2.zv TSRMLS_CC);
    7661          22 :         zval_dtor(free_op1.var);
    7662             : 
    7663             :         CHECK_EXCEPTION();
    7664          22 :         ZEND_VM_NEXT_OPCODE();
    7665             : }
    7666             : 
    7667      210839 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7668             : {
    7669      210839 :         USE_OPLINE
    7670             :         zend_free_op free_op1;
    7671             : 
    7672             :         SAVE_OPLINE();
    7673      632517 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    7674      210839 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7675             :                 opline->op2.zv TSRMLS_CC);
    7676      210839 :         zval_dtor(free_op1.var);
    7677             : 
    7678             :         CHECK_EXCEPTION();
    7679      210839 :         ZEND_VM_NEXT_OPCODE();
    7680             : }
    7681             : 
    7682           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7683             : {
    7684           0 :         USE_OPLINE
    7685             :         zend_free_op free_op1;
    7686             : 
    7687             :         SAVE_OPLINE();
    7688           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    7689           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7690             :                 opline->op2.zv TSRMLS_CC);
    7691           0 :         zval_dtor(free_op1.var);
    7692             : 
    7693             :         CHECK_EXCEPTION();
    7694           0 :         ZEND_VM_NEXT_OPCODE();
    7695             : }
    7696             : 
    7697           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7698             : {
    7699           0 :         USE_OPLINE
    7700             :         zend_free_op free_op1;
    7701             : 
    7702             :         SAVE_OPLINE();
    7703           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    7704           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    7705             :                 opline->op2.zv TSRMLS_CC);
    7706           0 :         zval_dtor(free_op1.var);
    7707             : 
    7708             :         CHECK_EXCEPTION();
    7709           0 :         ZEND_VM_NEXT_OPCODE();
    7710             : }
    7711             : 
    7712           0 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
    7713             : {
    7714           0 :         USE_OPLINE
    7715             :         zend_free_op free_op1;
    7716             :         zval *varname;
    7717             :         zval **retval;
    7718             :         zval tmp_varname;
    7719             :         HashTable *target_symbol_table;
    7720             :         ulong hash_value;
    7721             : 
    7722             :         SAVE_OPLINE();
    7723           0 :         varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7724             : 
    7725           0 :         if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
    7726           0 :                 ZVAL_COPY_VALUE(&tmp_varname, varname);
    7727             :                 zval_copy_ctor(&tmp_varname);
    7728             :                 Z_SET_REFCOUNT(tmp_varname, 1);
    7729             :                 Z_UNSET_ISREF(tmp_varname);
    7730           0 :                 convert_to_string(&tmp_varname);
    7731           0 :                 varname = &tmp_varname;
    7732             :         }
    7733             : 
    7734             :         if (IS_CONST != IS_UNUSED) {
    7735             :                 zend_class_entry *ce;
    7736             : 
    7737             :                 if (IS_CONST == IS_CONST) {
    7738           0 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    7739           0 :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    7740             :                         } else {
    7741           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);
    7742           0 :                                 if (UNEXPECTED(ce == NULL)) {
    7743           0 :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    7744             :                                                 zval_dtor(&tmp_varname);
    7745             :                                         }
    7746           0 :                                         zval_dtor(free_op1.var);
    7747             :                                         CHECK_EXCEPTION();
    7748           0 :                                         ZEND_VM_NEXT_OPCODE();
    7749             :                                 }
    7750           0 :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    7751             :                         }
    7752             :                 } else {
    7753             :                         ce = EX_T(opline->op2.var).class_entry;
    7754             :                 }
    7755           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);
    7756           0 :                 zval_dtor(free_op1.var);
    7757             :         } else {
    7758             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    7759             : /*
    7760             :                 if (!target_symbol_table) {
    7761             :                         CHECK_EXCEPTION();
    7762             :                         ZEND_VM_NEXT_OPCODE();
    7763             :                 }
    7764             : */
    7765             :                 if (IS_TMP_VAR == IS_CONST) {
    7766             :                         hash_value = Z_HASH_P(varname);
    7767             :                 } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
    7768             :                         hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
    7769             :                 } else {
    7770             :                         hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
    7771             :                 }
    7772             : 
    7773             :                 if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
    7774             :                         switch (type) {
    7775             :                                 case BP_VAR_R:
    7776             :                                 case BP_VAR_UNSET:
    7777             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    7778             :                                         /* break missing intentionally */
    7779             :                                 case BP_VAR_IS:
    7780             :                                         retval = &EG(uninitialized_zval_ptr);
    7781             :                                         break;
    7782             :                                 case BP_VAR_RW:
    7783             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    7784             :                                         /* break missing intentionally */
    7785             :                                 case BP_VAR_W:
    7786             :                                         Z_ADDREF_P(&EG(uninitialized_zval));
    7787             :                                         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);
    7788             :                                         break;
    7789             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    7790             :                         }
    7791             :                 }
    7792             :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    7793             :                         case ZEND_FETCH_GLOBAL:
    7794             :                                 if (IS_TMP_VAR != IS_TMP_VAR) {
    7795             :                                         zval_dtor(free_op1.var);
    7796             :                                 }
    7797             :                                 break;
    7798             :                         case ZEND_FETCH_LOCAL:
    7799             :                                 zval_dtor(free_op1.var);
    7800             :                                 break;
    7801             :                         case ZEND_FETCH_STATIC:
    7802             :                                 zval_update_constant(retval, (void*) 1 TSRMLS_CC);
    7803             :                                 break;
    7804             :                         case ZEND_FETCH_GLOBAL_LOCK:
    7805             :                                 if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
    7806             :                                         PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
    7807             :                                 }
    7808             :                                 break;
    7809             :                 }
    7810             :         }
    7811             : 
    7812             : 
    7813           0 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    7814             :                 zval_dtor(&tmp_varname);
    7815             :         }
    7816           0 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    7817           0 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    7818             :         }
    7819           0 :         PZVAL_LOCK(*retval);
    7820           0 :         switch (type) {
    7821             :                 case BP_VAR_R:
    7822             :                 case BP_VAR_IS:
    7823           0 :                         AI_SET_PTR(&EX_T(opline->result.var), *retval);
    7824           0 :                         break;
    7825             :                 case BP_VAR_UNSET: {
    7826             :                         zend_free_op free_res;
    7827             : 
    7828           0 :                         PZVAL_UNLOCK(*retval, &free_res);
    7829           0 :                         if (retval != &EG(uninitialized_zval_ptr)) {
    7830           0 :                                 SEPARATE_ZVAL_IF_NOT_REF(retval);
    7831             :                         }
    7832           0 :                         PZVAL_LOCK(*retval);
    7833           0 :                         FREE_OP_VAR_PTR(free_res);
    7834             :                 }
    7835             :                 /* break missing intentionally */
    7836             :                 default:
    7837           0 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    7838             :                         break;
    7839             :         }
    7840             :         CHECK_EXCEPTION();
    7841           0 :         ZEND_VM_NEXT_OPCODE();
    7842             : }
    7843             : 
    7844           0 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7845             : {
    7846           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7847             : }
    7848             : 
    7849           0 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7850             : {
    7851           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7852             : }
    7853             : 
    7854           0 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7855             : {
    7856           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7857             : }
    7858             : 
    7859           0 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7860             : {
    7861           0 :         USE_OPLINE
    7862             : 
    7863           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);
    7864             : }
    7865             : 
    7866           0 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7867             : {
    7868           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7869             : }
    7870             : 
    7871           0 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7872             : {
    7873           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7874             : }
    7875             : 
    7876          24 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7877             : {
    7878          24 :         USE_OPLINE
    7879             :         zend_free_op free_op1;
    7880             :         zval *container;
    7881             : 
    7882             :         SAVE_OPLINE();
    7883          48 :         container = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7884             : 
    7885          24 :         if (UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
    7886             :                 PZVAL_LOCK(&EG(uninitialized_zval));
    7887           3 :                 AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
    7888             :         } else {
    7889             : 
    7890          21 :                 zval *value = *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
    7891             : 
    7892             :                 PZVAL_LOCK(value);
    7893          21 :                 AI_SET_PTR(&EX_T(opline->result.var), value);
    7894             : 
    7895             :         }
    7896             :         CHECK_EXCEPTION();
    7897          24 :         ZEND_VM_NEXT_OPCODE();
    7898             : }
    7899             : 
    7900      974726 : static int ZEND_FASTCALL  ZEND_ADD_CHAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7901             : {
    7902      974726 :         USE_OPLINE
    7903      974726 :         zval *str = &EX_T(opline->result.var).tmp_var;
    7904             : 
    7905             :         SAVE_OPLINE();
    7906             : 
    7907      974726 :         if (IS_TMP_VAR == IS_UNUSED) {
    7908             :                 /* Initialize for erealloc in add_char_to_string */
    7909             :                 Z_STRVAL_P(str) = NULL;
    7910             :                 Z_STRLEN_P(str) = 0;
    7911             :                 Z_TYPE_P(str) = IS_STRING;
    7912             : 
    7913             :                 INIT_PZVAL(str);
    7914             :         }
    7915             : 
    7916      974726 :         add_char_to_string(str, str, opline->op2.zv);
    7917             : 
    7918             :         /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
    7919             :         /*CHECK_EXCEPTION();*/
    7920      974726 :         ZEND_VM_NEXT_OPCODE();
    7921             : }
    7922             : 
    7923      618242 : static int ZEND_FASTCALL  ZEND_ADD_STRING_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7924             : {
    7925      618242 :         USE_OPLINE
    7926      618242 :         zval *str = &EX_T(opline->result.var).tmp_var;
    7927             : 
    7928             :         SAVE_OPLINE();
    7929             : 
    7930      618242 :         if (IS_TMP_VAR == IS_UNUSED) {
    7931             :                 /* Initialize for erealloc in add_string_to_string */
    7932             :                 Z_STRVAL_P(str) = NULL;
    7933             :                 Z_STRLEN_P(str) = 0;
    7934             :                 Z_TYPE_P(str) = IS_STRING;
    7935             : 
    7936             :                 INIT_PZVAL(str);
    7937             :         }
    7938             : 
    7939      618242 :         add_string_to_string(str, str, opline->op2.zv);
    7940             : 
    7941             :         /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
    7942             :         /*CHECK_EXCEPTION();*/
    7943      618242 :         ZEND_VM_NEXT_OPCODE();
    7944             : }
    7945             : 
    7946           0 : static int ZEND_FASTCALL  ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7947             : {
    7948           0 :         USE_OPLINE
    7949             :         zval *function_name;
    7950             :         char *function_name_strval;
    7951             :         int function_name_strlen;
    7952             :         zend_free_op free_op1;
    7953             : 
    7954             :         SAVE_OPLINE();
    7955           0 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    7956             : 
    7957           0 :         function_name = opline->op2.zv;
    7958             : 
    7959           0 :         if (IS_CONST != IS_CONST &&
    7960             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    7961             :                 zend_error_noreturn(E_ERROR, "Method name must be a string");
    7962             :         }
    7963             : 
    7964           0 :         function_name_strval = Z_STRVAL_P(function_name);
    7965           0 :         function_name_strlen = Z_STRLEN_P(function_name);
    7966             : 
    7967           0 :         EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    7968             : 
    7969           0 :         if (EXPECTED(EX(object) != NULL) &&
    7970           0 :             EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
    7971           0 :                 EX(called_scope) = Z_OBJCE_P(EX(object));
    7972             : 
    7973           0 :                 if (IS_CONST != IS_CONST ||
    7974           0 :                     (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
    7975           0 :                     zval *object = EX(object);
    7976             : 
    7977           0 :                         if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
    7978           0 :                                 zend_error_noreturn(E_ERROR, "Object does not support method calls");
    7979             :                         }
    7980             : 
    7981             :                         /* First, locate the function. */
    7982           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);
    7983           0 :                         if (UNEXPECTED(EX(fbc) == NULL)) {
    7984           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
    7985             :                         }
    7986           0 :                         if (IS_CONST == IS_CONST &&
    7987           0 :                             EXPECTED(EX(fbc)->type <= ZEND_USER_FUNCTION) &&
    7988           0 :                             EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
    7989           0 :                             EXPECTED(EX(object) == object)) {
    7990           0 :                                 CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
    7991             :                         }
    7992             :                 }
    7993             :         } else {
    7994           0 :                 zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
    7995             :         }
    7996             : 
    7997           0 :         if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    7998           0 :                 EX(object) = NULL;
    7999             :         } else {
    8000           0 :                 if (!PZVAL_IS_REF(EX(object))) {
    8001           0 :                         Z_ADDREF_P(EX(object)); /* For $this pointer */
    8002             :                 } else {
    8003             :                         zval *this_ptr;
    8004           0 :                         ALLOC_ZVAL(this_ptr);
    8005           0 :                         INIT_PZVAL_COPY(this_ptr, EX(object));
    8006             :                         zval_copy_ctor(this_ptr);
    8007           0 :                         EX(object) = this_ptr;
    8008             :                 }
    8009             :         }
    8010             : 
    8011             : 
    8012             :         CHECK_EXCEPTION();
    8013           0 :         ZEND_VM_NEXT_OPCODE();
    8014             : }
    8015             : 
    8016           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8017             : {
    8018           0 :         USE_OPLINE
    8019             :         zend_free_op free_op1;
    8020             : 
    8021             :         SAVE_OPLINE();
    8022           0 :         if (IS_TMP_VAR==IS_VAR) {
    8023             :                 PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
    8024             :         }
    8025           0 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    8026           0 :                                  _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8027             :                                  opline->op2.zv TSRMLS_CC);
    8028             : 
    8029             :         CHECK_EXCEPTION();
    8030           0 :         ZEND_VM_NEXT_OPCODE();
    8031             : }
    8032             : 
    8033       63176 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8034             : {
    8035       63176 :         USE_OPLINE
    8036             :         zend_free_op free_op1;
    8037             :         zval *expr_ptr;
    8038             : 
    8039             :         SAVE_OPLINE();
    8040       63176 :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    8041             :                 zval **expr_ptr_ptr = NULL;
    8042             : 
    8043             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    8044             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    8045             :                 }
    8046             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    8047             :                 expr_ptr = *expr_ptr_ptr;
    8048             :                 Z_ADDREF_P(expr_ptr);
    8049             :         } else {
    8050      126352 :                 expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    8051             :                 if (1) { /* temporary variable */
    8052             :                         zval *new_expr;
    8053             : 
    8054       63176 :                         ALLOC_ZVAL(new_expr);
    8055       63176 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    8056       63176 :                         expr_ptr = new_expr;
    8057             :                 } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    8058             :                         zval *new_expr;
    8059             : 
    8060             :                         ALLOC_ZVAL(new_expr);
    8061             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    8062             :                         expr_ptr = new_expr;
    8063             :                         zendi_zval_copy_ctor(*expr_ptr);
    8064             :                 } else {
    8065             :                         Z_ADDREF_P(expr_ptr);
    8066             :                 }
    8067             :         }
    8068             : 
    8069             :         if (IS_CONST != IS_UNUSED) {
    8070             : 
    8071       63176 :                 zval *offset = opline->op2.zv;
    8072             :                 ulong hval;
    8073             : 
    8074       63176 :                 switch (Z_TYPE_P(offset)) {
    8075             :                         case IS_DOUBLE:
    8076           4 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    8077           2 :                                 goto num_index;
    8078             :                         case IS_LONG:
    8079             :                         case IS_BOOL:
    8080       61035 :                                 hval = Z_LVAL_P(offset);
    8081             : num_index:
    8082       61037 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    8083       61037 :                                 break;
    8084             :                         case IS_STRING:
    8085             :                                 if (IS_CONST == IS_CONST) {
    8086        2139 :                                         hval = Z_HASH_P(offset);
    8087             :                                 } else {
    8088             :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    8089             :                                         if (IS_INTERNED(Z_STRVAL_P(offset))) {
    8090             :                                                 hval = INTERNED_HASH(Z_STRVAL_P(offset));
    8091             :                                         } else {
    8092             :                                                 hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
    8093             :                                         }
    8094             :                                 }
    8095        2139 :                                 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);
    8096        2139 :                                 break;
    8097             :                         case IS_NULL:
    8098           0 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    8099           0 :                                 break;
    8100             :                         default:
    8101           0 :                                 zend_error(E_WARNING, "Illegal offset type");
    8102           0 :                                 zval_ptr_dtor(&expr_ptr);
    8103             :                                 /* do nothing */
    8104             :                                 break;
    8105             :                 }
    8106             : 
    8107             :         } else {
    8108             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    8109             :         }
    8110             :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    8111             : 
    8112             :         } else {
    8113             : 
    8114             :         }
    8115             :         CHECK_EXCEPTION();
    8116       63176 :         ZEND_VM_NEXT_OPCODE();
    8117             : }
    8118             : 
    8119       20962 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8120             : {
    8121       20962 :         USE_OPLINE
    8122             : 
    8123       20962 :         array_init(&EX_T(opline->result.var).tmp_var);
    8124       20962 :         if (IS_TMP_VAR == IS_UNUSED) {
    8125             :                 ZEND_VM_NEXT_OPCODE();
    8126             : #if 0 || IS_TMP_VAR != IS_UNUSED
    8127             :         } else {
    8128       20962 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    8129             : #endif
    8130             :         }
    8131             : }
    8132             : 
    8133           0 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8134             : {
    8135           0 :         USE_OPLINE
    8136             :         zval tmp, *varname;
    8137             :         HashTable *target_symbol_table;
    8138             :         zend_free_op free_op1;
    8139             : 
    8140             :         SAVE_OPLINE();
    8141           0 :         if (IS_TMP_VAR == IS_CV &&
    8142             :             IS_CONST == IS_UNUSED &&
    8143             :             (opline->extended_value & ZEND_QUICK_SET)) {
    8144             :                 if (EG(active_symbol_table)) {
    8145             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    8146             : 
    8147             :                         zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table),  cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
    8148             :                         EX_CV(opline->op1.var) = NULL;
    8149             :                 } else if (EX_CV(opline->op1.var)) {
    8150             :                         zval_ptr_dtor(EX_CV(opline->op1.var));
    8151             :                         EX_CV(opline->op1.var) = NULL;
    8152             :                 }
    8153             :                 CHECK_EXCEPTION();
    8154             :                 ZEND_VM_NEXT_OPCODE();
    8155             :         }
    8156             : 
    8157           0 :         varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    8158             : 
    8159           0 :         if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    8160           0 :                 ZVAL_COPY_VALUE(&tmp, varname);
    8161             :                 zval_copy_ctor(&tmp);
    8162           0 :                 convert_to_string(&tmp);
    8163           0 :                 varname = &tmp;
    8164           0 :         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    8165             :                 Z_ADDREF_P(varname);
    8166             :         }
    8167             : 
    8168             :         if (IS_CONST != IS_UNUSED) {
    8169             :                 zend_class_entry *ce;
    8170             : 
    8171             :                 if (IS_CONST == IS_CONST) {
    8172           0 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    8173           0 :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    8174             :                         } else {
    8175           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);
    8176           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    8177           0 :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    8178             :                                                 zval_dtor(&tmp);
    8179           0 :                                         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    8180             :                                                 zval_ptr_dtor(&varname);
    8181             :                                         }
    8182           0 :                                         zval_dtor(free_op1.var);
    8183           0 :                                         HANDLE_EXCEPTION();
    8184             :                                 }
    8185           0 :                                 if (UNEXPECTED(ce == NULL)) {
    8186           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    8187             :                                 }
    8188           0 :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    8189             :                         }
    8190             :                 } else {
    8191             :                         ce = EX_T(opline->op2.var).class_entry;
    8192             :                 }
    8193           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);
    8194             :         } else {
    8195             :                 ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
    8196             : 
    8197             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    8198             :                 zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
    8199             :         }
    8200             : 
    8201           0 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    8202             :                 zval_dtor(&tmp);
    8203           0 :         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    8204             :                 zval_ptr_dtor(&varname);
    8205             :         }
    8206           0 :         zval_dtor(free_op1.var);
    8207             :         CHECK_EXCEPTION();
    8208           0 :         ZEND_VM_NEXT_OPCODE();
    8209             : }
    8210             : 
    8211           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8212             : {
    8213           0 :         USE_OPLINE
    8214             :         zval **value;
    8215           0 :         zend_bool isset = 1;
    8216             : 
    8217             :         SAVE_OPLINE();
    8218           0 :         if (IS_TMP_VAR == IS_CV &&
    8219             :             IS_CONST == IS_UNUSED &&
    8220             :             (opline->extended_value & ZEND_QUICK_SET)) {
    8221             :                 if (EX_CV(opline->op1.var)) {
    8222             :                         value = EX_CV(opline->op1.var);
    8223             :                 } else if (EG(active_symbol_table)) {
    8224             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    8225             : 
    8226             :                         if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
    8227             :                                 isset = 0;
    8228             :                         }
    8229             :                 } else {
    8230             :                         isset = 0;
    8231             :                 }
    8232             :         } else {
    8233             :                 HashTable *target_symbol_table;
    8234             :                 zend_free_op free_op1;
    8235           0 :                 zval tmp, *varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    8236             : 
    8237           0 :                 if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    8238           0 :                         ZVAL_COPY_VALUE(&tmp, varname);
    8239             :                         zval_copy_ctor(&tmp);
    8240           0 :                         convert_to_string(&tmp);
    8241           0 :                         varname = &tmp;
    8242             :                 }
    8243             : 
    8244             :                 if (IS_CONST != IS_UNUSED) {
    8245             :                         zend_class_entry *ce;
    8246             : 
    8247             :                         if (IS_CONST == IS_CONST) {
    8248           0 :                                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    8249           0 :                                         ce = CACHED_PTR(opline->op2.literal->cache_slot);
    8250             :                                 } else {
    8251           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);
    8252           0 :                                         if (UNEXPECTED(ce == NULL)) {
    8253             :                                                 CHECK_EXCEPTION();
    8254           0 :                                                 ZEND_VM_NEXT_OPCODE();
    8255             :                                         }
    8256           0 :                                         CACHE_PTR(opline->op2.literal->cache_slot, ce);
    8257             :                                 }
    8258             :                         } else {
    8259             :                                 ce = EX_T(opline->op2.var).class_entry;
    8260             :                         }
    8261           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);
    8262           0 :                         if (!value) {
    8263           0 :                                 isset = 0;
    8264             :                         }
    8265             :                 } else {
    8266             :                         target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    8267             :                         if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
    8268             :                                 isset = 0;
    8269             :                         }
    8270             :                 }
    8271             : 
    8272           0 :                 if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    8273             :                         zval_dtor(&tmp);
    8274             :                 }
    8275           0 :                 zval_dtor(free_op1.var);
    8276             :         }
    8277             : 
    8278           0 :         if (opline->extended_value & ZEND_ISSET) {
    8279           0 :                 if (isset && Z_TYPE_PP(value) != IS_NULL) {
    8280           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    8281             :                 } else {
    8282           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    8283             :                 }
    8284             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    8285           0 :                 if (!isset || !i_zend_is_true(*value)) {
    8286           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    8287             :                 } else {
    8288           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    8289             :                 }
    8290             :         }
    8291             : 
    8292             :         CHECK_EXCEPTION();
    8293           0 :         ZEND_VM_NEXT_OPCODE();
    8294             : }
    8295             : 
    8296        3290 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8297             : {
    8298        3290 :         USE_OPLINE
    8299             :         zend_free_op free_op1, free_op2;
    8300             : 
    8301             :         SAVE_OPLINE();
    8302        9870 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    8303        3290 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8304        3290 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8305        3290 :         zval_dtor(free_op1.var);
    8306        3290 :         zval_dtor(free_op2.var);
    8307             :         CHECK_EXCEPTION();
    8308        3290 :         ZEND_VM_NEXT_OPCODE();
    8309             : }
    8310             : 
    8311         137 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8312             : {
    8313         137 :         USE_OPLINE
    8314             :         zend_free_op free_op1, free_op2;
    8315             : 
    8316             :         SAVE_OPLINE();
    8317         411 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    8318         137 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8319         137 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8320         137 :         zval_dtor(free_op1.var);
    8321         137 :         zval_dtor(free_op2.var);
    8322             :         CHECK_EXCEPTION();
    8323         137 :         ZEND_VM_NEXT_OPCODE();
    8324             : }
    8325             : 
    8326           8 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8327             : {
    8328           8 :         USE_OPLINE
    8329             :         zend_free_op free_op1, free_op2;
    8330             : 
    8331             :         SAVE_OPLINE();
    8332          24 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    8333           8 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8334           8 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8335           8 :         zval_dtor(free_op1.var);
    8336           8 :         zval_dtor(free_op2.var);
    8337             :         CHECK_EXCEPTION();
    8338           8 :         ZEND_VM_NEXT_OPCODE();
    8339             : }
    8340             : 
    8341          10 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8342             : {
    8343          10 :         USE_OPLINE
    8344             :         zend_free_op free_op1, free_op2;
    8345             : 
    8346             :         SAVE_OPLINE();
    8347          30 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    8348          10 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8349          10 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8350          10 :         zval_dtor(free_op1.var);
    8351          10 :         zval_dtor(free_op2.var);
    8352             :         CHECK_EXCEPTION();
    8353          10 :         ZEND_VM_NEXT_OPCODE();
    8354             : }
    8355             : 
    8356           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8357             : {
    8358           0 :         USE_OPLINE
    8359             :         zend_free_op free_op1, free_op2;
    8360             : 
    8361             :         SAVE_OPLINE();
    8362           0 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    8363           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8364           0 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8365           0 :         zval_dtor(free_op1.var);
    8366           0 :         zval_dtor(free_op2.var);
    8367             :         CHECK_EXCEPTION();
    8368           0 :         ZEND_VM_NEXT_OPCODE();
    8369             : }
    8370             : 
    8371           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8372             : {
    8373           0 :         USE_OPLINE
    8374             :         zend_free_op free_op1, free_op2;
    8375             : 
    8376             :         SAVE_OPLINE();
    8377           0 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    8378           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8379           0 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8380           0 :         zval_dtor(free_op1.var);
    8381           0 :         zval_dtor(free_op2.var);
    8382             :         CHECK_EXCEPTION();
    8383           0 :         ZEND_VM_NEXT_OPCODE();
    8384             : }
    8385             : 
    8386           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8387             : {
    8388           0 :         USE_OPLINE
    8389             :         zend_free_op free_op1, free_op2;
    8390             : 
    8391             :         SAVE_OPLINE();
    8392           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    8393           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8394           0 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8395           0 :         zval_dtor(free_op1.var);
    8396           0 :         zval_dtor(free_op2.var);
    8397             :         CHECK_EXCEPTION();
    8398           0 :         ZEND_VM_NEXT_OPCODE();
    8399             : }
    8400             : 
    8401      133795 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8402             : {
    8403      133795 :         USE_OPLINE
    8404             :         zend_free_op free_op1, free_op2;
    8405             : 
    8406             :         SAVE_OPLINE();
    8407      401385 :         concat_function(&EX_T(opline->result.var).tmp_var,
    8408      133795 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8409      133795 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8410      133795 :         zval_dtor(free_op1.var);
    8411      133795 :         zval_dtor(free_op2.var);
    8412             :         CHECK_EXCEPTION();
    8413      133795 :         ZEND_VM_NEXT_OPCODE();
    8414             : }
    8415             : 
    8416           5 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8417             : {
    8418           5 :         USE_OPLINE
    8419             :         zend_free_op free_op1, free_op2;
    8420             : 
    8421             :         SAVE_OPLINE();
    8422          15 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    8423           5 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8424           5 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8425           5 :         zval_dtor(free_op1.var);
    8426           5 :         zval_dtor(free_op2.var);
    8427             :         CHECK_EXCEPTION();
    8428           5 :         ZEND_VM_NEXT_OPCODE();
    8429             : }
    8430             : 
    8431           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8432             : {
    8433           0 :         USE_OPLINE
    8434             :         zend_free_op free_op1, free_op2;
    8435           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8436             : 
    8437             :         SAVE_OPLINE();
    8438           0 :         is_identical_function(result,
    8439           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8440           0 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8441           0 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    8442           0 :         zval_dtor(free_op1.var);
    8443           0 :         zval_dtor(free_op2.var);
    8444             :         CHECK_EXCEPTION();
    8445           0 :         ZEND_VM_NEXT_OPCODE();
    8446             : }
    8447             : 
    8448        4923 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8449             : {
    8450        4923 :         USE_OPLINE
    8451             :         zend_free_op free_op1, free_op2;
    8452        4923 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8453             : 
    8454             :         SAVE_OPLINE();
    8455       14769 :         ZVAL_BOOL(result, fast_equal_function(result,
    8456             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8457             :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    8458        4923 :         zval_dtor(free_op1.var);
    8459        4923 :         zval_dtor(free_op2.var);
    8460             :         CHECK_EXCEPTION();
    8461        4923 :         ZEND_VM_NEXT_OPCODE();
    8462             : }
    8463             : 
    8464           8 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8465             : {
    8466           8 :         USE_OPLINE
    8467             :         zend_free_op free_op1, free_op2;
    8468           8 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8469             : 
    8470             :         SAVE_OPLINE();
    8471          24 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    8472             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8473             :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    8474           8 :         zval_dtor(free_op1.var);
    8475           8 :         zval_dtor(free_op2.var);
    8476             :         CHECK_EXCEPTION();
    8477           8 :         ZEND_VM_NEXT_OPCODE();
    8478             : }
    8479             : 
    8480           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8481             : {
    8482           0 :         USE_OPLINE
    8483             :         zend_free_op free_op1, free_op2;
    8484           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8485             : 
    8486             :         SAVE_OPLINE();
    8487           0 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    8488             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8489             :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    8490           0 :         zval_dtor(free_op1.var);
    8491           0 :         zval_dtor(free_op2.var);
    8492             :         CHECK_EXCEPTION();
    8493           0 :         ZEND_VM_NEXT_OPCODE();
    8494             : }
    8495             : 
    8496           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8497             : {
    8498           0 :         USE_OPLINE
    8499             :         zend_free_op free_op1, free_op2;
    8500           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8501             : 
    8502             :         SAVE_OPLINE();
    8503           0 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    8504             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8505             :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    8506           0 :         zval_dtor(free_op1.var);
    8507           0 :         zval_dtor(free_op2.var);
    8508             :         CHECK_EXCEPTION();
    8509           0 :         ZEND_VM_NEXT_OPCODE();
    8510             : }
    8511             : 
    8512         213 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8513             : {
    8514         213 :         USE_OPLINE
    8515             :         zend_free_op free_op1, free_op2;
    8516             : 
    8517             :         SAVE_OPLINE();
    8518         639 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    8519         213 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8520         213 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8521         213 :         zval_dtor(free_op1.var);
    8522         213 :         zval_dtor(free_op2.var);
    8523             :         CHECK_EXCEPTION();
    8524         213 :         ZEND_VM_NEXT_OPCODE();
    8525             : }
    8526             : 
    8527           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8528             : {
    8529           1 :         USE_OPLINE
    8530             :         zend_free_op free_op1, free_op2;
    8531             : 
    8532             :         SAVE_OPLINE();
    8533           3 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    8534           1 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8535           1 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8536           1 :         zval_dtor(free_op1.var);
    8537           1 :         zval_dtor(free_op2.var);
    8538             :         CHECK_EXCEPTION();
    8539           1 :         ZEND_VM_NEXT_OPCODE();
    8540             : }
    8541             : 
    8542           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8543             : {
    8544           0 :         USE_OPLINE
    8545             :         zend_free_op free_op1, free_op2;
    8546             : 
    8547             :         SAVE_OPLINE();
    8548           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    8549           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8550           0 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8551           0 :         zval_dtor(free_op1.var);
    8552           0 :         zval_dtor(free_op2.var);
    8553             :         CHECK_EXCEPTION();
    8554           0 :         ZEND_VM_NEXT_OPCODE();
    8555             : }
    8556             : 
    8557           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8558             : {
    8559           0 :         USE_OPLINE
    8560             :         zend_free_op free_op1, free_op2;
    8561             : 
    8562             :         SAVE_OPLINE();
    8563           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    8564           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8565           0 :                 _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8566           0 :         zval_dtor(free_op1.var);
    8567           0 :         zval_dtor(free_op2.var);
    8568             :         CHECK_EXCEPTION();
    8569           0 :         ZEND_VM_NEXT_OPCODE();
    8570             : }
    8571             : 
    8572           0 : static int ZEND_FASTCALL  ZEND_ADD_VAR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8573             : {
    8574           0 :         USE_OPLINE
    8575             :         zend_free_op free_op2;
    8576           0 :         zval *str = &EX_T(opline->result.var).tmp_var;
    8577             :         zval *var;
    8578             :         zval var_copy;
    8579           0 :         int use_copy = 0;
    8580             : 
    8581             :         SAVE_OPLINE();
    8582           0 :         var = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
    8583             : 
    8584           0 :         if (IS_TMP_VAR == IS_UNUSED) {
    8585             :                 /* Initialize for erealloc in add_string_to_string */
    8586             :                 Z_STRVAL_P(str) = NULL;
    8587             :                 Z_STRLEN_P(str) = 0;
    8588             :                 Z_TYPE_P(str) = IS_STRING;
    8589             : 
    8590             :                 INIT_PZVAL(str);
    8591             :         }
    8592             : 
    8593           0 :         if (Z_TYPE_P(var) != IS_STRING) {
    8594           0 :                 zend_make_printable_zval(var, &var_copy, &use_copy);
    8595             : 
    8596           0 :                 if (use_copy) {
    8597           0 :                         var = &var_copy;
    8598             :                 }
    8599             :         }
    8600           0 :         add_string_to_string(str, str, var);
    8601             : 
    8602           0 :         if (use_copy) {
    8603             :                 zval_dtor(var);
    8604             :         }
    8605             :         /* original comment, possibly problematic:
    8606             :          * FREE_OP is missing intentionally here - we're always working on the same temporary variable
    8607             :          * (Zeev):  I don't think it's problematic, we only use variables
    8608             :          * which aren't affected by FREE_OP(Ts, )'s anyway, unless they're
    8609             :          * string offsets or overloaded objects
    8610             :          */
    8611           0 :         zval_dtor(free_op2.var);
    8612             : 
    8613             :         CHECK_EXCEPTION();
    8614           0 :         ZEND_VM_NEXT_OPCODE();
    8615             : }
    8616             : 
    8617           0 : static int ZEND_FASTCALL  ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8618             : {
    8619           0 :         USE_OPLINE
    8620             :         zval *function_name;
    8621             :         char *function_name_strval;
    8622             :         int function_name_strlen;
    8623             :         zend_free_op free_op1, free_op2;
    8624             : 
    8625             :         SAVE_OPLINE();
    8626           0 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    8627             : 
    8628           0 :         function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
    8629             : 
    8630           0 :         if (IS_TMP_VAR != IS_CONST &&
    8631             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    8632           0 :                 zend_error_noreturn(E_ERROR, "Method name must be a string");
    8633             :         }
    8634             : 
    8635           0 :         function_name_strval = Z_STRVAL_P(function_name);
    8636           0 :         function_name_strlen = Z_STRLEN_P(function_name);
    8637             : 
    8638           0 :         EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    8639             : 
    8640           0 :         if (EXPECTED(EX(object) != NULL) &&
    8641           0 :             EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
    8642           0 :                 EX(called_scope) = Z_OBJCE_P(EX(object));
    8643             : 
    8644             :                 if (IS_TMP_VAR != IS_CONST ||
    8645             :                     (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
    8646           0 :                     zval *object = EX(object);
    8647             : 
    8648           0 :                         if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
    8649           0 :                                 zend_error_noreturn(E_ERROR, "Object does not support method calls");
    8650             :                         }
    8651             : 
    8652             :                         /* First, locate the function. */
    8653           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);
    8654           0 :                         if (UNEXPECTED(EX(fbc) == NULL)) {
    8655           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
    8656             :                         }
    8657           0 :                         if (IS_TMP_VAR == IS_CONST &&
    8658             :                             EXPECTED(EX(fbc)->type <= ZEND_USER_FUNCTION) &&
    8659             :                             EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
    8660             :                             EXPECTED(EX(object) == object)) {
    8661             :                                 CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
    8662             :                         }
    8663             :                 }
    8664             :         } else {
    8665           0 :                 zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
    8666             :         }
    8667             : 
    8668           0 :         if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    8669           0 :                 EX(object) = NULL;
    8670             :         } else {
    8671           0 :                 if (!PZVAL_IS_REF(EX(object))) {
    8672           0 :                         Z_ADDREF_P(EX(object)); /* For $this pointer */
    8673             :                 } else {
    8674             :                         zval *this_ptr;
    8675           0 :                         ALLOC_ZVAL(this_ptr);
    8676           0 :                         INIT_PZVAL_COPY(this_ptr, EX(object));
    8677             :                         zval_copy_ctor(this_ptr);
    8678           0 :                         EX(object) = this_ptr;
    8679             :                 }
    8680             :         }
    8681             : 
    8682           0 :         zval_dtor(free_op2.var);
    8683             : 
    8684             :         CHECK_EXCEPTION();
    8685           0 :         ZEND_VM_NEXT_OPCODE();
    8686             : }
    8687             : 
    8688         124 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8689             : {
    8690         124 :         USE_OPLINE
    8691             :         zend_free_op free_op1, free_op2;
    8692             : 
    8693             :         SAVE_OPLINE();
    8694         124 :         if (IS_TMP_VAR==IS_VAR) {
    8695             :                 PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
    8696             :         }
    8697         372 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    8698         124 :                                  _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8699         124 :                                  _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8700             : 
    8701         124 :         zval_dtor(free_op2.var);
    8702             :         CHECK_EXCEPTION();
    8703         124 :         ZEND_VM_NEXT_OPCODE();
    8704             : }
    8705             : 
    8706          61 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8707             : {
    8708          61 :         USE_OPLINE
    8709             :         zend_free_op free_op1;
    8710             :         zval *expr_ptr;
    8711             : 
    8712             :         SAVE_OPLINE();
    8713          61 :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    8714             :                 zval **expr_ptr_ptr = NULL;
    8715             : 
    8716             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    8717             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    8718             :                 }
    8719             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    8720             :                 expr_ptr = *expr_ptr_ptr;
    8721             :                 Z_ADDREF_P(expr_ptr);
    8722             :         } else {
    8723         122 :                 expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    8724             :                 if (1) { /* temporary variable */
    8725             :                         zval *new_expr;
    8726             : 
    8727          61 :                         ALLOC_ZVAL(new_expr);
    8728          61 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    8729          61 :                         expr_ptr = new_expr;
    8730             :                 } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    8731             :                         zval *new_expr;
    8732             : 
    8733             :                         ALLOC_ZVAL(new_expr);
    8734             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    8735             :                         expr_ptr = new_expr;
    8736             :                         zendi_zval_copy_ctor(*expr_ptr);
    8737             :                 } else {
    8738             :                         Z_ADDREF_P(expr_ptr);
    8739             :                 }
    8740             :         }
    8741             : 
    8742             :         if (IS_TMP_VAR != IS_UNUSED) {
    8743             :                 zend_free_op free_op2;
    8744         122 :                 zval *offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
    8745             :                 ulong hval;
    8746             : 
    8747          61 :                 switch (Z_TYPE_P(offset)) {
    8748             :                         case IS_DOUBLE:
    8749           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    8750           0 :                                 goto num_index;
    8751             :                         case IS_LONG:
    8752             :                         case IS_BOOL:
    8753          50 :                                 hval = Z_LVAL_P(offset);
    8754             : num_index:
    8755          50 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    8756          50 :                                 break;
    8757             :                         case IS_STRING:
    8758          10 :                                 if (IS_TMP_VAR == IS_CONST) {
    8759             :                                         hval = Z_HASH_P(offset);
    8760             :                                 } else {
    8761          10 :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    8762          11 :                                         if (IS_INTERNED(Z_STRVAL_P(offset))) {
    8763           1 :                                                 hval = INTERNED_HASH(Z_STRVAL_P(offset));
    8764             :                                         } else {
    8765           9 :                                                 hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
    8766             :                                         }
    8767             :                                 }
    8768          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);
    8769          10 :                                 break;
    8770             :                         case IS_NULL:
    8771           0 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    8772           0 :                                 break;
    8773             :                         default:
    8774           1 :                                 zend_error(E_WARNING, "Illegal offset type");
    8775           1 :                                 zval_ptr_dtor(&expr_ptr);
    8776             :                                 /* do nothing */
    8777             :                                 break;
    8778             :                 }
    8779          61 :                 zval_dtor(free_op2.var);
    8780             :         } else {
    8781             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    8782             :         }
    8783             :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    8784             : 
    8785             :         } else {
    8786             : 
    8787             :         }
    8788             :         CHECK_EXCEPTION();
    8789          61 :         ZEND_VM_NEXT_OPCODE();
    8790             : }
    8791             : 
    8792          51 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8793             : {
    8794          51 :         USE_OPLINE
    8795             : 
    8796          51 :         array_init(&EX_T(opline->result.var).tmp_var);
    8797          51 :         if (IS_TMP_VAR == IS_UNUSED) {
    8798             :                 ZEND_VM_NEXT_OPCODE();
    8799             : #if 0 || IS_TMP_VAR != IS_UNUSED
    8800             :         } else {
    8801          51 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    8802             : #endif
    8803             :         }
    8804             : }
    8805             : 
    8806       27131 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8807             : {
    8808       27131 :         USE_OPLINE
    8809             :         zend_free_op free_op1, free_op2;
    8810             : 
    8811             :         SAVE_OPLINE();
    8812       81393 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    8813       27131 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8814       27131 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8815       27131 :         zval_dtor(free_op1.var);
    8816       27131 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8817             :         CHECK_EXCEPTION();
    8818       27131 :         ZEND_VM_NEXT_OPCODE();
    8819             : }
    8820             : 
    8821           1 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8822             : {
    8823           1 :         USE_OPLINE
    8824             :         zend_free_op free_op1, free_op2;
    8825             : 
    8826             :         SAVE_OPLINE();
    8827           3 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    8828           1 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8829           1 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8830           1 :         zval_dtor(free_op1.var);
    8831           1 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8832             :         CHECK_EXCEPTION();
    8833           1 :         ZEND_VM_NEXT_OPCODE();
    8834             : }
    8835             : 
    8836           0 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8837             : {
    8838           0 :         USE_OPLINE
    8839             :         zend_free_op free_op1, free_op2;
    8840             : 
    8841             :         SAVE_OPLINE();
    8842           0 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    8843           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8844           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8845           0 :         zval_dtor(free_op1.var);
    8846           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8847             :         CHECK_EXCEPTION();
    8848           0 :         ZEND_VM_NEXT_OPCODE();
    8849             : }
    8850             : 
    8851           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8852             : {
    8853           0 :         USE_OPLINE
    8854             :         zend_free_op free_op1, free_op2;
    8855             : 
    8856             :         SAVE_OPLINE();
    8857           0 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    8858           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8859           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8860           0 :         zval_dtor(free_op1.var);
    8861           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8862             :         CHECK_EXCEPTION();
    8863           0 :         ZEND_VM_NEXT_OPCODE();
    8864             : }
    8865             : 
    8866           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8867             : {
    8868           0 :         USE_OPLINE
    8869             :         zend_free_op free_op1, free_op2;
    8870             : 
    8871             :         SAVE_OPLINE();
    8872           0 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    8873           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8874           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8875           0 :         zval_dtor(free_op1.var);
    8876           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8877             :         CHECK_EXCEPTION();
    8878           0 :         ZEND_VM_NEXT_OPCODE();
    8879             : }
    8880             : 
    8881           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8882             : {
    8883           0 :         USE_OPLINE
    8884             :         zend_free_op free_op1, free_op2;
    8885             : 
    8886             :         SAVE_OPLINE();
    8887           0 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    8888           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8889           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8890           0 :         zval_dtor(free_op1.var);
    8891           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8892             :         CHECK_EXCEPTION();
    8893           0 :         ZEND_VM_NEXT_OPCODE();
    8894             : }
    8895             : 
    8896           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8897             : {
    8898           0 :         USE_OPLINE
    8899             :         zend_free_op free_op1, free_op2;
    8900             : 
    8901             :         SAVE_OPLINE();
    8902           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    8903           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8904           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8905           0 :         zval_dtor(free_op1.var);
    8906           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8907             :         CHECK_EXCEPTION();
    8908           0 :         ZEND_VM_NEXT_OPCODE();
    8909             : }
    8910             : 
    8911       23190 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8912             : {
    8913       23190 :         USE_OPLINE
    8914             :         zend_free_op free_op1, free_op2;
    8915             : 
    8916             :         SAVE_OPLINE();
    8917       69570 :         concat_function(&EX_T(opline->result.var).tmp_var,
    8918       23190 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8919       23190 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8920       23190 :         zval_dtor(free_op1.var);
    8921       23190 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8922             :         CHECK_EXCEPTION();
    8923       23190 :         ZEND_VM_NEXT_OPCODE();
    8924             : }
    8925             : 
    8926       20009 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8927             : {
    8928       20009 :         USE_OPLINE
    8929             :         zend_free_op free_op1, free_op2;
    8930             : 
    8931             :         SAVE_OPLINE();
    8932       60027 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    8933       20009 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8934       20009 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8935       20009 :         zval_dtor(free_op1.var);
    8936       20009 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8937             :         CHECK_EXCEPTION();
    8938       20009 :         ZEND_VM_NEXT_OPCODE();
    8939             : }
    8940             : 
    8941           1 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8942             : {
    8943           1 :         USE_OPLINE
    8944             :         zend_free_op free_op1, free_op2;
    8945           1 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8946             : 
    8947             :         SAVE_OPLINE();
    8948           3 :         is_identical_function(result,
    8949           1 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8950           1 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    8951           1 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    8952           1 :         zval_dtor(free_op1.var);
    8953           1 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8954             :         CHECK_EXCEPTION();
    8955           1 :         ZEND_VM_NEXT_OPCODE();
    8956             : }
    8957             : 
    8958           0 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8959             : {
    8960           0 :         USE_OPLINE
    8961             :         zend_free_op free_op1, free_op2;
    8962           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8963             : 
    8964             :         SAVE_OPLINE();
    8965           0 :         ZVAL_BOOL(result, fast_equal_function(result,
    8966             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8967             :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    8968           0 :         zval_dtor(free_op1.var);
    8969           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8970             :         CHECK_EXCEPTION();
    8971           0 :         ZEND_VM_NEXT_OPCODE();
    8972             : }
    8973             : 
    8974           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8975             : {
    8976           0 :         USE_OPLINE
    8977             :         zend_free_op free_op1, free_op2;
    8978           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8979             : 
    8980             :         SAVE_OPLINE();
    8981           0 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    8982             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8983             :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    8984           0 :         zval_dtor(free_op1.var);
    8985           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    8986             :         CHECK_EXCEPTION();
    8987           0 :         ZEND_VM_NEXT_OPCODE();
    8988             : }
    8989             : 
    8990           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8991             : {
    8992           0 :         USE_OPLINE
    8993             :         zend_free_op free_op1, free_op2;
    8994           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8995             : 
    8996             :         SAVE_OPLINE();
    8997           0 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    8998             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    8999             :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    9000           0 :         zval_dtor(free_op1.var);
    9001           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9002             :         CHECK_EXCEPTION();
    9003           0 :         ZEND_VM_NEXT_OPCODE();
    9004             : }
    9005             : 
    9006           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9007             : {
    9008           0 :         USE_OPLINE
    9009             :         zend_free_op free_op1, free_op2;
    9010           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    9011             : 
    9012             :         SAVE_OPLINE();
    9013           0 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    9014             :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    9015             :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
    9016           0 :         zval_dtor(free_op1.var);
    9017           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9018             :         CHECK_EXCEPTION();
    9019           0 :         ZEND_VM_NEXT_OPCODE();
    9020             : }
    9021             : 
    9022           0 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9023             : {
    9024           0 :         USE_OPLINE
    9025             :         zend_free_op free_op1, free_op2;
    9026             : 
    9027             :         SAVE_OPLINE();
    9028           0 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    9029           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    9030           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    9031           0 :         zval_dtor(free_op1.var);
    9032           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9033             :         CHECK_EXCEPTION();
    9034           0 :         ZEND_VM_NEXT_OPCODE();
    9035             : }
    9036             : 
    9037           0 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9038             : {
    9039           0 :         USE_OPLINE
    9040             :         zend_free_op free_op1, free_op2;
    9041             : 
    9042             :         SAVE_OPLINE();
    9043           0 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    9044           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    9045           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    9046           0 :         zval_dtor(free_op1.var);
    9047           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9048             :         CHECK_EXCEPTION();
    9049           0 :         ZEND_VM_NEXT_OPCODE();
    9050             : }
    9051             : 
    9052           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9053             : {
    9054           0 :         USE_OPLINE
    9055             :         zend_free_op free_op1, free_op2;
    9056             : 
    9057             :         SAVE_OPLINE();
    9058           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    9059           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    9060           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    9061           0 :         zval_dtor(free_op1.var);
    9062           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9063             :         CHECK_EXCEPTION();
    9064           0 :         ZEND_VM_NEXT_OPCODE();
    9065             : }
    9066             : 
    9067           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9068             : {
    9069           0 :         USE_OPLINE
    9070             :         zend_free_op free_op1, free_op2;
    9071             : 
    9072             :         SAVE_OPLINE();
    9073           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    9074           0 :                 _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    9075           0 :                 _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    9076           0 :         zval_dtor(free_op1.var);
    9077           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9078             :         CHECK_EXCEPTION();
    9079           0 :         ZEND_VM_NEXT_OPCODE();
    9080             : }
    9081             : 
    9082           0 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
    9083             : {
    9084           0 :         USE_OPLINE
    9085             :         zend_free_op free_op1;
    9086             :         zval *varname;
    9087             :         zval **retval;
    9088             :         zval tmp_varname;
    9089             :         HashTable *target_symbol_table;
    9090             :         ulong hash_value;
    9091             : 
    9092             :         SAVE_OPLINE();
    9093           0 :         varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    9094             : 
    9095           0 :         if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
    9096           0 :                 ZVAL_COPY_VALUE(&tmp_varname, varname);
    9097             :                 zval_copy_ctor(&tmp_varname);
    9098             :                 Z_SET_REFCOUNT(tmp_varname, 1);
    9099             :                 Z_UNSET_ISREF(tmp_varname);
    9100           0 :                 convert_to_string(&tmp_varname);
    9101           0 :                 varname = &tmp_varname;
    9102             :         }
    9103             : 
    9104             :         if (IS_VAR != IS_UNUSED) {
    9105             :                 zend_class_entry *ce;
    9106             : 
    9107           0 :                 if (IS_VAR == IS_CONST) {
    9108             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9109             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9110             :                         } else {
    9111             :                                 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);
    9112             :                                 if (UNEXPECTED(ce == NULL)) {
    9113             :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    9114             :                                                 zval_dtor(&tmp_varname);
    9115             :                                         }
    9116             :                                         zval_dtor(free_op1.var);
    9117             :                                         CHECK_EXCEPTION();
    9118             :                                         ZEND_VM_NEXT_OPCODE();
    9119             :                                 }
    9120             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9121             :                         }
    9122             :                 } else {
    9123           0 :                         ce = EX_T(opline->op2.var).class_entry;
    9124             :                 }
    9125           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);
    9126           0 :                 zval_dtor(free_op1.var);
    9127             :         } else {
    9128             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9129             : /*
    9130             :                 if (!target_symbol_table) {
    9131             :                         CHECK_EXCEPTION();
    9132             :                         ZEND_VM_NEXT_OPCODE();
    9133             :                 }
    9134             : */
    9135             :                 if (IS_TMP_VAR == IS_CONST) {
    9136             :                         hash_value = Z_HASH_P(varname);
    9137             :                 } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
    9138             :                         hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
    9139             :                 } else {
    9140             :                         hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
    9141             :                 }
    9142             : 
    9143             :                 if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
    9144             :                         switch (type) {
    9145             :                                 case BP_VAR_R:
    9146             :                                 case BP_VAR_UNSET:
    9147             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    9148             :                                         /* break missing intentionally */
    9149             :                                 case BP_VAR_IS:
    9150             :                                         retval = &EG(uninitialized_zval_ptr);
    9151             :                                         break;
    9152             :                                 case BP_VAR_RW:
    9153             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    9154             :                                         /* break missing intentionally */
    9155             :                                 case BP_VAR_W:
    9156             :                                         Z_ADDREF_P(&EG(uninitialized_zval));
    9157             :                                         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);
    9158             :                                         break;
    9159             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    9160             :                         }
    9161             :                 }
    9162             :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    9163             :                         case ZEND_FETCH_GLOBAL:
    9164             :                                 if (IS_TMP_VAR != IS_TMP_VAR) {
    9165             :                                         zval_dtor(free_op1.var);
    9166             :                                 }
    9167             :                                 break;
    9168             :                         case ZEND_FETCH_LOCAL:
    9169             :                                 zval_dtor(free_op1.var);
    9170             :                                 break;
    9171             :                         case ZEND_FETCH_STATIC:
    9172             :                                 zval_update_constant(retval, (void*) 1 TSRMLS_CC);
    9173             :                                 break;
    9174             :                         case ZEND_FETCH_GLOBAL_LOCK:
    9175             :                                 if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
    9176             :                                         PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
    9177             :                                 }
    9178             :                                 break;
    9179             :                 }
    9180             :         }
    9181             : 
    9182             : 
    9183           0 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    9184             :                 zval_dtor(&tmp_varname);
    9185             :         }
    9186           0 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    9187           0 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    9188             :         }
    9189           0 :         PZVAL_LOCK(*retval);
    9190           0 :         switch (type) {
    9191             :                 case BP_VAR_R:
    9192             :                 case BP_VAR_IS:
    9193           0 :                         AI_SET_PTR(&EX_T(opline->result.var), *retval);
    9194           0 :                         break;
    9195             :                 case BP_VAR_UNSET: {
    9196             :                         zend_free_op free_res;
    9197             : 
    9198           0 :                         PZVAL_UNLOCK(*retval, &free_res);
    9199           0 :                         if (retval != &EG(uninitialized_zval_ptr)) {
    9200           0 :                                 SEPARATE_ZVAL_IF_NOT_REF(retval);
    9201             :                         }
    9202           0 :                         PZVAL_LOCK(*retval);
    9203           0 :                         FREE_OP_VAR_PTR(free_res);
    9204             :                 }
    9205             :                 /* break missing intentionally */
    9206             :                 default:
    9207           0 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    9208             :                         break;
    9209             :         }
    9210             :         CHECK_EXCEPTION();
    9211           0 :         ZEND_VM_NEXT_OPCODE();
    9212             : }
    9213             : 
    9214           0 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9215             : {
    9216           0 :         return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9217             : }
    9218             : 
    9219           0 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9220             : {
    9221           0 :         return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9222             : }
    9223             : 
    9224           0 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9225             : {
    9226           0 :         return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9227             : }
    9228             : 
    9229           0 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9230             : {
    9231           0 :         USE_OPLINE
    9232             : 
    9233           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);
    9234             : }
    9235             : 
    9236           0 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9237             : {
    9238           0 :         return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9239             : }
    9240             : 
    9241           0 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9242             : {
    9243           0 :         return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9244             : }
    9245             : 
    9246       11260 : static int ZEND_FASTCALL  ZEND_ADD_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9247             : {
    9248       11260 :         USE_OPLINE
    9249             :         zend_free_op free_op2;
    9250       11260 :         zval *str = &EX_T(opline->result.var).tmp_var;
    9251             :         zval *var;
    9252             :         zval var_copy;
    9253       11260 :         int use_copy = 0;
    9254             : 
    9255             :         SAVE_OPLINE();
    9256       22520 :         var = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
    9257             : 
    9258       11260 :         if (IS_TMP_VAR == IS_UNUSED) {
    9259             :                 /* Initialize for erealloc in add_string_to_string */
    9260             :                 Z_STRVAL_P(str) = NULL;
    9261             :                 Z_STRLEN_P(str) = 0;
    9262             :                 Z_TYPE_P(str) = IS_STRING;
    9263             : 
    9264             :                 INIT_PZVAL(str);
    9265             :         }
    9266             : 
    9267       11260 :         if (Z_TYPE_P(var) != IS_STRING) {
    9268        2695 :                 zend_make_printable_zval(var, &var_copy, &use_copy);
    9269             : 
    9270        2695 :                 if (use_copy) {
    9271        2695 :                         var = &var_copy;
    9272             :                 }
    9273             :         }
    9274       11260 :         add_string_to_string(str, str, var);
    9275             : 
    9276       11260 :         if (use_copy) {
    9277             :                 zval_dtor(var);
    9278             :         }
    9279             :         /* original comment, possibly problematic:
    9280             :          * FREE_OP is missing intentionally here - we're always working on the same temporary variable
    9281             :          * (Zeev):  I don't think it's problematic, we only use variables
    9282             :          * which aren't affected by FREE_OP(Ts, )'s anyway, unless they're
    9283             :          * string offsets or overloaded objects
    9284             :          */
    9285       11260 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9286             : 
    9287             :         CHECK_EXCEPTION();
    9288       11260 :         ZEND_VM_NEXT_OPCODE();
    9289             : }
    9290             : 
    9291           0 : static int ZEND_FASTCALL  ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9292             : {
    9293           0 :         USE_OPLINE
    9294             :         zval *function_name;
    9295             :         char *function_name_strval;
    9296             :         int function_name_strlen;
    9297             :         zend_free_op free_op1, free_op2;
    9298             : 
    9299             :         SAVE_OPLINE();
    9300           0 :         zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
    9301             : 
    9302           0 :         function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
    9303             : 
    9304           0 :         if (IS_VAR != IS_CONST &&
    9305             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    9306           0 :                 zend_error_noreturn(E_ERROR, "Method name must be a string");
    9307             :         }
    9308             : 
    9309           0 :         function_name_strval = Z_STRVAL_P(function_name);
    9310           0 :         function_name_strlen = Z_STRLEN_P(function_name);
    9311             : 
    9312           0 :         EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    9313             : 
    9314           0 :         if (EXPECTED(EX(object) != NULL) &&
    9315           0 :             EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
    9316           0 :                 EX(called_scope) = Z_OBJCE_P(EX(object));
    9317             : 
    9318             :                 if (IS_VAR != IS_CONST ||
    9319             :                     (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
    9320           0 :                     zval *object = EX(object);
    9321             : 
    9322           0 :                         if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
    9323           0 :                                 zend_error_noreturn(E_ERROR, "Object does not support method calls");
    9324             :                         }
    9325             : 
    9326             :                         /* First, locate the function. */
    9327           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);
    9328           0 :                         if (UNEXPECTED(EX(fbc) == NULL)) {
    9329           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
    9330             :                         }
    9331           0 :                         if (IS_VAR == IS_CONST &&
    9332             :                             EXPECTED(EX(fbc)->type <= ZEND_USER_FUNCTION) &&
    9333             :                             EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
    9334             :                             EXPECTED(EX(object) == object)) {
    9335             :                                 CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
    9336             :                         }
    9337             :                 }
    9338             :         } else {
    9339           0 :                 zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
    9340             :         }
    9341             : 
    9342           0 :         if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    9343           0 :                 EX(object) = NULL;
    9344             :         } else {
    9345           0 :                 if (!PZVAL_IS_REF(EX(object))) {
    9346           0 :                         Z_ADDREF_P(EX(object)); /* For $this pointer */
    9347             :                 } else {
    9348             :                         zval *this_ptr;
    9349           0 :                         ALLOC_ZVAL(this_ptr);
    9350           0 :                         INIT_PZVAL_COPY(this_ptr, EX(object));
    9351             :                         zval_copy_ctor(this_ptr);
    9352           0 :                         EX(object) = this_ptr;
    9353             :                 }
    9354             :         }
    9355             : 
    9356           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9357             : 
    9358             :         CHECK_EXCEPTION();
    9359           0 :         ZEND_VM_NEXT_OPCODE();
    9360             : }
    9361             : 
    9362           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9363             : {
    9364           0 :         USE_OPLINE
    9365             :         zend_free_op free_op1, free_op2;
    9366             : 
    9367             :         SAVE_OPLINE();
    9368           0 :         if (IS_TMP_VAR==IS_VAR) {
    9369             :                 PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
    9370             :         }
    9371           0 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    9372           0 :                                  _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
    9373           0 :                                  _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
    9374             : 
    9375           0 :         if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9376             :         CHECK_EXCEPTION();
    9377           0 :         ZEND_VM_NEXT_OPCODE();
    9378             : }
    9379             : 
    9380           1 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9381             : {
    9382           1 :         USE_OPLINE
    9383             :         zend_free_op free_op1;
    9384             :         zval *expr_ptr;
    9385             : 
    9386             :         SAVE_OPLINE();
    9387           1 :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    9388             :                 zval **expr_ptr_ptr = NULL;
    9389             : 
    9390             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    9391             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    9392             :                 }
    9393             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    9394             :                 expr_ptr = *expr_ptr_ptr;
    9395             :                 Z_ADDREF_P(expr_ptr);
    9396             :         } else {
    9397           2 :                 expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    9398             :                 if (1) { /* temporary variable */
    9399             :                         zval *new_expr;
    9400             : 
    9401           1 :                         ALLOC_ZVAL(new_expr);
    9402           1 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    9403           1 :                         expr_ptr = new_expr;
    9404             :                 } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    9405             :                         zval *new_expr;
    9406             : 
    9407             :                         ALLOC_ZVAL(new_expr);
    9408             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    9409             :                         expr_ptr = new_expr;
    9410             :                         zendi_zval_copy_ctor(*expr_ptr);
    9411             :                 } else {
    9412             :                         Z_ADDREF_P(expr_ptr);
    9413             :                 }
    9414             :         }
    9415             : 
    9416             :         if (IS_VAR != IS_UNUSED) {
    9417             :                 zend_free_op free_op2;
    9418           2 :                 zval *offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
    9419             :                 ulong hval;
    9420             : 
    9421           1 :                 switch (Z_TYPE_P(offset)) {
    9422             :                         case IS_DOUBLE:
    9423           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    9424           0 :                                 goto num_index;
    9425             :                         case IS_LONG:
    9426             :                         case IS_BOOL:
    9427           0 :                                 hval = Z_LVAL_P(offset);
    9428             : num_index:
    9429           0 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    9430           0 :                                 break;
    9431             :                         case IS_STRING:
    9432           0 :                                 if (IS_VAR == IS_CONST) {
    9433             :                                         hval = Z_HASH_P(offset);
    9434             :                                 } else {
    9435           0 :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    9436           0 :                                         if (IS_INTERNED(Z_STRVAL_P(offset))) {
    9437           0 :                                                 hval = INTERNED_HASH(Z_STRVAL_P(offset));
    9438             :                                         } else {
    9439           0 :                                                 hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
    9440             :                                         }
    9441             :                                 }
    9442           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);
    9443           0 :                                 break;
    9444             :                         case IS_NULL:
    9445           1 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    9446           1 :                                 break;
    9447             :                         default:
    9448           0 :                                 zend_error(E_WARNING, "Illegal offset type");
    9449           0 :                                 zval_ptr_dtor(&expr_ptr);
    9450             :                                 /* do nothing */
    9451             :                                 break;
    9452             :                 }
    9453           1 :                 if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
    9454             :         } else {
    9455             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    9456             :         }
    9457             :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    9458             : 
    9459             :         } else {
    9460             : 
    9461             :         }
    9462             :         CHECK_EXCEPTION();
    9463           1 :         ZEND_VM_NEXT_OPCODE();
    9464             : }
    9465             : 
    9466           0 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9467             : {
    9468           0 :         USE_OPLINE
    9469             : 
    9470           0 :         array_init(&EX_T(opline->result.var).tmp_var);
    9471           0 :         if (IS_TMP_VAR == IS_UNUSED) {
    9472             :                 ZEND_VM_NEXT_OPCODE();
    9473             : #if 0 || IS_TMP_VAR != IS_UNUSED
    9474             :         } else {
    9475           0 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9476             : #endif
    9477             :         }
    9478             : }
    9479             : 
    9480           0 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9481             : {
    9482           0 :         USE_OPLINE
    9483             :         zval tmp, *varname;
    9484             :         HashTable *target_symbol_table;
    9485             :         zend_free_op free_op1;
    9486             : 
    9487             :         SAVE_OPLINE();
    9488           0 :         if (IS_TMP_VAR == IS_CV &&
    9489             :             IS_VAR == IS_UNUSED &&
    9490             :             (opline->extended_value & ZEND_QUICK_SET)) {
    9491             :                 if (EG(active_symbol_table)) {
    9492             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    9493             : 
    9494             :                         zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table),  cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
    9495             :                         EX_CV(opline->op1.var) = NULL;
    9496             :                 } else if (EX_CV(opline->op1.var)) {
    9497             :                         zval_ptr_dtor(EX_CV(opline->op1.var));
    9498             :                         EX_CV(opline->op1.var) = NULL;
    9499             :                 }
    9500             :                 CHECK_EXCEPTION();
    9501             :                 ZEND_VM_NEXT_OPCODE();
    9502             :         }
    9503             : 
    9504           0 :         varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    9505             : 
    9506           0 :         if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    9507           0 :                 ZVAL_COPY_VALUE(&tmp, varname);
    9508             :                 zval_copy_ctor(&tmp);
    9509           0 :                 convert_to_string(&tmp);
    9510           0 :                 varname = &tmp;
    9511           0 :         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    9512             :                 Z_ADDREF_P(varname);
    9513             :         }
    9514             : 
    9515             :         if (IS_VAR != IS_UNUSED) {
    9516             :                 zend_class_entry *ce;
    9517             : 
    9518           0 :                 if (IS_VAR == IS_CONST) {
    9519             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9520             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9521             :                         } else {
    9522             :                                 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);
    9523             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9524             :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    9525             :                                                 zval_dtor(&tmp);
    9526             :                                         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    9527             :                                                 zval_ptr_dtor(&varname);
    9528             :                                         }
    9529             :                                         zval_dtor(free_op1.var);
    9530             :                                         HANDLE_EXCEPTION();
    9531             :                                 }
    9532             :                                 if (UNEXPECTED(ce == NULL)) {
    9533             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    9534             :                                 }
    9535             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9536             :                         }
    9537             :                 } else {
    9538           0 :                         ce = EX_T(opline->op2.var).class_entry;
    9539             :                 }
    9540           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);
    9541             :         } else {
    9542             :                 ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
    9543             : 
    9544             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9545             :                 zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
    9546             :         }
    9547             : 
    9548           0 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    9549             :                 zval_dtor(&tmp);
    9550           0 :         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    9551             :                 zval_ptr_dtor(&varname);
    9552             :         }
    9553           0 :         zval_dtor(free_op1.var);
    9554             :         CHECK_EXCEPTION();
    9555           0 :         ZEND_VM_NEXT_OPCODE();
    9556             : }
    9557             : 
    9558           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9559             : {
    9560           0 :         USE_OPLINE
    9561             :         zval **value;
    9562           0 :         zend_bool isset = 1;
    9563             : 
    9564             :         SAVE_OPLINE();
    9565           0 :         if (IS_TMP_VAR == IS_CV &&
    9566             :             IS_VAR == IS_UNUSED &&
    9567             :             (opline->extended_value & ZEND_QUICK_SET)) {
    9568             :                 if (EX_CV(opline->op1.var)) {
    9569             :                         value = EX_CV(opline->op1.var);
    9570             :                 } else if (EG(active_symbol_table)) {
    9571             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    9572             : 
    9573             :                         if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
    9574             :                                 isset = 0;
    9575             :                         }
    9576             :                 } else {
    9577             :                         isset = 0;
    9578             :                 }
    9579             :         } else {
    9580             :                 HashTable *target_symbol_table;
    9581             :                 zend_free_op free_op1;
    9582           0 :                 zval tmp, *varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    9583             : 
    9584           0 :                 if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    9585           0 :                         ZVAL_COPY_VALUE(&tmp, varname);
    9586             :                         zval_copy_ctor(&tmp);
    9587           0 :                         convert_to_string(&tmp);
    9588           0 :                         varname = &tmp;
    9589             :                 }
    9590             : 
    9591             :                 if (IS_VAR != IS_UNUSED) {
    9592             :                         zend_class_entry *ce;
    9593             : 
    9594           0 :                         if (IS_VAR == IS_CONST) {
    9595             :                                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9596             :                                         ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9597             :                                 } else {
    9598             :                                         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);
    9599             :                                         if (UNEXPECTED(ce == NULL)) {
    9600             :                                                 CHECK_EXCEPTION();
    9601             :                                                 ZEND_VM_NEXT_OPCODE();
    9602             :                                         }
    9603             :                                         CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9604             :                                 }
    9605             :                         } else {
    9606           0 :                                 ce = EX_T(opline->op2.var).class_entry;
    9607             :                         }
    9608           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);
    9609           0 :                         if (!value) {
    9610           0 :                                 isset = 0;
    9611             :                         }
    9612             :                 } else {
    9613             :                         target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9614             :                         if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
    9615             :                                 isset = 0;
    9616             :                         }
    9617             :                 }
    9618             : 
    9619           0 :                 if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    9620             :                         zval_dtor(&tmp);
    9621             :                 }
    9622           0 :                 zval_dtor(free_op1.var);
    9623             :         }
    9624             : 
    9625           0 :         if (opline->extended_value & ZEND_ISSET) {
    9626           0 :                 if (isset && Z_TYPE_PP(value) != IS_NULL) {
    9627           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    9628             :                 } else {
    9629           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    9630             :                 }
    9631             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    9632           0 :                 if (!isset || !i_zend_is_true(*value)) {
    9633           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    9634             :                 } else {
    9635           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    9636             :                 }
    9637             :         }
    9638             : 
    9639             :         CHECK_EXCEPTION();
    9640           0 :         ZEND_VM_NEXT_OPCODE();
    9641             : }
    9642             : 
    9643        2760 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
    9644             : {
    9645        2760 :         USE_OPLINE
    9646             :         zend_free_op free_op1;
    9647             :         zval *varname;
    9648             :         zval **retval;
    9649             :         zval tmp_varname;
    9650             :         HashTable *target_symbol_table;
    9651             :         ulong hash_value;
    9652             : 
    9653             :         SAVE_OPLINE();
    9654        5520 :         varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
    9655             : 
    9656        2760 :         if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
    9657           0 :                 ZVAL_COPY_VALUE(&tmp_varname, varname);
    9658             :                 zval_copy_ctor(&tmp_varname);
    9659             :                 Z_SET_REFCOUNT(tmp_varname, 1);
    9660             :                 Z_UNSET_ISREF(tmp_varname);
    9661           0 :                 convert_to_string(&tmp_varname);
    9662           0 :                 varname = &tmp_varname;
    9663             :         }
    9664             : 
    9665        2760 :         if (IS_UNUSED != IS_UNUSED) {
    9666             :                 zend_class_entry *ce;
    9667             : 
    9668             :                 if (IS_UNUSED == IS_CONST) {
    9669             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9670             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9671             :                         } else {
    9672             :                                 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);
    9673             :                                 if (UNEXPECTED(ce == NULL)) {
    9674             :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    9675             :                                                 zval_dtor(&tmp_varname);
    9676             :                                         }
    9677             :                                         zval_dtor(free_op1.var);
    9678             :                                         CHECK_EXCEPTION();
    9679             :                                         ZEND_VM_NEXT_OPCODE();
    9680             :                                 }
    9681             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9682             :                         }
    9683             :                 } else {
    9684             :                         ce = EX_T(opline->op2.var).class_entry;
    9685             :                 }
    9686             :                 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);
    9687             :                 zval_dtor(free_op1.var);
    9688             :         } else {
    9689        2760 :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9690             : /*
    9691             :                 if (!target_symbol_table) {
    9692             :                         CHECK_EXCEPTION();
    9693             :                         ZEND_VM_NEXT_OPCODE();
    9694             :                 }
    9695             : */
    9696        2760 :                 if (IS_TMP_VAR == IS_CONST) {
    9697             :                         hash_value = Z_HASH_P(varname);
    9698        2760 :                 } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
    9699           0 :                         hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
    9700             :                 } else {
    9701        2760 :                         hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
    9702             :                 }
    9703             : 
    9704        2760 :                 if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
    9705          24 :                         switch (type) {
    9706             :                                 case BP_VAR_R:
    9707             :                                 case BP_VAR_UNSET:
    9708           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    9709             :                                         /* break missing intentionally */
    9710             :                                 case BP_VAR_IS:
    9711           0 :                                         retval = &EG(uninitialized_zval_ptr);
    9712           0 :                                         break;
    9713             :                                 case BP_VAR_RW:
    9714           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    9715             :                                         /* break missing intentionally */
    9716             :                                 case BP_VAR_W:
    9717             :                                         Z_ADDREF_P(&EG(uninitialized_zval));
    9718          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);
    9719             :                                         break;
    9720             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    9721             :                         }
    9722             :                 }
    9723        2760 :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    9724             :                         case ZEND_FETCH_GLOBAL:
    9725           0 :                                 if (IS_TMP_VAR != IS_TMP_VAR) {
    9726             :                                         zval_dtor(free_op1.var);
    9727             :                                 }
    9728           0 :                                 break;
    9729             :                         case ZEND_FETCH_LOCAL:
    9730        2760 :                                 zval_dtor(free_op1.var);
    9731        2760 :                                 break;
    9732             :                         case ZEND_FETCH_STATIC:
    9733           0 :                                 zval_update_constant(retval, (void*) 1 TSRMLS_CC);
    9734           0 :                                 break;
    9735             :                         case ZEND_FETCH_GLOBAL_LOCK:
    9736           0 :                                 if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
    9737             :                                         PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
    9738             :                                 }
    9739             :                                 break;
    9740             :                 }
    9741             :         }
    9742             : 
    9743             : 
    9744        2760 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    9745             :                 zval_dtor(&tmp_varname);
    9746             :         }
    9747        2760 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    9748           0 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    9749             :         }
    9750        2760 :         PZVAL_LOCK(*retval);
    9751        2760 :         switch (type) {
    9752             :                 case BP_VAR_R:
    9753             :                 case BP_VAR_IS:
    9754        1377 :                         AI_SET_PTR(&EX_T(opline->result.var), *retval);
    9755        1377 :                         break;
    9756             :                 case BP_VAR_UNSET: {
    9757             :                         zend_free_op free_res;
    9758             : 
    9759           0 :                         PZVAL_UNLOCK(*retval, &free_res);
    9760           0 :                         if (retval != &EG(uninitialized_zval_ptr)) {
    9761           0 :                                 SEPARATE_ZVAL_IF_NOT_REF(retval);
    9762             :                         }
    9763           0 :                         PZVAL_LOCK(*retval);
    9764           0 :                         FREE_OP_VAR_PTR(free_res);
    9765             :                 }
    9766             :                 /* break missing intentionally */
    9767             :                 default:
    9768        1383 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    9769             :                         break;
    9770             :         }
    9771             :         CHECK_EXCEPTION();
    9772        2760 :         ZEND_VM_NEXT_OPCODE();
    9773             : }
    9774             : 
    9775        1377 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9776             : {
    9777        1377 :         return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9778             : }
    9779             : 
    9780        1383 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9781             : {
    9782        1383 :         return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9783             : }
    9784             : 
    9785           0 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9786             : {
    9787           0 :         return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9788             : }
    9789             : 
    9790           0 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9791             : {
    9792           0 :         USE_OPLINE
    9793             : 
    9794           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);
    9795             : }
    9796             : 
    9797           0 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9798             : {
    9799           0 :         return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9800             : }
    9801             : 
    9802           0 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9803             : {
    9804           0 :         return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9805             : }
    9806             : 
    9807       29337 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9808             : {
    9809       29337 :         USE_OPLINE
    9810             :         zend_free_op free_op1;