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