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: 7239 15479 46.8 %
Date: 2014-04-06 Functions: 643 1234 52.1 %
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      485394 : 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      485394 :         original_in_execution = EG(in_execution);
     345      485394 :         EG(in_execution) = 1;
     346             : 
     347      485394 :         if (0) {
     348             : zend_vm_enter:
     349     3226348 :                 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   197157093 :                 if ((ret = OPLINE->handler(execute_data TSRMLS_CC)) > 0) {
     364     3710004 :                         switch (ret) {
     365             :                                 case 1:
     366      483832 :                                         EG(in_execution) = original_in_execution;
     367      483832 :                                         return;
     368             :                                 case 2:
     369     1613174 :                                         goto zend_vm_enter;
     370             :                                         break;
     371             :                                 case 3:
     372     1612998 :                                         execute_data = EG(current_execute_data);
     373             :                                         break;
     374             :                                 default:
     375             :                                         break;
     376             :                         }
     377             :                 }
     378             : 
     379   195058525 :         }
     380             :         zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen");
     381             : }
     382             : 
     383      485189 : ZEND_API void zend_execute(zend_op_array *op_array TSRMLS_DC)
     384             : {
     385      485189 :         if (EG(exception)) {
     386           0 :                 return;
     387             :         } 
     388      970378 :         zend_execute_ex(i_create_execute_data_from_op_array(op_array, 0 TSRMLS_CC) TSRMLS_CC);
     389             : }
     390             : 
     391     2096632 : static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     392             : {
     393     2096632 :         zend_bool nested = EX(nested);
     394     2096632 :         zend_op_array *op_array = EX(op_array);
     395             : 
     396     2096632 :         EG(current_execute_data) = EX(prev_execute_data);
     397     2096632 :         EG(opline_ptr) = NULL;
     398     2096632 :         if (!EG(active_symbol_table)) {
     399             :                 i_free_compiled_variables(execute_data TSRMLS_CC);
     400             :         }
     401             : 
     402     2096632 :         zend_vm_stack_free((char*)execute_data - (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T) TSRMLS_CC);
     403             : 
     404     2096632 :         if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
     405           1 :                 zval_ptr_dtor((zval**)&op_array->prototype);
     406             :         }
     407             : 
     408     2096632 :         if (nested) {
     409     1612998 :                 execute_data = EG(current_execute_data);
     410             :         }
     411     2096632 :         if (nested) {
     412     1612998 :                 USE_OPLINE
     413             : 
     414             :                 LOAD_REGS();
     415             :                 LOAD_OPLINE();
     416     1612998 :                 if (UNEXPECTED(opline->opcode == ZEND_INCLUDE_OR_EVAL)) {
     417             : 
     418       10573 :                         EX(function_state).function = (zend_function *) EX(op_array);
     419       10573 :                         EX(function_state).arguments = NULL;
     420             : 
     421       10573 :                         EG(opline_ptr) = &EX(opline);
     422       10573 :                         EG(active_op_array) = EX(op_array);
     423       10573 :                         EG(return_value_ptr_ptr) = EX(original_return_value);
     424       10573 :                         destroy_op_array(op_array TSRMLS_CC);
     425       10573 :                         efree(op_array);
     426       10573 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     427          21 :                                 zend_throw_exception_internal(NULL TSRMLS_CC);
     428          21 :                                 HANDLE_EXCEPTION_LEAVE();
     429             :                         }
     430             : 
     431       10552 :                         ZEND_VM_INC_OPCODE();
     432       10552 :                         ZEND_VM_LEAVE();
     433             :                 } else {
     434     1602425 :                         EG(opline_ptr) = &EX(opline);
     435     1602425 :                         EG(active_op_array) = EX(op_array);
     436     1602425 :                         EG(return_value_ptr_ptr) = EX(original_return_value);
     437     1602425 :                         if (EG(active_symbol_table)) {
     438       36640 :                                 zend_clean_and_cache_symbol_table(EG(active_symbol_table) TSRMLS_CC);
     439             :                         }
     440     1602425 :                         EG(active_symbol_table) = EX(symbol_table);
     441             : 
     442     1602425 :                         EX(function_state).function = (zend_function *) EX(op_array);
     443     1602425 :                         EX(function_state).arguments = NULL;
     444             : 
     445     1602425 :                         if (EG(This)) {
     446      100732 :                                 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      100732 :                                 zval_ptr_dtor(&EG(This));
     455             :                         }
     456     1602425 :                         EG(This) = EX(current_this);
     457     1602425 :                         EG(scope) = EX(current_scope);
     458     1602425 :                         EG(called_scope) = EX(current_called_scope);
     459             : 
     460     1602425 :                         EX(call)--;
     461             : 
     462             :                         zend_vm_stack_clear_multiple(1 TSRMLS_CC);
     463             : 
     464     1602425 :                         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     1602271 :                         ZEND_VM_INC_OPCODE();
     473     1602271 :                         ZEND_VM_LEAVE();
     474             :                 }
     475             :         }
     476      483634 :         ZEND_VM_RETURN();
     477             : }
     478             : 
     479    21022638 : static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
     480             : {
     481    21022638 :         USE_OPLINE
     482    21022638 :         zend_bool should_change_scope = 0;
     483    21022638 :         zend_function *fbc = EX(function_state).function;
     484             :         zend_uint num_args;
     485             : 
     486             :         SAVE_OPLINE();
     487    21022638 :         EX(object) = EX(call)->object;
     488    21022638 :         if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
     489        1119 :                 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        1117 :                 if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
     493        3351 :                         zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
     494        1117 :                                 fbc->common.scope ? fbc->common.scope->name : "",
     495        1117 :                                 fbc->common.scope ? "::" : "",
     496             :                                 fbc->common.function_name);
     497        1117 :                         if (UNEXPECTED(EG(exception) != NULL)) {
     498           0 :                                 HANDLE_EXCEPTION();
     499             :                         }
     500             :                 }
     501             :         }
     502    22773586 :         if (fbc->common.scope &&
     503      878597 :                 !(fbc->common.fn_flags & ZEND_ACC_STATIC) &&
     504      872353 :                 !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    21022626 :         if (fbc->type == ZEND_USER_FUNCTION || fbc->common.scope) {
     520     2377387 :                 should_change_scope = 1;
     521     2377387 :                 EX(current_this) = EG(This);
     522     2377387 :                 EX(current_scope) = EG(scope);
     523     2377387 :                 EX(current_called_scope) = EG(called_scope);
     524     2377387 :                 EG(This) = EX(object);
     525     2377387 :                 EG(scope) = (fbc->type == ZEND_USER_FUNCTION || !EX(object)) ? fbc->common.scope : NULL;
     526     2377387 :                 EG(called_scope) = EX(call)->called_scope;
     527             :         }
     528             : 
     529    21022626 :         num_args = opline->extended_value + EX(call)->num_additional_args;
     530    21022626 :         if (EX(call)->num_additional_args) {
     531          66 :                 EX(function_state).arguments = zend_vm_stack_push_args(num_args TSRMLS_CC);
     532             :         } else {
     533    21022593 :                 EX(function_state).arguments = zend_vm_stack_top(TSRMLS_C);
     534    21022593 :                 zend_vm_stack_push((void*)(zend_uintptr_t) num_args TSRMLS_CC);
     535             :         }
     536             :         LOAD_OPLINE();
     537             : 
     538    21022626 :         if (fbc->type == ZEND_INTERNAL_FUNCTION) {
     539    19420017 :                 if (fbc->common.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) {
     540             :                         zend_uint i;
     541        1387 :                         void **p = EX(function_state).arguments - num_args;
     542             : 
     543        3469 :                         for (i = 0; i < num_args; ++i, ++p) {
     544        2122 :                                 zend_verify_arg_type(fbc, i + 1, (zval *) *p, 0 TSRMLS_CC);
     545             :                         }
     546             :                 }
     547             : 
     548    19419977 :                 if (EXPECTED(EG(exception) == NULL)) {
     549    19419976 :                         temp_variable *ret = &EX_T(opline->result.var);
     550             : 
     551    19419976 :                         MAKE_STD_ZVAL(ret->var.ptr);
     552    19419975 :                         ZVAL_NULL(ret->var.ptr);
     553    19419975 :                         ret->var.ptr_ptr = &ret->var.ptr;
     554    19419975 :                         ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
     555             : 
     556    19419975 :                         if (!zend_execute_internal) {
     557             :                                 /* saves one function call if zend_execute_internal is not used */
     558    19419975 :                                 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    19419793 :                         if (!RETURN_VALUE_USED(opline)) {
     564     1646978 :                                 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     1602609 :         } else if (fbc->type == ZEND_USER_FUNCTION) {
     570     1602609 :                 EX(original_return_value) = EG(return_value_ptr_ptr);
     571     1602609 :                 EG(active_symbol_table) = NULL;
     572     1602609 :                 EG(active_op_array) = &fbc->op_array;
     573     1602609 :                 EG(return_value_ptr_ptr) = NULL;
     574     1602609 :                 if (RETURN_VALUE_USED(opline)) {
     575     1307352 :                         temp_variable *ret = &EX_T(opline->result.var);
     576             : 
     577     1307352 :                         ret->var.ptr = NULL;
     578     1307352 :                         EG(return_value_ptr_ptr) = &ret->var.ptr;
     579     1307352 :                         ret->var.ptr_ptr = &ret->var.ptr;
     580     1307352 :                         ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
     581             :                 }
     582             : 
     583     1602609 :                 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     1602530 :                 } else if (EXPECTED(zend_execute_ex == execute_ex)) {
     588     1602530 :                         if (EXPECTED(EG(exception) == NULL)) {
     589     1602530 :                                 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    19419873 :         EX(function_state).function = (zend_function *) EX(op_array);
     629    19419873 :         EX(function_state).arguments = NULL;
     630             : 
     631    19419873 :         if (should_change_scope) {
     632      774693 :                 if (EG(This)) {
     633      771478 :                         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      771478 :                         zval_ptr_dtor(&EG(This));
     642             :                 }
     643      774693 :                 EG(This) = EX(current_this);
     644      774693 :                 EG(scope) = EX(current_scope);
     645      774693 :                 EG(called_scope) = EX(current_called_scope);
     646             :         }
     647             : 
     648    19419873 :         EX(call)--;
     649             : 
     650             :         zend_vm_stack_clear_multiple(1 TSRMLS_CC);
     651             : 
     652    19419873 :         if (UNEXPECTED(EG(exception) != NULL)) {
     653         989 :                 zend_throw_exception_internal(NULL TSRMLS_CC);
     654         989 :                 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         989 :                 HANDLE_EXCEPTION();
     658             :         }
     659             : 
     660    19418884 :         ZEND_VM_NEXT_OPCODE();
     661             : }
     662             : 
     663    17699841 : static int ZEND_FASTCALL  ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     664             : {
     665    17699841 :         USE_OPLINE
     666             : 
     667             : #if DEBUG_ZEND>=2
     668             :         printf("Jumping to %d\n", opline->op1.opline_num);
     669             : #endif
     670    17699841 :         ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
     671    17699841 :         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     1298610 : static int ZEND_FASTCALL  ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     691             : {
     692     1298610 :         EX(function_state).function = EX(call)->fbc;
     693     1298610 :         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     5047783 : static int ZEND_FASTCALL  ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     857             : {
     858     5047783 :         USE_OPLINE
     859     5047783 :         zend_uint arg_num = opline->op1.num;
     860    10095566 :         zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
     861             : 
     862             :         SAVE_OPLINE();
     863     5047783 :         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     5047708 :                 zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param, opline->extended_value TSRMLS_CC);
     887    10095390 :                 var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
     888     5047695 :                 Z_DELREF_PP(var_ptr);
     889     5047695 :                 *var_ptr = *param;
     890     5047695 :                 Z_ADDREF_PP(var_ptr);
     891             :         }
     892             : 
     893             :         CHECK_EXCEPTION();
     894     5047766 :         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      461312 : static int ZEND_FASTCALL  ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     929             : {
     930      461312 :         USE_OPLINE
     931             :         zval *object_zval;
     932             :         zend_function *constructor;
     933             : 
     934             :         SAVE_OPLINE();
     935      461312 :         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      461305 :         ALLOC_ZVAL(object_zval);
     945      461305 :         object_init_ex(object_zval, EX_T(opline->op1.var).class_entry);
     946      461304 :         INIT_PZVAL(object_zval);
     947             : 
     948      461304 :         constructor = Z_OBJ_HT_P(object_zval)->get_constructor(object_zval TSRMLS_CC);
     949             : 
     950      461296 :         if (constructor == NULL) {
     951      174324 :                 if (RETURN_VALUE_USED(opline)) {
     952      174311 :                         AI_SET_PTR(&EX_T(opline->result.var), object_zval);
     953             :                 } else {
     954          13 :                         zval_ptr_dtor(&object_zval);
     955             :                 }
     956      174324 :                 ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.opline_num);
     957             :         } else {
     958      286972 :                 call_slot *call = EX(call_slots) + opline->extended_value;
     959             : 
     960      286972 :                 if (RETURN_VALUE_USED(opline)) {
     961      276809 :                         PZVAL_LOCK(object_zval);
     962      276809 :                         AI_SET_PTR(&EX_T(opline->result.var), object_zval);
     963             :                 }
     964             : 
     965             :                 /* We are not handling overloaded classes right now */
     966      286972 :                 call->fbc = constructor;
     967      286972 :                 call->object = object_zval;
     968      286972 :                 call->called_scope = EX_T(opline->op1.var).class_entry;
     969      286972 :                 call->num_additional_args = 0;
     970      286972 :                 call->is_ctor_call = 1;
     971      286972 :                 call->is_ctor_result_used = RETURN_VALUE_USED(opline);
     972      286972 :                 EX(call) = call;
     973             : 
     974             :                 CHECK_EXCEPTION();
     975      286972 :                 ZEND_VM_NEXT_OPCODE();
     976             :         }
     977             : }
     978             : 
     979     1528835 : static int ZEND_FASTCALL  ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
     980             : {
     981     1528835 :         USE_OPLINE
     982             : 
     983             :         SAVE_OPLINE();
     984     1528835 :         Z_LVAL(EX_T(opline->result.var).tmp_var) = EG(error_reporting);
     985     1528835 :         Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_LONG;  /* shouldn't be necessary */
     986     1528835 :         if (EX(old_error_reporting) == NULL) {
     987     1528822 :                 EX(old_error_reporting) = &EX_T(opline->result.var).tmp_var;
     988             :         }
     989             : 
     990     1528835 :         if (EG(error_reporting)) {
     991             :                 do {
     992     1262227 :                         EG(error_reporting) = 0;
     993     1262227 :                         if (!EG(error_reporting_ini_entry)) {
     994        2925 :                                 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     1262227 :                         if (!EG(error_reporting_ini_entry)->modified) {
     999        2854 :                                 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        2854 :                                 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        2854 :                                         EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
    1005        2854 :                                         EG(error_reporting_ini_entry)->orig_value_length = EG(error_reporting_ini_entry)->value_length;
    1006        2854 :                                         EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
    1007        2854 :                                         EG(error_reporting_ini_entry)->modified = 1;
    1008             :                                 }
    1009     1259373 :                         } else if (EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value) {
    1010     1259373 :                                 efree(EG(error_reporting_ini_entry)->value);
    1011             :                         }
    1012     1262227 :                         EG(error_reporting_ini_entry)->value = estrndup("0", sizeof("0")-1);
    1013     1262227 :                         EG(error_reporting_ini_entry)->value_length = sizeof("0")-1;
    1014             :                 } while (0);
    1015             :         }
    1016             :         CHECK_EXCEPTION();
    1017     1528835 :         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         417 : static int ZEND_FASTCALL  ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1058             : {
    1059         417 :         USE_OPLINE
    1060             : 
    1061             :         SAVE_OPLINE();
    1062         417 :         EX_T(opline->result.var).class_entry = do_bind_class(EX(op_array), opline, EG(class_table), 0 TSRMLS_CC);
    1063             :         CHECK_EXCEPTION();
    1064         415 :         ZEND_VM_NEXT_OPCODE();
    1065             : }
    1066             : 
    1067        1256 : static int ZEND_FASTCALL  ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1068             : {
    1069        1256 :         USE_OPLINE
    1070             : 
    1071             :         SAVE_OPLINE();
    1072        1256 :         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        1253 :         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        3505 : static int ZEND_FASTCALL  ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1093             : {
    1094        3505 :         USE_OPLINE
    1095             : 
    1096             :         SAVE_OPLINE();
    1097        3505 :         do_bind_function(EX(op_array), opline, EG(function_table), 0);
    1098             :         CHECK_EXCEPTION();
    1099        3505 :         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       20381 : static int ZEND_FASTCALL  ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1123             : {
    1124       20381 :         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        1615 : static int ZEND_FASTCALL  ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1169             : {
    1170        1615 :         zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
    1171             :         int i;
    1172        1615 :         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        1615 :         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        3300 :         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        4293 :         for (i=0; i<EG(active_op_array)->last_try_catch; i++) {
    1187        3106 :                 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        2678 :                 if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
    1192        1146 :                         catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
    1193             :                 }
    1194        2678 :                 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        5310 :                 if (op_num >= EG(active_op_array)->try_catch_array[i].finally_op &&
    1198        2632 :                                 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        1615 :         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        2088 :         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        1615 :         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        1615 :         EX(old_error_reporting) = NULL;
    1260             : 
    1261        1615 :         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        1601 :         } else if (catch_op_num) {
    1271        1115 :                 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        1115 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]);
    1279        1115 :                 ZEND_VM_CONTINUE();
    1280             :         } else {
    1281         486 :                 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         486 :                 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         479 :                         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    1289             :                 }
    1290             :         }
    1291             : }
    1292             : 
    1293         249 : static int ZEND_FASTCALL  ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1294             : {
    1295         249 :         USE_OPLINE
    1296             : 
    1297             :         SAVE_OPLINE();
    1298         249 :         zend_verify_abstract_class(EX_T(opline->op1.var).class_entry TSRMLS_CC);
    1299             :         CHECK_EXCEPTION();
    1300         244 :         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      461404 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1387             : {
    1388      461404 :         USE_OPLINE
    1389             : 
    1390             :         SAVE_OPLINE();
    1391      461404 :         if (EG(exception)) {
    1392           0 :                 zend_exception_save(TSRMLS_C);
    1393             :         }
    1394      461404 :         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      461404 :                 zval *class_name = opline->op2.zv;
    1401             : 
    1402             :                 if (IS_CONST == IS_CONST) {
    1403      461404 :                         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       13140 :                                 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       13126 :                                 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      461390 :                 ZEND_VM_NEXT_OPCODE();
    1422             :         }
    1423             : }
    1424             : 
    1425      406309 : static int ZEND_FASTCALL  ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1426             : {
    1427      406309 :         USE_OPLINE
    1428             :         zval *function_name;
    1429      406309 :         call_slot *call = EX(call_slots) + opline->result.num;
    1430             : 
    1431             :         if (IS_CONST == IS_CONST) {
    1432      406309 :                 function_name = (zval*)(opline->op2.literal+1);
    1433      406309 :                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    1434      403025 :                         call->fbc = CACHED_PTR(opline->op2.literal->cache_slot);
    1435        3284 :                 } 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        3270 :                         CACHE_PTR(opline->op2.literal->cache_slot, call->fbc);
    1440             :                 }
    1441             : 
    1442      406295 :                 call->object = NULL;
    1443      406295 :                 call->called_scope = NULL;
    1444      406295 :                 call->num_additional_args = 0;
    1445      406295 :                 call->is_ctor_call = 0;
    1446      406295 :                 EX(call) = call;
    1447             : 
    1448             :                 /*CHECK_EXCEPTION();*/
    1449      406295 :                 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      311789 : static int ZEND_FASTCALL  ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1613             : {
    1614      311789 :         USE_OPLINE
    1615             :         zval *assignment_value;
    1616      311789 :         zend_uint arg_num = opline->op1.num;
    1617      623578 :         zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
    1618             :         zval **var_ptr;
    1619             : 
    1620             :         SAVE_OPLINE();
    1621      311789 :         if (param == NULL) {
    1622      101189 :                 ALLOC_ZVAL(assignment_value);
    1623      101189 :                 *assignment_value = *opline->op2.zv;
    1624      101305 :                 if (IS_CONSTANT_TYPE(Z_TYPE_P(assignment_value))) {
    1625         136 :                         Z_SET_REFCOUNT_P(assignment_value, 1);
    1626         136 :                         zval_update_constant(&assignment_value, 0 TSRMLS_CC);
    1627             :                 } else {
    1628      101053 :                         zval_copy_ctor(assignment_value);
    1629             :                 }
    1630      101169 :                 INIT_PZVAL(assignment_value);
    1631             :         } else {
    1632      210600 :                 assignment_value = *param;
    1633      210600 :                 Z_ADDREF_P(assignment_value);
    1634             :         }
    1635             : 
    1636      311769 :         zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
    1637      623534 :         var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->result.var TSRMLS_CC);
    1638      311767 :         zval_ptr_dtor(var_ptr);
    1639      311767 :         *var_ptr = assignment_value;
    1640             : 
    1641             :         CHECK_EXCEPTION();
    1642      311767 :         ZEND_VM_NEXT_OPCODE();
    1643             : }
    1644             : 
    1645       34529 : static int ZEND_FASTCALL  ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1646             : {
    1647       34529 :         USE_OPLINE
    1648             :         zend_brk_cont_element *el;
    1649             : 
    1650             :         SAVE_OPLINE();
    1651       34529 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1652       34529 :                            EX(op_array), execute_data TSRMLS_CC);
    1653       34529 :         ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
    1654             : }
    1655             : 
    1656       45316 : static int ZEND_FASTCALL  ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1657             : {
    1658       45316 :         USE_OPLINE
    1659             :         zend_brk_cont_element *el;
    1660             : 
    1661             :         SAVE_OPLINE();
    1662       45316 :         el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
    1663       45316 :                            EX(op_array), execute_data TSRMLS_CC);
    1664       45316 :         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         365 : static int ZEND_FASTCALL  ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    1695             : {
    1696         365 :         USE_OPLINE
    1697         365 :         zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
    1698             :         zend_class_entry *iface;
    1699             : 
    1700             :         SAVE_OPLINE();
    1701         365 :         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    1702           0 :                 iface = CACHED_PTR(opline->op2.literal->cache_slot);
    1703             :         } else {
    1704         365 :                 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         363 :                 if (UNEXPECTED(iface == NULL)) {
    1706             :                         CHECK_EXCEPTION();
    1707           1 :                         ZEND_VM_NEXT_OPCODE();
    1708             :                 }
    1709         362 :                 CACHE_PTR(opline->op2.literal->cache_slot, iface);
    1710             :         }
    1711             : 
    1712         362 :         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         358 :         zend_do_implement_interface(ce, iface TSRMLS_CC);
    1716             : 
    1717             :         CHECK_EXCEPTION();
    1718         335 :         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        3084 : static int ZEND_FASTCALL  ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2120             : {
    2121        3084 :         USE_OPLINE
    2122             : 
    2123             :         SAVE_OPLINE();
    2124        3084 :         if (EG(exception)) {
    2125           0 :                 zend_exception_save(TSRMLS_C);
    2126             :         }
    2127             :         if (IS_UNUSED == IS_UNUSED) {
    2128        3084 :                 EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
    2129             :                 CHECK_EXCEPTION();
    2130        3084 :                 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       49031 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2381             : {
    2382       49031 :         USE_OPLINE
    2383             : 
    2384             :         zval *z;
    2385             : 
    2386             :         SAVE_OPLINE();
    2387       49031 :         z = opline->op1.zv;
    2388             : 
    2389       49031 :         if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) {
    2390             :                 INIT_PZVAL(z);
    2391             :         }
    2392       49031 :         zend_print_variable(z);
    2393             : 
    2394             :         CHECK_EXCEPTION();
    2395       49030 :         ZEND_VM_NEXT_OPCODE();
    2396             : }
    2397             : 
    2398        1562 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2399             : {
    2400        1562 :         USE_OPLINE
    2401             : 
    2402        1562 :         ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
    2403        1562 :         return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2404             : }
    2405             : 
    2406      954403 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2407             : {
    2408      954403 :         USE_OPLINE
    2409             : 
    2410             :         zval *val;
    2411             :         int ret;
    2412             : 
    2413             :         SAVE_OPLINE();
    2414      954403 :         val = opline->op1.zv;
    2415             : 
    2416      954403 :         if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    2417             :                 ret = Z_LVAL_P(val);
    2418             :         } else {
    2419      954403 :                 ret = i_zend_is_true(val TSRMLS_CC);
    2420             : 
    2421      954403 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2422           0 :                         HANDLE_EXCEPTION();
    2423             :                 }
    2424             :         }
    2425      954403 :         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      954291 :         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      743951 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2467             : {
    2468      743951 :         USE_OPLINE
    2469             : 
    2470             :         zval *val;
    2471             :         int retval;
    2472             : 
    2473             :         SAVE_OPLINE();
    2474      743951 :         val = opline->op1.zv;
    2475             : 
    2476      743951 :         if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    2477             :                 retval = Z_LVAL_P(val);
    2478             :         } else {
    2479      743951 :                 retval = i_zend_is_true(val TSRMLS_CC);
    2480             : 
    2481      743951 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    2482           0 :                         HANDLE_EXCEPTION();
    2483             :                 }
    2484             :         }
    2485      743951 :         if (EXPECTED(retval != 0)) {
    2486             : #if DEBUG_ZEND>=2
    2487             :                 printf("Conditional jmp on true to %d\n", opline->extended_value);
    2488             : #endif
    2489      743951 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    2490      743951 :                 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    19724030 : static int ZEND_FASTCALL  ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2563             : {
    2564    19724030 :         USE_OPLINE
    2565             : 
    2566    19724030 :         zval *fname = opline->op1.zv;
    2567    19724030 :         call_slot *call = EX(call_slots) + opline->op2.num;
    2568             : 
    2569    19724030 :         if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    2570    19549570 :                 EX(function_state).function = CACHED_PTR(opline->op1.literal->cache_slot);
    2571      174460 :         } 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      174458 :                 CACHE_PTR(opline->op1.literal->cache_slot, EX(function_state).function);
    2576             :         }
    2577             : 
    2578    19724028 :         call->fbc = EX(function_state).function;
    2579    19724028 :         call->object = NULL;
    2580    19724028 :         call->called_scope = NULL;
    2581    19724028 :         call->num_additional_args = 0;
    2582    19724028 :         call->is_ctor_call = 0;
    2583    19724028 :         EX(call) = call;
    2584             : 
    2585    19724028 :         return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    2586             : }
    2587             : 
    2588      567680 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2589             : {
    2590      567680 :         USE_OPLINE
    2591             :         zval *retval_ptr;
    2592             : 
    2593             : 
    2594             :         SAVE_OPLINE();
    2595      567680 :         retval_ptr = opline->op1.zv;
    2596             : 
    2597      567680 :         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      245547 :                         ALLOC_ZVAL(ret);
    2606      245547 :                         INIT_PZVAL_COPY(ret, retval_ptr);
    2607             :                         if (IS_CONST != IS_TMP_VAR) {
    2608             :                                 zval_copy_ctor(ret);
    2609             :                         }
    2610      245547 :                         *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      567680 :         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     9874665 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2734             : {
    2735     9874665 :         USE_OPLINE
    2736             : 
    2737             :         SAVE_OPLINE();
    2738     9874665 :         if (opline->extended_value == ZEND_DO_FCALL_BY_NAME) {
    2739      246640 :                 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     9874662 :                 value = opline->op1.zv;
    2750             : 
    2751     9874662 :                 ALLOC_ZVAL(valptr);
    2752     9874662 :                 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     9874662 :         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        6833 : static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    2903             : {
    2904        6833 :         USE_OPLINE
    2905        6833 :         zend_op_array *new_op_array=NULL;
    2906             : 
    2907             :         zval *inc_filename;
    2908        6833 :         zval *tmp_inc_filename = NULL;
    2909        6833 :         zend_bool failure_retval=0;
    2910             : 
    2911             :         SAVE_OPLINE();
    2912        6833 :         inc_filename = opline->op1.zv;
    2913             : 
    2914        6833 :         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        6833 :         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        6833 :                 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        4215 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
    2936        4215 :                                         if (resolved_path) {
    2937        4211 :                                                 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        4215 :                                         if (failure_retval) {
    2943             :                                                 /* do nothing, file already included */
    2944        3571 :                                         } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
    2945             : 
    2946        3569 :                                                 if (!file_handle.opened_path) {
    2947           4 :                                                         file_handle.opened_path = estrdup(resolved_path);
    2948             :                                                 }
    2949             : 
    2950        3569 :                                                 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
    2951        3568 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
    2952        3568 :                                                         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        4213 :                                         if (resolved_path != Z_STRVAL_P(inc_filename)) {
    2965        4211 :                                                 efree(resolved_path);
    2966             :                                         }
    2967             :                                 }
    2968        4213 :                                 break;
    2969             :                         case ZEND_INCLUDE:
    2970             :                         case ZEND_REQUIRE:
    2971        2563 :                                 new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
    2972        2561 :                                 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        6827 :         if (tmp_inc_filename) {
    2984           0 :                 zval_ptr_dtor(&tmp_inc_filename);
    2985             :         }
    2986             : 
    2987        6827 :         if (UNEXPECTED(EG(exception) != NULL)) {
    2988           0 :                 HANDLE_EXCEPTION();
    2989        6827 :         } else if (EXPECTED(new_op_array != NULL)) {
    2990        6171 :                 EX(original_return_value) = EG(return_value_ptr_ptr);
    2991        6171 :                 EG(active_op_array) = new_op_array;
    2992        6171 :                 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        6171 :                         EG(return_value_ptr_ptr) = NULL;
    2997             :                 }
    2998             : 
    2999        6171 :                 EX(function_state).function = (zend_function *) new_op_array;
    3000        6171 :                 EX(object) = NULL;
    3001             : 
    3002        6171 :                 if (!EG(active_symbol_table)) {
    3003          27 :                         zend_rebuild_symbol_table(TSRMLS_C);
    3004             :                 }
    3005             : 
    3006        6171 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    3007        6171 :                         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         656 :         } 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         656 :         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         824 : static int ZEND_FASTCALL  ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3198             : {
    3199             : #if 0 || (IS_CONST != IS_UNUSED)
    3200         824 :         USE_OPLINE
    3201             : 
    3202             :         SAVE_OPLINE();
    3203             :         if (IS_CONST != IS_UNUSED) {
    3204             : 
    3205         824 :                 zval *ptr = opline->op1.zv;
    3206             : 
    3207         824 :                 if (Z_TYPE_P(ptr) == IS_LONG) {
    3208          32 :                         EG(exit_status) = Z_LVAL_P(ptr);
    3209             :                 } else {
    3210         792 :                         zend_print_variable(ptr);
    3211             :                 }
    3212             : 
    3213             :         }
    3214             : #endif
    3215         824 :         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      478846 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3279             : {
    3280      478846 :         USE_OPLINE
    3281             : 
    3282             :         zval *value;
    3283             : 
    3284             :         SAVE_OPLINE();
    3285      478846 :         value = opline->op1.zv;
    3286             : 
    3287      478846 :         ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
    3288             :         if (!0) {
    3289      478846 :                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    3290             :         }
    3291             : 
    3292             :         CHECK_EXCEPTION();
    3293      478846 :         ZEND_VM_NEXT_OPCODE();
    3294             : }
    3295             : 
    3296       42024 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3297             : {
    3298       42024 :         USE_OPLINE
    3299             : 
    3300             :         zval *value, *ret;
    3301             : 
    3302             :         SAVE_OPLINE();
    3303       42024 :         value = opline->op1.zv;
    3304             : 
    3305       42024 :         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       42024 :                 ALLOC_ZVAL(ret);
    3311       42024 :                 INIT_PZVAL_COPY(ret, value);
    3312       42024 :                 EX_T(opline->result.var).var.ptr = ret;
    3313       42024 :                 EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    3314             :                 if (!0) {
    3315       42024 :                         zval_copy_ctor(EX_T(opline->result.var).var.ptr);
    3316             :                 }
    3317             :         }
    3318             : 
    3319             :         CHECK_EXCEPTION();
    3320       42024 :         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       23922 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3429             : {
    3430       23922 :         USE_OPLINE
    3431             : 
    3432             : 
    3433             :         SAVE_OPLINE();
    3434       23922 :         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       23922 :         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      123955 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3540             : {
    3541      123955 :         USE_OPLINE
    3542             : 
    3543             : 
    3544             :         SAVE_OPLINE();
    3545      123955 :         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      123955 :         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, (void*) 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       10049 : static int ZEND_FASTCALL  ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    3942             : {
    3943       10049 :         USE_OPLINE
    3944             : 
    3945             :         SAVE_OPLINE();
    3946       10049 :         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             :                 CHECK_EXCEPTION();
    3975             :                 ZEND_VM_NEXT_OPCODE();
    3976             :         } else {
    3977             :                 /* class constant */
    3978             :                 zend_class_entry *ce;
    3979             :                 zval **value;
    3980             : 
    3981             :                 if (IS_CONST == IS_CONST) {
    3982       10049 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    3983        1982 :                                 value = CACHED_PTR(opline->op2.literal->cache_slot);
    3984        1982 :                                 ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
    3985        1982 :                                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    3986             :                                 CHECK_EXCEPTION();
    3987        1982 :                                 ZEND_VM_NEXT_OPCODE();
    3988        8067 :                         } else if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    3989           0 :                                 ce = CACHED_PTR(opline->op1.literal->cache_slot);
    3990             :                         } else {
    3991        8067 :                                 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);
    3992        8066 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    3993           1 :                                         HANDLE_EXCEPTION();
    3994             :                                 }
    3995        8065 :                                 if (UNEXPECTED(ce == NULL)) {
    3996           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    3997             :                                 }
    3998        8065 :                                 CACHE_PTR(opline->op1.literal->cache_slot, ce);
    3999             :                         }
    4000             :                 } else {
    4001             :                         ce = EX_T(opline->op1.var).class_entry;
    4002             :                         if ((value = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce)) != NULL) {
    4003             :                                 ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
    4004             :                                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    4005             :                                 CHECK_EXCEPTION();
    4006             :                                 ZEND_VM_NEXT_OPCODE();
    4007             :                         }
    4008             :                 }
    4009             : 
    4010        8065 :                 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)) {
    4011        8063 :                         if (IS_CONSTANT_TYPE(Z_TYPE_PP(value))) {
    4012          27 :                                 zend_class_entry *old_scope = EG(scope);
    4013             : 
    4014          27 :                                 EG(scope) = ce;
    4015          27 :                                 zval_update_constant(value, (void *) 1 TSRMLS_CC);
    4016          25 :                                 EG(scope) = old_scope;
    4017             :                         }
    4018             :                         if (IS_CONST == IS_CONST) {
    4019        8061 :                                 CACHE_PTR(opline->op2.literal->cache_slot, value);
    4020             :                         } else {
    4021             :                                 CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, value);
    4022             :                         }
    4023        8061 :                         ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
    4024        8061 :                         zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    4025           2 :                 } else if (Z_STRLEN_P(opline->op2.zv) == sizeof("class")-1 && memcmp(Z_STRVAL_P(opline->op2.zv), "class", sizeof("class") - 1) == 0) {
    4026             :                         /* "class" is assigned as a case-sensitive keyword from zend_do_resolve_class_name */
    4027           0 :                         ZVAL_STRINGL(&EX_T(opline->result.var).tmp_var, ce->name, ce->name_length, 1);
    4028             :                 } else {
    4029           2 :                         zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
    4030             :                 }
    4031             : 
    4032             :                 CHECK_EXCEPTION();
    4033        8061 :                 ZEND_VM_NEXT_OPCODE();
    4034             :         }
    4035             : }
    4036             : 
    4037       77040 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4038             : {
    4039       77040 :         USE_OPLINE
    4040             : 
    4041             :         zval *expr_ptr;
    4042             : 
    4043             :         SAVE_OPLINE();
    4044       77040 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    4045             :                 zval **expr_ptr_ptr = NULL;
    4046             : 
    4047             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    4048             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    4049             :                 }
    4050             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    4051             :                 expr_ptr = *expr_ptr_ptr;
    4052             :                 Z_ADDREF_P(expr_ptr);
    4053             :         } else {
    4054       77040 :                 expr_ptr=opline->op1.zv;
    4055       77040 :                 if (0) { /* temporary variable */
    4056             :                         zval *new_expr;
    4057             : 
    4058             :                         ALLOC_ZVAL(new_expr);
    4059             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    4060             :                         expr_ptr = new_expr;
    4061             :                 } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    4062             :                         zval *new_expr;
    4063             : 
    4064       77040 :                         ALLOC_ZVAL(new_expr);
    4065       77040 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    4066       77040 :                         expr_ptr = new_expr;
    4067       77040 :                         zendi_zval_copy_ctor(*expr_ptr);
    4068             : 
    4069             :                 } else if (IS_CONST == IS_CV) {
    4070             :                         Z_ADDREF_P(expr_ptr);
    4071             :                 }
    4072             :         }
    4073             : 
    4074             :         if (IS_CONST != IS_UNUSED) {
    4075             : 
    4076       77040 :                 zval *offset = opline->op2.zv;
    4077             :                 ulong hval;
    4078             : 
    4079       77040 :                 switch (Z_TYPE_P(offset)) {
    4080             :                         case IS_DOUBLE:
    4081         546 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    4082         273 :                                 goto num_index;
    4083             :                         case IS_LONG:
    4084             :                         case IS_BOOL:
    4085        2792 :                                 hval = Z_LVAL_P(offset);
    4086             : num_index:
    4087        3065 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    4088        3065 :                                 break;
    4089             :                         case IS_STRING:
    4090             :                                 if (IS_CONST == IS_CONST) {
    4091       73852 :                                         hval = Z_HASH_P(offset);
    4092             :                                 } else {
    4093             :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    4094             :                                         hval = str_hash(Z_STRVAL_P(offset), Z_STRLEN_P(offset));
    4095             :                                 }
    4096       73852 :                                 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);
    4097       73852 :                                 break;
    4098             :                         case IS_NULL:
    4099         123 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    4100         123 :                                 break;
    4101             :                         default:
    4102           0 :                                 zend_error(E_WARNING, "Illegal offset type");
    4103           0 :                                 zval_ptr_dtor(&expr_ptr);
    4104             :                                 /* do nothing */
    4105             :                                 break;
    4106             :                 }
    4107             : 
    4108             :         } else {
    4109             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    4110             :         }
    4111             :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    4112             : 
    4113             :         }
    4114             :         CHECK_EXCEPTION();
    4115       77040 :         ZEND_VM_NEXT_OPCODE();
    4116             : }
    4117             : 
    4118       40519 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4119             : {
    4120       40519 :         USE_OPLINE
    4121             : 
    4122       40519 :         array_init(&EX_T(opline->result.var).tmp_var);
    4123       40519 :         if (IS_CONST == IS_UNUSED) {
    4124             :                 ZEND_VM_NEXT_OPCODE();
    4125             : #if 0 || IS_CONST != IS_UNUSED
    4126             :         } else {
    4127       40519 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    4128             : #endif
    4129             :         }
    4130             : }
    4131             : 
    4132           1 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4133             : {
    4134           1 :         USE_OPLINE
    4135             :         zval tmp, *varname;
    4136             :         HashTable *target_symbol_table;
    4137             : 
    4138             : 
    4139             :         SAVE_OPLINE();
    4140           1 :         if (IS_CONST == IS_CV &&
    4141             :             IS_CONST == IS_UNUSED &&
    4142             :             (opline->extended_value & ZEND_QUICK_SET)) {
    4143             :                 if (EG(active_symbol_table)) {
    4144             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    4145             : 
    4146             :                         zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table),  cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
    4147             :                         EX_CV(opline->op1.var) = NULL;
    4148             :                 } else if (EX_CV(opline->op1.var)) {
    4149             :                         zval_ptr_dtor(EX_CV(opline->op1.var));
    4150             :                         EX_CV(opline->op1.var) = NULL;
    4151             :                 }
    4152             :                 CHECK_EXCEPTION();
    4153             :                 ZEND_VM_NEXT_OPCODE();
    4154             :         }
    4155             : 
    4156           1 :         varname = opline->op1.zv;
    4157             : 
    4158           1 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    4159             :                 ZVAL_COPY_VALUE(&tmp, varname);
    4160             :                 zval_copy_ctor(&tmp);
    4161             :                 convert_to_string(&tmp);
    4162             :                 varname = &tmp;
    4163           1 :         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    4164             :                 Z_ADDREF_P(varname);
    4165             :         }
    4166             : 
    4167             :         if (IS_CONST != IS_UNUSED) {
    4168             :                 zend_class_entry *ce;
    4169             : 
    4170             :                 if (IS_CONST == IS_CONST) {
    4171           1 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    4172           0 :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    4173             :                         } else {
    4174           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);
    4175           1 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4176           1 :                                         if (IS_CONST != IS_CONST && varname == &tmp) {
    4177             :                                                 zval_dtor(&tmp);
    4178           1 :                                         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    4179             :                                                 zval_ptr_dtor(&varname);
    4180             :                                         }
    4181             : 
    4182           1 :                                         HANDLE_EXCEPTION();
    4183             :                                 }
    4184           0 :                                 if (UNEXPECTED(ce == NULL)) {
    4185           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    4186             :                                 }
    4187           0 :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    4188             :                         }
    4189             :                 } else {
    4190             :                         ce = EX_T(opline->op2.var).class_entry;
    4191             :                 }
    4192           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);
    4193             :         } else {
    4194             :                 ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
    4195             : 
    4196             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    4197             :                 zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
    4198             :         }
    4199             : 
    4200           0 :         if (IS_CONST != IS_CONST && varname == &tmp) {
    4201             :                 zval_dtor(&tmp);
    4202           0 :         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    4203             :                 zval_ptr_dtor(&varname);
    4204             :         }
    4205             : 
    4206             :         CHECK_EXCEPTION();
    4207           0 :         ZEND_VM_NEXT_OPCODE();
    4208             : }
    4209             : 
    4210          44 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4211             : {
    4212          44 :         USE_OPLINE
    4213             :         zval **value;
    4214          44 :         zend_bool isset = 1;
    4215             : 
    4216             :         SAVE_OPLINE();
    4217          44 :         if (IS_CONST == IS_CV &&
    4218             :             IS_CONST == IS_UNUSED &&
    4219             :             (opline->extended_value & ZEND_QUICK_SET)) {
    4220             :                 if (EX_CV(opline->op1.var)) {
    4221             :                         value = EX_CV(opline->op1.var);
    4222             :                 } else if (EG(active_symbol_table)) {
    4223             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    4224             : 
    4225             :                         if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
    4226             :                                 isset = 0;
    4227             :                         }
    4228             :                 } else {
    4229             :                         isset = 0;
    4230             :                 }
    4231             :         } else {
    4232             :                 HashTable *target_symbol_table;
    4233             : 
    4234          44 :                 zval tmp, *varname = opline->op1.zv;
    4235             : 
    4236          44 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    4237             :                         ZVAL_COPY_VALUE(&tmp, varname);
    4238             :                         zval_copy_ctor(&tmp);
    4239             :                         convert_to_string(&tmp);
    4240             :                         varname = &tmp;
    4241             :                 }
    4242             : 
    4243             :                 if (IS_CONST != IS_UNUSED) {
    4244             :                         zend_class_entry *ce;
    4245             : 
    4246             :                         if (IS_CONST == IS_CONST) {
    4247          44 :                                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    4248           0 :                                         ce = CACHED_PTR(opline->op2.literal->cache_slot);
    4249             :                                 } else {
    4250          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);
    4251          44 :                                         if (UNEXPECTED(ce == NULL)) {
    4252             :                                                 CHECK_EXCEPTION();
    4253           1 :                                                 ZEND_VM_NEXT_OPCODE();
    4254             :                                         }
    4255          43 :                                         CACHE_PTR(opline->op2.literal->cache_slot, ce);
    4256             :                                 }
    4257             :                         } else {
    4258             :                                 ce = EX_T(opline->op2.var).class_entry;
    4259             :                         }
    4260          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);
    4261          43 :                         if (!value) {
    4262          21 :                                 isset = 0;
    4263             :                         }
    4264             :                 } else {
    4265             :                         target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    4266             :                         if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
    4267             :                                 isset = 0;
    4268             :                         }
    4269             :                 }
    4270             : 
    4271          43 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    4272             :                         zval_dtor(&tmp);
    4273             :                 }
    4274             : 
    4275             :         }
    4276             : 
    4277          43 :         if (opline->extended_value & ZEND_ISSET) {
    4278          64 :                 if (isset && Z_TYPE_PP(value) != IS_NULL) {
    4279          21 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    4280             :                 } else {
    4281          22 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    4282             :                 }
    4283             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    4284           0 :                 if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
    4285           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    4286             :                 } else {
    4287           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    4288             :                 }
    4289             :         }
    4290             : 
    4291             :         CHECK_EXCEPTION();
    4292          43 :         ZEND_VM_NEXT_OPCODE();
    4293             : }
    4294             : 
    4295         126 : static int ZEND_FASTCALL  ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4296             : {
    4297         126 :         USE_OPLINE
    4298             : 
    4299             :         zval *name;
    4300             :         zval *val;
    4301             :         zend_constant c;
    4302             : 
    4303             :         SAVE_OPLINE();
    4304         126 :         name  = opline->op1.zv;
    4305         126 :         val   = opline->op2.zv;
    4306             : 
    4307         131 :         if (IS_CONSTANT_TYPE(Z_TYPE_P(val))) {
    4308             :                 zval tmp;
    4309           5 :                 zval *tmp_ptr = &tmp;
    4310             : 
    4311           5 :                 ZVAL_COPY_VALUE(&tmp, val);
    4312           5 :                 if (Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
    4313             :                         zval_copy_ctor(&tmp);
    4314             :                 }
    4315           5 :                 INIT_PZVAL(&tmp);
    4316           5 :                 zval_update_constant(&tmp_ptr, NULL TSRMLS_CC);
    4317           5 :                 c.value = *tmp_ptr;
    4318             :         } else {
    4319         121 :                 INIT_PZVAL_COPY(&c.value, val);
    4320             :                 zval_copy_ctor(&c.value);
    4321             :         }
    4322         126 :         c.flags = CONST_CS; /* non persistent, case sensetive */
    4323         126 :         c.name = str_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name));
    4324         126 :         c.name_len = Z_STRLEN_P(name)+1;
    4325         126 :         c.module_number = PHP_USER_CONSTANT;
    4326             : 
    4327         126 :         if (zend_register_constant(&c TSRMLS_CC) == FAILURE) {
    4328             :         }
    4329             : 
    4330             : 
    4331             :         CHECK_EXCEPTION();
    4332         126 :         ZEND_VM_NEXT_OPCODE();
    4333             : }
    4334             : 
    4335           9 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4336             : {
    4337           9 :         USE_OPLINE
    4338             : 
    4339             :         /* The generator object is stored in return_value_ptr_ptr */
    4340           9 :         zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
    4341             : 
    4342           9 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    4343           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    4344             :         }
    4345             : 
    4346             :         /* Destroy the previously yielded value */
    4347           9 :         if (generator->value) {
    4348           8 :                 zval_ptr_dtor(&generator->value);
    4349             :         }
    4350             : 
    4351             :         /* Destroy the previously yielded key */
    4352           9 :         if (generator->key) {
    4353           8 :                 zval_ptr_dtor(&generator->key);
    4354             :         }
    4355             : 
    4356             :         /* Set the new yielded value */
    4357             :         if (IS_CONST != IS_UNUSED) {
    4358             : 
    4359             : 
    4360           9 :                 if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    4361             :                         /* Constants and temporary variables aren't yieldable by reference,
    4362             :                          * but we still allow them with a notice. */
    4363             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    4364             :                                 zval *value, *copy;
    4365             : 
    4366           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    4367             : 
    4368           0 :                                 value = opline->op1.zv;
    4369           0 :                                 ALLOC_ZVAL(copy);
    4370           0 :                                 INIT_PZVAL_COPY(copy, value);
    4371             : 
    4372             :                                 /* Temporary variables don't need ctor copying */
    4373             :                                 if (!0) {
    4374             :                                         zval_copy_ctor(copy);
    4375             :                                 }
    4376             : 
    4377           0 :                                 generator->value = copy;
    4378             :                         } else {
    4379             :                                 zval **value_ptr = NULL;
    4380             : 
    4381             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    4382             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    4383             :                                 }
    4384             : 
    4385             :                                 /* If a function call result is yielded and the function did
    4386             :                                  * not return by reference we throw a notice. */
    4387             :                                 if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
    4388             :                                     && !(opline->extended_value == ZEND_RETURNS_FUNCTION
    4389             :                                          && EX_T(opline->op1.var).var.fcall_returned_reference)
    4390             :                                     && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    4391             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    4392             : 
    4393             :                                         Z_ADDREF_PP(value_ptr);
    4394             :                                         generator->value = *value_ptr;
    4395             :                                 } else {
    4396             :                                         SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
    4397             :                                         Z_ADDREF_PP(value_ptr);
    4398             :                                         generator->value = *value_ptr;
    4399             :                                 }
    4400             : 
    4401             :                         }
    4402             :                 } else {
    4403           9 :                         zval *value = opline->op1.zv;
    4404             : 
    4405             :                         /* Consts, temporary variables and references need copying */
    4406             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    4407             :                                 || PZVAL_IS_REF(value)
    4408             :                         ) {
    4409             :                                 zval *copy;
    4410             : 
    4411           9 :                                 ALLOC_ZVAL(copy);
    4412           9 :                                 INIT_PZVAL_COPY(copy, value);
    4413             : 
    4414             :                                 /* Temporary variables don't need ctor copying */
    4415             :                                 if (!0) {
    4416             :                                         zval_copy_ctor(copy);
    4417             :                                 }
    4418             : 
    4419           9 :                                 generator->value = copy;
    4420             : 
    4421             :                         } else {
    4422             :                                 if (IS_CONST == IS_CV) {
    4423             :                                         Z_ADDREF_P(value);
    4424             :                                 }
    4425             :                                 generator->value = value;
    4426             :                         }
    4427             :                 }
    4428             :         } else {
    4429             :                 /* If no value was specified yield null */
    4430             :                 Z_ADDREF(EG(uninitialized_zval));
    4431             :                 generator->value = &EG(uninitialized_zval);
    4432             :         }
    4433             : 
    4434             :         /* Set the new yielded key */
    4435             :         if (IS_CONST != IS_UNUSED) {
    4436             : 
    4437           9 :                 zval *key = opline->op2.zv;
    4438             : 
    4439             :                 /* Consts, temporary variables and references need copying */
    4440             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    4441             :                         || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
    4442             :                 ) {
    4443             :                         zval *copy;
    4444             : 
    4445           9 :                         ALLOC_ZVAL(copy);
    4446           9 :                         INIT_PZVAL_COPY(copy, key);
    4447             : 
    4448             :                         /* Temporary variables don't need ctor copying */
    4449             :                         if (!0) {
    4450             :                                 zval_copy_ctor(copy);
    4451             :                         }
    4452             : 
    4453           9 :                         generator->key = copy;
    4454             :                 } else {
    4455             :                         Z_ADDREF_P(key);
    4456             :                         generator->key = key;
    4457             :                 }
    4458             : 
    4459          20 :                 if (Z_TYPE_P(generator->key) == IS_LONG
    4460          11 :                     && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
    4461             :                 ) {
    4462           2 :                         generator->largest_used_integer_key = Z_LVAL_P(generator->key);
    4463             :                 }
    4464             : 
    4465             :         } else {
    4466             :                 /* If no key was specified we use auto-increment keys */
    4467             :                 generator->largest_used_integer_key++;
    4468             : 
    4469             :                 ALLOC_INIT_ZVAL(generator->key);
    4470             :                 ZVAL_LONG(generator->key, generator->largest_used_integer_key);
    4471             :         }
    4472             : 
    4473           9 :         if (RETURN_VALUE_USED(opline)) {
    4474             :                 /* If the return value of yield is used set the send
    4475             :                  * target and initialize it to NULL */
    4476           0 :                 generator->send_target = &EX_T(opline->result.var).var.ptr;
    4477             :                 Z_ADDREF(EG(uninitialized_zval));
    4478           0 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    4479             :         } else {
    4480           9 :                 generator->send_target = NULL;
    4481             :         }
    4482             : 
    4483             :         /* We increment to the next op, so we are at the correct position when the
    4484             :          * generator is resumed. */
    4485           9 :         ZEND_VM_INC_OPCODE();
    4486             : 
    4487             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    4488             :          * variable in execute_data so we don't resume at an old position. */
    4489             :         SAVE_OPLINE();
    4490             : 
    4491           9 :         ZEND_VM_RETURN();
    4492             : }
    4493             : 
    4494           4 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4495             : {
    4496           4 :         USE_OPLINE
    4497             : 
    4498             : 
    4499             :         SAVE_OPLINE();
    4500           4 :         pow_function(&EX_T(opline->result.var).tmp_var,
    4501             :                 opline->op1.zv,
    4502             :                 opline->op2.zv TSRMLS_CC);
    4503             : 
    4504             : 
    4505             :         CHECK_EXCEPTION();
    4506           4 :         ZEND_VM_NEXT_OPCODE();
    4507             : }
    4508             : 
    4509       72369 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4510             : {
    4511       72369 :         USE_OPLINE
    4512             :         zend_free_op free_op2;
    4513             : 
    4514             :         SAVE_OPLINE();
    4515      144738 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    4516             :                 opline->op1.zv,
    4517             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4518             : 
    4519       72369 :         zval_dtor(free_op2.var);
    4520             :         CHECK_EXCEPTION();
    4521       72369 :         ZEND_VM_NEXT_OPCODE();
    4522             : }
    4523             : 
    4524          45 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4525             : {
    4526          45 :         USE_OPLINE
    4527             :         zend_free_op free_op2;
    4528             : 
    4529             :         SAVE_OPLINE();
    4530          90 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    4531             :                 opline->op1.zv,
    4532             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4533             : 
    4534          45 :         zval_dtor(free_op2.var);
    4535             :         CHECK_EXCEPTION();
    4536          45 :         ZEND_VM_NEXT_OPCODE();
    4537             : }
    4538             : 
    4539           2 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4540             : {
    4541           2 :         USE_OPLINE
    4542             :         zend_free_op free_op2;
    4543             : 
    4544             :         SAVE_OPLINE();
    4545           4 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    4546             :                 opline->op1.zv,
    4547             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4548             : 
    4549           2 :         zval_dtor(free_op2.var);
    4550             :         CHECK_EXCEPTION();
    4551           2 :         ZEND_VM_NEXT_OPCODE();
    4552             : }
    4553             : 
    4554           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4555             : {
    4556           0 :         USE_OPLINE
    4557             :         zend_free_op free_op2;
    4558             : 
    4559             :         SAVE_OPLINE();
    4560           0 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    4561             :                 opline->op1.zv,
    4562             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4563             : 
    4564           0 :         zval_dtor(free_op2.var);
    4565             :         CHECK_EXCEPTION();
    4566           0 :         ZEND_VM_NEXT_OPCODE();
    4567             : }
    4568             : 
    4569           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4570             : {
    4571           0 :         USE_OPLINE
    4572             :         zend_free_op free_op2;
    4573             : 
    4574             :         SAVE_OPLINE();
    4575           0 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    4576             :                 opline->op1.zv,
    4577             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4578             : 
    4579           0 :         zval_dtor(free_op2.var);
    4580             :         CHECK_EXCEPTION();
    4581           0 :         ZEND_VM_NEXT_OPCODE();
    4582             : }
    4583             : 
    4584           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4585             : {
    4586           0 :         USE_OPLINE
    4587             :         zend_free_op free_op2;
    4588             : 
    4589             :         SAVE_OPLINE();
    4590           0 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    4591             :                 opline->op1.zv,
    4592             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4593             : 
    4594           0 :         zval_dtor(free_op2.var);
    4595             :         CHECK_EXCEPTION();
    4596           0 :         ZEND_VM_NEXT_OPCODE();
    4597             : }
    4598             : 
    4599           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4600             : {
    4601           0 :         USE_OPLINE
    4602             :         zend_free_op free_op2;
    4603             : 
    4604             :         SAVE_OPLINE();
    4605           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    4606             :                 opline->op1.zv,
    4607             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4608             : 
    4609           0 :         zval_dtor(free_op2.var);
    4610             :         CHECK_EXCEPTION();
    4611           0 :         ZEND_VM_NEXT_OPCODE();
    4612             : }
    4613             : 
    4614        1803 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4615             : {
    4616        1803 :         USE_OPLINE
    4617             :         zend_free_op free_op2;
    4618             : 
    4619             :         SAVE_OPLINE();
    4620        3606 :         concat_function(&EX_T(opline->result.var).tmp_var,
    4621             :                 opline->op1.zv,
    4622             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4623             : 
    4624        1803 :         zval_dtor(free_op2.var);
    4625             :         CHECK_EXCEPTION();
    4626        1803 :         ZEND_VM_NEXT_OPCODE();
    4627             : }
    4628             : 
    4629           0 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4630             : {
    4631           0 :         USE_OPLINE
    4632             :         zend_free_op free_op2;
    4633             : 
    4634             :         SAVE_OPLINE();
    4635           0 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    4636             :                 opline->op1.zv,
    4637             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4638             : 
    4639           0 :         zval_dtor(free_op2.var);
    4640             :         CHECK_EXCEPTION();
    4641           0 :         ZEND_VM_NEXT_OPCODE();
    4642             : }
    4643             : 
    4644           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4645             : {
    4646           0 :         USE_OPLINE
    4647             :         zend_free_op free_op2;
    4648           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4649             : 
    4650             :         SAVE_OPLINE();
    4651           0 :         is_identical_function(result,
    4652             :                 opline->op1.zv,
    4653             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4654           0 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    4655             : 
    4656           0 :         zval_dtor(free_op2.var);
    4657             :         CHECK_EXCEPTION();
    4658           0 :         ZEND_VM_NEXT_OPCODE();
    4659             : }
    4660             : 
    4661          12 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4662             : {
    4663          12 :         USE_OPLINE
    4664             :         zend_free_op free_op2;
    4665          12 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4666             : 
    4667             :         SAVE_OPLINE();
    4668          36 :         ZVAL_BOOL(result, fast_equal_function(result,
    4669             :                 opline->op1.zv,
    4670             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    4671             : 
    4672          12 :         zval_dtor(free_op2.var);
    4673             :         CHECK_EXCEPTION();
    4674          12 :         ZEND_VM_NEXT_OPCODE();
    4675             : }
    4676             : 
    4677           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4678             : {
    4679           0 :         USE_OPLINE
    4680             :         zend_free_op free_op2;
    4681           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4682             : 
    4683             :         SAVE_OPLINE();
    4684           0 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    4685             :                 opline->op1.zv,
    4686             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    4687             : 
    4688           0 :         zval_dtor(free_op2.var);
    4689             :         CHECK_EXCEPTION();
    4690           0 :         ZEND_VM_NEXT_OPCODE();
    4691             : }
    4692             : 
    4693      490689 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4694             : {
    4695      490689 :         USE_OPLINE
    4696             :         zend_free_op free_op2;
    4697      490689 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4698             : 
    4699             :         SAVE_OPLINE();
    4700     1472067 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    4701             :                 opline->op1.zv,
    4702             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    4703             : 
    4704      490689 :         zval_dtor(free_op2.var);
    4705             :         CHECK_EXCEPTION();
    4706      490689 :         ZEND_VM_NEXT_OPCODE();
    4707             : }
    4708             : 
    4709       18366 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4710             : {
    4711       18366 :         USE_OPLINE
    4712             :         zend_free_op free_op2;
    4713       18366 :         zval *result = &EX_T(opline->result.var).tmp_var;
    4714             : 
    4715             :         SAVE_OPLINE();
    4716       55098 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    4717             :                 opline->op1.zv,
    4718             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    4719             : 
    4720       18366 :         zval_dtor(free_op2.var);
    4721             :         CHECK_EXCEPTION();
    4722       18366 :         ZEND_VM_NEXT_OPCODE();
    4723             : }
    4724             : 
    4725      451806 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4726             : {
    4727      451806 :         USE_OPLINE
    4728             :         zend_free_op free_op2;
    4729             : 
    4730             :         SAVE_OPLINE();
    4731      903612 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    4732             :                 opline->op1.zv,
    4733             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4734             : 
    4735      451806 :         zval_dtor(free_op2.var);
    4736             :         CHECK_EXCEPTION();
    4737      451806 :         ZEND_VM_NEXT_OPCODE();
    4738             : }
    4739             : 
    4740         100 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4741             : {
    4742         100 :         USE_OPLINE
    4743             :         zend_free_op free_op2;
    4744             : 
    4745             :         SAVE_OPLINE();
    4746         200 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    4747             :                 opline->op1.zv,
    4748             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4749             : 
    4750         100 :         zval_dtor(free_op2.var);
    4751             :         CHECK_EXCEPTION();
    4752         100 :         ZEND_VM_NEXT_OPCODE();
    4753             : }
    4754             : 
    4755           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4756             : {
    4757           0 :         USE_OPLINE
    4758             :         zend_free_op free_op2;
    4759             : 
    4760             :         SAVE_OPLINE();
    4761           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    4762             :                 opline->op1.zv,
    4763             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4764             : 
    4765           0 :         zval_dtor(free_op2.var);
    4766             :         CHECK_EXCEPTION();
    4767           0 :         ZEND_VM_NEXT_OPCODE();
    4768             : }
    4769             : 
    4770           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4771             : {
    4772           0 :         USE_OPLINE
    4773             :         zend_free_op free_op2;
    4774             : 
    4775             :         SAVE_OPLINE();
    4776           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    4777             :                 opline->op1.zv,
    4778             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4779             : 
    4780           0 :         zval_dtor(free_op2.var);
    4781             :         CHECK_EXCEPTION();
    4782           0 :         ZEND_VM_NEXT_OPCODE();
    4783             : }
    4784             : 
    4785           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4786             : {
    4787           0 :         USE_OPLINE
    4788             :         zend_free_op free_op2;
    4789             :         zval *container;
    4790             : 
    4791             :         SAVE_OPLINE();
    4792           0 :         container = opline->op1.zv;
    4793           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);
    4794           0 :         zval_dtor(free_op2.var);
    4795             :         if (IS_CONST != IS_VAR || !(opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
    4796             : 
    4797             :         }
    4798             :         CHECK_EXCEPTION();
    4799           0 :         ZEND_VM_NEXT_OPCODE();
    4800             : }
    4801             : 
    4802           0 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4803             : {
    4804           0 :         USE_OPLINE
    4805             :         zval *function_name;
    4806             :         zend_class_entry *ce;
    4807           0 :         call_slot *call = EX(call_slots) + opline->result.num;
    4808             : 
    4809             :         SAVE_OPLINE();
    4810             : 
    4811             :         if (IS_CONST == IS_CONST) {
    4812             :                 /* no function found. try a static method in class */
    4813           0 :                 if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    4814           0 :                         ce = CACHED_PTR(opline->op1.literal->cache_slot);
    4815             :                 } else {
    4816           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);
    4817           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    4818           0 :                                 HANDLE_EXCEPTION();
    4819             :                         }
    4820           0 :                         if (UNEXPECTED(ce == NULL)) {
    4821           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    4822             :                         }
    4823           0 :                         CACHE_PTR(opline->op1.literal->cache_slot, ce);
    4824             :                 }
    4825           0 :                 call->called_scope = ce;
    4826             :         } else {
    4827             :                 ce = EX_T(opline->op1.var).class_entry;
    4828             : 
    4829             :                 if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
    4830             :                         call->called_scope = EG(called_scope);
    4831             :                 } else {
    4832             :                         call->called_scope = ce;
    4833             :                 }
    4834             :         }
    4835             : 
    4836           0 :         if (IS_CONST == IS_CONST &&
    4837             :             IS_TMP_VAR == IS_CONST &&
    4838             :             CACHED_PTR(opline->op2.literal->cache_slot)) {
    4839             :                 call->fbc = CACHED_PTR(opline->op2.literal->cache_slot);
    4840           0 :         } else if (IS_CONST != IS_CONST &&
    4841             :                    IS_TMP_VAR == IS_CONST &&
    4842             :                    (call->fbc = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
    4843             :                 /* do nothing */
    4844             :         } else if (IS_TMP_VAR != IS_UNUSED) {
    4845           0 :                 char *function_name_strval = NULL;
    4846           0 :                 int function_name_strlen = 0;
    4847             :                 zend_free_op free_op2;
    4848             : 
    4849           0 :                 if (IS_TMP_VAR == IS_CONST) {
    4850             :                         function_name_strval = Z_STRVAL_P(opline->op2.zv);
    4851             :                         function_name_strlen = Z_STRLEN_P(opline->op2.zv);
    4852             :                 } else {
    4853           0 :                         function_name = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    4854             : 
    4855           0 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    4856           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    4857           0 :                                         HANDLE_EXCEPTION();
    4858             :                                 }
    4859           0 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    4860             :                         } else {
    4861           0 :                                 function_name_strval = Z_STRVAL_P(function_name);
    4862           0 :                                 function_name_strlen = Z_STRLEN_P(function_name);
    4863             :                         }
    4864             :                 }
    4865             : 
    4866           0 :                 if (function_name_strval) {
    4867           0 :                         if (ce->get_static_method) {
    4868           0 :                                 call->fbc = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
    4869             :                         } else {
    4870           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);
    4871             :                         }
    4872           0 :                         if (UNEXPECTED(call->fbc == NULL)) {
    4873           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
    4874             :                         }
    4875           0 :                         if (IS_TMP_VAR == IS_CONST &&
    4876             :                             EXPECTED(call->fbc->type <= ZEND_USER_FUNCTION) &&
    4877             :                             EXPECTED((call->fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    4878             :                                 if (IS_CONST == IS_CONST) {
    4879             :                                         CACHE_PTR(opline->op2.literal->cache_slot, call->fbc);
    4880             :                                 } else {
    4881             :                                         CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, call->fbc);
    4882             :                                 }
    4883             :                         }
    4884             :                 }
    4885             :                 if (IS_TMP_VAR != IS_CONST) {
    4886           0 :                         zval_dtor(free_op2.var);
    4887             :                 }
    4888             :         } else {
    4889             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    4890             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    4891             :                 }
    4892             :                 if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    4893             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
    4894             :                 }
    4895             :                 call->fbc = ce->constructor;
    4896             :         }
    4897             : 
    4898           0 :         if (call->fbc->common.fn_flags & ZEND_ACC_STATIC) {
    4899           0 :                 call->object = NULL;
    4900             :         } else {
    4901           0 :                 if (EG(This) &&
    4902           0 :                     Z_OBJ_HT_P(EG(This))->get_class_entry &&
    4903           0 :                     !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
    4904             :                     /* We are calling method of the other (incompatible) class,
    4905             :                        but passing $this. This is done for compatibility with php-4. */
    4906           0 :                         if (call->fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    4907           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);
    4908             :                         } else {
    4909             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    4910           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);
    4911             :                         }
    4912             :                 }
    4913           0 :                 if ((call->object = EG(This))) {
    4914           0 :                         Z_ADDREF_P(call->object);
    4915           0 :                         call->called_scope = Z_OBJCE_P(call->object);
    4916             :                 }
    4917             :         }
    4918             : 
    4919           0 :         call->num_additional_args = 0;
    4920           0 :         call->is_ctor_call = 0;
    4921           0 :         EX(call) = call;
    4922             : 
    4923             :         CHECK_EXCEPTION();
    4924           0 :         ZEND_VM_NEXT_OPCODE();
    4925             : }
    4926             : 
    4927          66 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4928             : {
    4929          66 :         USE_OPLINE
    4930             :         zend_free_op free_op2;
    4931             : 
    4932             :         SAVE_OPLINE();
    4933         132 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    4934             :                                  opline->op1.zv,
    4935             :                                  _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    4936             : 
    4937          66 :         zval_dtor(free_op2.var);
    4938             :         CHECK_EXCEPTION();
    4939          66 :         ZEND_VM_NEXT_OPCODE();
    4940             : }
    4941             : 
    4942         220 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    4943             : {
    4944         220 :         USE_OPLINE
    4945             : 
    4946             :         zval *expr_ptr;
    4947             : 
    4948             :         SAVE_OPLINE();
    4949         220 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    4950             :                 zval **expr_ptr_ptr = NULL;
    4951             : 
    4952             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    4953             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    4954             :                 }
    4955             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    4956             :                 expr_ptr = *expr_ptr_ptr;
    4957             :                 Z_ADDREF_P(expr_ptr);
    4958             :         } else {
    4959         220 :                 expr_ptr=opline->op1.zv;
    4960         220 :                 if (0) { /* temporary variable */
    4961             :                         zval *new_expr;
    4962             : 
    4963             :                         ALLOC_ZVAL(new_expr);
    4964             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    4965             :                         expr_ptr = new_expr;
    4966             :                 } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    4967             :                         zval *new_expr;
    4968             : 
    4969         220 :                         ALLOC_ZVAL(new_expr);
    4970         220 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    4971         220 :                         expr_ptr = new_expr;
    4972         220 :                         zendi_zval_copy_ctor(*expr_ptr);
    4973             : 
    4974             :                 } else if (IS_CONST == IS_CV) {
    4975             :                         Z_ADDREF_P(expr_ptr);
    4976             :                 }
    4977             :         }
    4978             : 
    4979             :         if (IS_TMP_VAR != IS_UNUSED) {
    4980             :                 zend_free_op free_op2;
    4981         440 :                 zval *offset = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    4982             :                 ulong hval;
    4983             : 
    4984         220 :                 switch (Z_TYPE_P(offset)) {
    4985             :                         case IS_DOUBLE:
    4986           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    4987           0 :                                 goto num_index;
    4988             :                         case IS_LONG:
    4989             :                         case IS_BOOL:
    4990         148 :                                 hval = Z_LVAL_P(offset);
    4991             : num_index:
    4992         148 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    4993         148 :                                 break;
    4994             :                         case IS_STRING:
    4995          71 :                                 if (IS_TMP_VAR == IS_CONST) {
    4996             :                                         hval = Z_HASH_P(offset);
    4997             :                                 } else {
    4998          71 :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    4999          71 :                                         hval = str_hash(Z_STRVAL_P(offset), Z_STRLEN_P(offset));
    5000             :                                 }
    5001          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);
    5002          71 :                                 break;
    5003             :                         case IS_NULL:
    5004           0 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    5005           0 :                                 break;
    5006             :                         default:
    5007           1 :                                 zend_error(E_WARNING, "Illegal offset type");
    5008           1 :                                 zval_ptr_dtor(&expr_ptr);
    5009             :                                 /* do nothing */
    5010             :                                 break;
    5011             :                 }
    5012         220 :                 zval_dtor(free_op2.var);
    5013             :         } else {
    5014             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    5015             :         }
    5016             :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    5017             : 
    5018             :         }
    5019             :         CHECK_EXCEPTION();
    5020         220 :         ZEND_VM_NEXT_OPCODE();
    5021             : }
    5022             : 
    5023         115 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5024             : {
    5025         115 :         USE_OPLINE
    5026             : 
    5027         115 :         array_init(&EX_T(opline->result.var).tmp_var);
    5028         115 :         if (IS_CONST == IS_UNUSED) {
    5029             :                 ZEND_VM_NEXT_OPCODE();
    5030             : #if 0 || IS_CONST != IS_UNUSED
    5031             :         } else {
    5032         115 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5033             : #endif
    5034             :         }
    5035             : }
    5036             : 
    5037           2 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5038             : {
    5039           2 :         USE_OPLINE
    5040             : 
    5041             :         /* The generator object is stored in return_value_ptr_ptr */
    5042           2 :         zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
    5043             : 
    5044           2 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    5045           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    5046             :         }
    5047             : 
    5048             :         /* Destroy the previously yielded value */
    5049           2 :         if (generator->value) {
    5050           1 :                 zval_ptr_dtor(&generator->value);
    5051             :         }
    5052             : 
    5053             :         /* Destroy the previously yielded key */
    5054           2 :         if (generator->key) {
    5055           1 :                 zval_ptr_dtor(&generator->key);
    5056             :         }
    5057             : 
    5058             :         /* Set the new yielded value */
    5059             :         if (IS_CONST != IS_UNUSED) {
    5060             : 
    5061             : 
    5062           2 :                 if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    5063             :                         /* Constants and temporary variables aren't yieldable by reference,
    5064             :                          * but we still allow them with a notice. */
    5065             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    5066             :                                 zval *value, *copy;
    5067             : 
    5068           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    5069             : 
    5070           0 :                                 value = opline->op1.zv;
    5071           0 :                                 ALLOC_ZVAL(copy);
    5072           0 :                                 INIT_PZVAL_COPY(copy, value);
    5073             : 
    5074             :                                 /* Temporary variables don't need ctor copying */
    5075             :                                 if (!0) {
    5076             :                                         zval_copy_ctor(copy);
    5077             :                                 }
    5078             : 
    5079           0 :                                 generator->value = copy;
    5080             :                         } else {
    5081             :                                 zval **value_ptr = NULL;
    5082             : 
    5083             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    5084             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    5085             :                                 }
    5086             : 
    5087             :                                 /* If a function call result is yielded and the function did
    5088             :                                  * not return by reference we throw a notice. */
    5089             :                                 if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
    5090             :                                     && !(opline->extended_value == ZEND_RETURNS_FUNCTION
    5091             :                                          && EX_T(opline->op1.var).var.fcall_returned_reference)
    5092             :                                     && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    5093             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    5094             : 
    5095             :                                         Z_ADDREF_PP(value_ptr);
    5096             :                                         generator->value = *value_ptr;
    5097             :                                 } else {
    5098             :                                         SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
    5099             :                                         Z_ADDREF_PP(value_ptr);
    5100             :                                         generator->value = *value_ptr;
    5101             :                                 }
    5102             : 
    5103             :                         }
    5104             :                 } else {
    5105           2 :                         zval *value = opline->op1.zv;
    5106             : 
    5107             :                         /* Consts, temporary variables and references need copying */
    5108             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    5109             :                                 || PZVAL_IS_REF(value)
    5110             :                         ) {
    5111             :                                 zval *copy;
    5112             : 
    5113           2 :                                 ALLOC_ZVAL(copy);
    5114           2 :                                 INIT_PZVAL_COPY(copy, value);
    5115             : 
    5116             :                                 /* Temporary variables don't need ctor copying */
    5117             :                                 if (!0) {
    5118             :                                         zval_copy_ctor(copy);
    5119             :                                 }
    5120             : 
    5121           2 :                                 generator->value = copy;
    5122             : 
    5123             :                         } else {
    5124             :                                 if (IS_CONST == IS_CV) {
    5125             :                                         Z_ADDREF_P(value);
    5126             :                                 }
    5127             :                                 generator->value = value;
    5128             :                         }
    5129             :                 }
    5130             :         } else {
    5131             :                 /* If no value was specified yield null */
    5132             :                 Z_ADDREF(EG(uninitialized_zval));
    5133             :                 generator->value = &EG(uninitialized_zval);
    5134             :         }
    5135             : 
    5136             :         /* Set the new yielded key */
    5137             :         if (IS_TMP_VAR != IS_UNUSED) {
    5138             :                 zend_free_op free_op2;
    5139           4 :                 zval *key = _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5140             : 
    5141             :                 /* Consts, temporary variables and references need copying */
    5142             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
    5143             :                         || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
    5144             :                 ) {
    5145             :                         zval *copy;
    5146             : 
    5147           2 :                         ALLOC_ZVAL(copy);
    5148           2 :                         INIT_PZVAL_COPY(copy, key);
    5149             : 
    5150             :                         /* Temporary variables don't need ctor copying */
    5151           2 :                         if (!1) {
    5152             :                                 zval_copy_ctor(copy);
    5153             :                         }
    5154             : 
    5155           2 :                         generator->key = copy;
    5156             :                 } else {
    5157             :                         Z_ADDREF_P(key);
    5158             :                         generator->key = key;
    5159             :                 }
    5160             : 
    5161           4 :                 if (Z_TYPE_P(generator->key) == IS_LONG
    5162           2 :                     && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
    5163             :                 ) {
    5164           0 :                         generator->largest_used_integer_key = Z_LVAL_P(generator->key);
    5165             :                 }
    5166             : 
    5167             :         } else {
    5168             :                 /* If no key was specified we use auto-increment keys */
    5169             :                 generator->largest_used_integer_key++;
    5170             : 
    5171             :                 ALLOC_INIT_ZVAL(generator->key);
    5172             :                 ZVAL_LONG(generator->key, generator->largest_used_integer_key);
    5173             :         }
    5174             : 
    5175           2 :         if (RETURN_VALUE_USED(opline)) {
    5176             :                 /* If the return value of yield is used set the send
    5177             :                  * target and initialize it to NULL */
    5178           0 :                 generator->send_target = &EX_T(opline->result.var).var.ptr;
    5179             :                 Z_ADDREF(EG(uninitialized_zval));
    5180           0 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    5181             :         } else {
    5182           2 :                 generator->send_target = NULL;
    5183             :         }
    5184             : 
    5185             :         /* We increment to the next op, so we are at the correct position when the
    5186             :          * generator is resumed. */
    5187           2 :         ZEND_VM_INC_OPCODE();
    5188             : 
    5189             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    5190             :          * variable in execute_data so we don't resume at an old position. */
    5191             :         SAVE_OPLINE();
    5192             : 
    5193           2 :         ZEND_VM_RETURN();
    5194             : }
    5195             : 
    5196           1 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5197             : {
    5198           1 :         USE_OPLINE
    5199             :         zend_free_op free_op2;
    5200             : 
    5201             :         SAVE_OPLINE();
    5202           2 :         pow_function(&EX_T(opline->result.var).tmp_var,
    5203             :                 opline->op1.zv,
    5204             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5205             : 
    5206           1 :         zval_dtor(free_op2.var);
    5207             :         CHECK_EXCEPTION();
    5208           1 :         ZEND_VM_NEXT_OPCODE();
    5209             : }
    5210             : 
    5211           1 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5212             : {
    5213           1 :         USE_OPLINE
    5214             :         zend_free_op free_op2;
    5215             : 
    5216             :         SAVE_OPLINE();
    5217           2 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    5218             :                 opline->op1.zv,
    5219             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5220             : 
    5221           1 :         zval_ptr_dtor_nogc(&free_op2.var);
    5222             :         CHECK_EXCEPTION();
    5223           1 :         ZEND_VM_NEXT_OPCODE();
    5224             : }
    5225             : 
    5226        2196 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5227             : {
    5228        2196 :         USE_OPLINE
    5229             :         zend_free_op free_op2;
    5230             : 
    5231             :         SAVE_OPLINE();
    5232        4392 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    5233             :                 opline->op1.zv,
    5234             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5235             : 
    5236        2196 :         zval_ptr_dtor_nogc(&free_op2.var);
    5237             :         CHECK_EXCEPTION();
    5238        2196 :         ZEND_VM_NEXT_OPCODE();
    5239             : }
    5240             : 
    5241         621 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5242             : {
    5243         621 :         USE_OPLINE
    5244             :         zend_free_op free_op2;
    5245             : 
    5246             :         SAVE_OPLINE();
    5247        1242 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    5248             :                 opline->op1.zv,
    5249             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5250             : 
    5251         621 :         zval_ptr_dtor_nogc(&free_op2.var);
    5252             :         CHECK_EXCEPTION();
    5253         621 :         ZEND_VM_NEXT_OPCODE();
    5254             : }
    5255             : 
    5256           0 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5257             : {
    5258           0 :         USE_OPLINE
    5259             :         zend_free_op free_op2;
    5260             : 
    5261             :         SAVE_OPLINE();
    5262           0 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    5263             :                 opline->op1.zv,
    5264             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5265             : 
    5266           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5267             :         CHECK_EXCEPTION();
    5268           0 :         ZEND_VM_NEXT_OPCODE();
    5269             : }
    5270             : 
    5271           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5272             : {
    5273           0 :         USE_OPLINE
    5274             :         zend_free_op free_op2;
    5275             : 
    5276             :         SAVE_OPLINE();
    5277           0 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    5278             :                 opline->op1.zv,
    5279             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5280             : 
    5281           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5282             :         CHECK_EXCEPTION();
    5283           0 :         ZEND_VM_NEXT_OPCODE();
    5284             : }
    5285             : 
    5286           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5287             : {
    5288           0 :         USE_OPLINE
    5289             :         zend_free_op free_op2;
    5290             : 
    5291             :         SAVE_OPLINE();
    5292           0 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    5293             :                 opline->op1.zv,
    5294             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5295             : 
    5296           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5297             :         CHECK_EXCEPTION();
    5298           0 :         ZEND_VM_NEXT_OPCODE();
    5299             : }
    5300             : 
    5301           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5302             : {
    5303           0 :         USE_OPLINE
    5304             :         zend_free_op free_op2;
    5305             : 
    5306             :         SAVE_OPLINE();
    5307           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    5308             :                 opline->op1.zv,
    5309             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5310             : 
    5311           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5312             :         CHECK_EXCEPTION();
    5313           0 :         ZEND_VM_NEXT_OPCODE();
    5314             : }
    5315             : 
    5316       49991 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5317             : {
    5318       49991 :         USE_OPLINE
    5319             :         zend_free_op free_op2;
    5320             : 
    5321             :         SAVE_OPLINE();
    5322       99982 :         concat_function(&EX_T(opline->result.var).tmp_var,
    5323             :                 opline->op1.zv,
    5324             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5325             : 
    5326       49991 :         zval_ptr_dtor_nogc(&free_op2.var);
    5327             :         CHECK_EXCEPTION();
    5328       49991 :         ZEND_VM_NEXT_OPCODE();
    5329             : }
    5330             : 
    5331         144 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5332             : {
    5333         144 :         USE_OPLINE
    5334             :         zend_free_op free_op2;
    5335             : 
    5336             :         SAVE_OPLINE();
    5337         288 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    5338             :                 opline->op1.zv,
    5339             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5340             : 
    5341         144 :         zval_ptr_dtor_nogc(&free_op2.var);
    5342             :         CHECK_EXCEPTION();
    5343         144 :         ZEND_VM_NEXT_OPCODE();
    5344             : }
    5345             : 
    5346        7700 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5347             : {
    5348        7700 :         USE_OPLINE
    5349             :         zend_free_op free_op2;
    5350        7700 :         zval *result = &EX_T(opline->result.var).tmp_var;
    5351             : 
    5352             :         SAVE_OPLINE();
    5353       15400 :         is_identical_function(result,
    5354             :                 opline->op1.zv,
    5355             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5356        7700 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    5357             : 
    5358        7700 :         zval_ptr_dtor_nogc(&free_op2.var);
    5359             :         CHECK_EXCEPTION();
    5360        7700 :         ZEND_VM_NEXT_OPCODE();
    5361             : }
    5362             : 
    5363        1997 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5364             : {
    5365        1997 :         USE_OPLINE
    5366             :         zend_free_op free_op2;
    5367        1997 :         zval *result = &EX_T(opline->result.var).tmp_var;
    5368             : 
    5369             :         SAVE_OPLINE();
    5370        5991 :         ZVAL_BOOL(result, fast_equal_function(result,
    5371             :                 opline->op1.zv,
    5372             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    5373             : 
    5374        1997 :         zval_ptr_dtor_nogc(&free_op2.var);
    5375             :         CHECK_EXCEPTION();
    5376        1997 :         ZEND_VM_NEXT_OPCODE();
    5377             : }
    5378             : 
    5379         104 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5380             : {
    5381         104 :         USE_OPLINE
    5382             :         zend_free_op free_op2;
    5383         104 :         zval *result = &EX_T(opline->result.var).tmp_var;
    5384             : 
    5385             :         SAVE_OPLINE();
    5386         312 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    5387             :                 opline->op1.zv,
    5388             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    5389             : 
    5390         104 :         zval_ptr_dtor_nogc(&free_op2.var);
    5391             :         CHECK_EXCEPTION();
    5392         104 :         ZEND_VM_NEXT_OPCODE();
    5393             : }
    5394             : 
    5395      293064 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5396             : {
    5397      293064 :         USE_OPLINE
    5398             :         zend_free_op free_op2;
    5399      293064 :         zval *result = &EX_T(opline->result.var).tmp_var;
    5400             : 
    5401             :         SAVE_OPLINE();
    5402      879192 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    5403             :                 opline->op1.zv,
    5404             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    5405             : 
    5406      293064 :         zval_ptr_dtor_nogc(&free_op2.var);
    5407             :         CHECK_EXCEPTION();
    5408      293064 :         ZEND_VM_NEXT_OPCODE();
    5409             : }
    5410             : 
    5411         150 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5412             : {
    5413         150 :         USE_OPLINE
    5414             :         zend_free_op free_op2;
    5415         150 :         zval *result = &EX_T(opline->result.var).tmp_var;
    5416             : 
    5417             :         SAVE_OPLINE();
    5418         450 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    5419             :                 opline->op1.zv,
    5420             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC));
    5421             : 
    5422         150 :         zval_ptr_dtor_nogc(&free_op2.var);
    5423             :         CHECK_EXCEPTION();
    5424         150 :         ZEND_VM_NEXT_OPCODE();
    5425             : }
    5426             : 
    5427           0 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5428             : {
    5429           0 :         USE_OPLINE
    5430             :         zend_free_op free_op2;
    5431             : 
    5432             :         SAVE_OPLINE();
    5433           0 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    5434             :                 opline->op1.zv,
    5435             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5436             : 
    5437           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5438             :         CHECK_EXCEPTION();
    5439           0 :         ZEND_VM_NEXT_OPCODE();
    5440             : }
    5441             : 
    5442           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5443             : {
    5444           1 :         USE_OPLINE
    5445             :         zend_free_op free_op2;
    5446             : 
    5447             :         SAVE_OPLINE();
    5448           2 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    5449             :                 opline->op1.zv,
    5450             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5451             : 
    5452           1 :         zval_ptr_dtor_nogc(&free_op2.var);
    5453             :         CHECK_EXCEPTION();
    5454           1 :         ZEND_VM_NEXT_OPCODE();
    5455             : }
    5456             : 
    5457           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5458             : {
    5459           0 :         USE_OPLINE
    5460             :         zend_free_op free_op2;
    5461             : 
    5462             :         SAVE_OPLINE();
    5463           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    5464             :                 opline->op1.zv,
    5465             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5466             : 
    5467           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5468             :         CHECK_EXCEPTION();
    5469           0 :         ZEND_VM_NEXT_OPCODE();
    5470             : }
    5471             : 
    5472           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5473             : {
    5474           0 :         USE_OPLINE
    5475             :         zend_free_op free_op2;
    5476             : 
    5477             :         SAVE_OPLINE();
    5478           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    5479             :                 opline->op1.zv,
    5480             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5481             : 
    5482           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5483             :         CHECK_EXCEPTION();
    5484           0 :         ZEND_VM_NEXT_OPCODE();
    5485             : }
    5486             : 
    5487         733 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
    5488             : {
    5489         733 :         USE_OPLINE
    5490             :         zend_free_op free_op1;
    5491             :         zval *varname;
    5492             :         zval **retval;
    5493             :         zval tmp_varname;
    5494             :         HashTable *target_symbol_table;
    5495             :         ulong hash_value;
    5496             : 
    5497             :         SAVE_OPLINE();
    5498         733 :         varname = opline->op1.zv;
    5499             : 
    5500         733 :         if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
    5501             :                 ZVAL_COPY_VALUE(&tmp_varname, varname);
    5502             :                 zval_copy_ctor(&tmp_varname);
    5503             :                 Z_SET_REFCOUNT(tmp_varname, 1);
    5504             :                 Z_UNSET_ISREF(tmp_varname);
    5505             :                 convert_to_string(&tmp_varname);
    5506             :                 varname = &tmp_varname;
    5507             :         }
    5508             : 
    5509             :         if (IS_VAR != IS_UNUSED) {
    5510             :                 zend_class_entry *ce;
    5511             : 
    5512         733 :                 if (IS_VAR == IS_CONST) {
    5513             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    5514             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    5515             :                         } else {
    5516             :                                 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);
    5517             :                                 if (UNEXPECTED(ce == NULL)) {
    5518             :                                         if (IS_CONST != IS_CONST && varname == &tmp_varname) {
    5519             :                                                 zval_dtor(&tmp_varname);
    5520             :                                         }
    5521             : 
    5522             :                                         CHECK_EXCEPTION();
    5523             :                                         ZEND_VM_NEXT_OPCODE();
    5524             :                                 }
    5525             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    5526             :                         }
    5527             :                 } else {
    5528         733 :                         ce = EX_T(opline->op2.var).class_entry;
    5529             :                 }
    5530         733 :                 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);
    5531             : 
    5532             :         } else {
    5533             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    5534             : /*
    5535             :                 if (!target_symbol_table) {
    5536             :                         CHECK_EXCEPTION();
    5537             :                         ZEND_VM_NEXT_OPCODE();
    5538             :                 }
    5539             : */
    5540             :                 if (IS_CONST == IS_CONST) {
    5541             :                         hash_value = Z_HASH_P(varname);
    5542             :                 } else {
    5543             :                         hash_value = str_hash(Z_STRVAL_P(varname), Z_STRLEN_P(varname));
    5544             :                 }
    5545             : 
    5546             :                 if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
    5547             :                         switch (type) {
    5548             :                                 case BP_VAR_R:
    5549             :                                 case BP_VAR_UNSET:
    5550             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    5551             :                                         /* break missing intentionally */
    5552             :                                 case BP_VAR_IS:
    5553             :                                         retval = &EG(uninitialized_zval_ptr);
    5554             :                                         break;
    5555             :                                 case BP_VAR_RW:
    5556             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    5557             :                                         /* break missing intentionally */
    5558             :                                 case BP_VAR_W:
    5559             :                                         Z_ADDREF_P(&EG(uninitialized_zval));
    5560             :                                         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);
    5561             :                                         break;
    5562             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    5563             :                         }
    5564             :                 }
    5565             :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    5566             :                         case ZEND_FETCH_GLOBAL:
    5567             :                                 if (IS_CONST != IS_TMP_VAR) {
    5568             : 
    5569             :                                 }
    5570             :                                 break;
    5571             :                         case ZEND_FETCH_LOCAL:
    5572             : 
    5573             :                                 break;
    5574             :                         case ZEND_FETCH_STATIC:
    5575             :                                 zval_update_constant(retval, (void*) 1 TSRMLS_CC);
    5576             :                                 break;
    5577             :                         case ZEND_FETCH_GLOBAL_LOCK:
    5578             :                                 if (IS_CONST == IS_VAR && !free_op1.var) {
    5579             :                                         PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
    5580             :                                 }
    5581             :                                 break;
    5582             :                 }
    5583             :         }
    5584             : 
    5585             : 
    5586         728 :         if (IS_CONST != IS_CONST && varname == &tmp_varname) {
    5587             :                 zval_dtor(&tmp_varname);
    5588             :         }
    5589         728 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    5590           0 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    5591             :         }
    5592         728 :         PZVAL_LOCK(*retval);
    5593         728 :         switch (type) {
    5594             :                 case BP_VAR_R:
    5595             :                 case BP_VAR_IS:
    5596         538 :                         EX_T(opline->result.var).var.ptr = *retval;
    5597         538 :                         break;
    5598             :                 case BP_VAR_UNSET: {
    5599             :                         zend_free_op free_res;
    5600             : 
    5601           5 :                         PZVAL_UNLOCK(*retval, &free_res);
    5602           5 :                         if (retval != &EG(uninitialized_zval_ptr)) {
    5603          15 :                                 SEPARATE_ZVAL_IF_NOT_REF(retval);
    5604             :                         }
    5605           5 :                         PZVAL_LOCK(*retval);
    5606           5 :                         FREE_OP_VAR_PTR(free_res);
    5607             :                 }
    5608             :                 /* break missing intentionally */
    5609             :                 default:
    5610         190 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    5611             :                         break;
    5612             :         }
    5613             :         CHECK_EXCEPTION();
    5614         728 :         ZEND_VM_NEXT_OPCODE();
    5615             : }
    5616             : 
    5617         520 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5618             : {
    5619         520 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5620             : }
    5621             : 
    5622         136 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5623             : {
    5624         136 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5625             : }
    5626             : 
    5627          51 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5628             : {
    5629          51 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5630             : }
    5631             : 
    5632           7 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5633             : {
    5634           7 :         USE_OPLINE
    5635             : 
    5636          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);
    5637             : }
    5638             : 
    5639           6 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5640             : {
    5641           6 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5642             : }
    5643             : 
    5644          13 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5645             : {
    5646          13 :         return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5647             : }
    5648             : 
    5649           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5650             : {
    5651           0 :         USE_OPLINE
    5652             :         zend_free_op free_op2;
    5653             :         zval *container;
    5654             : 
    5655             :         SAVE_OPLINE();
    5656           0 :         container = opline->op1.zv;
    5657           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);
    5658           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5659             :         if (IS_CONST != IS_VAR || !(opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
    5660             : 
    5661             :         }
    5662             :         CHECK_EXCEPTION();
    5663           0 :         ZEND_VM_NEXT_OPCODE();
    5664             : }
    5665             : 
    5666           2 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5667             : {
    5668           2 :         USE_OPLINE
    5669             :         zval *function_name;
    5670             :         zend_class_entry *ce;
    5671           2 :         call_slot *call = EX(call_slots) + opline->result.num;
    5672             : 
    5673             :         SAVE_OPLINE();
    5674             : 
    5675             :         if (IS_CONST == IS_CONST) {
    5676             :                 /* no function found. try a static method in class */
    5677           2 :                 if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    5678           0 :                         ce = CACHED_PTR(opline->op1.literal->cache_slot);
    5679             :                 } else {
    5680           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);
    5681           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    5682           0 :                                 HANDLE_EXCEPTION();
    5683             :                         }
    5684           2 :                         if (UNEXPECTED(ce == NULL)) {
    5685           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    5686             :                         }
    5687           2 :                         CACHE_PTR(opline->op1.literal->cache_slot, ce);
    5688             :                 }
    5689           2 :                 call->called_scope = ce;
    5690             :         } else {
    5691             :                 ce = EX_T(opline->op1.var).class_entry;
    5692             : 
    5693             :                 if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
    5694             :                         call->called_scope = EG(called_scope);
    5695             :                 } else {
    5696             :                         call->called_scope = ce;
    5697             :                 }
    5698             :         }
    5699             : 
    5700           2 :         if (IS_CONST == IS_CONST &&
    5701             :             IS_VAR == IS_CONST &&
    5702             :             CACHED_PTR(opline->op2.literal->cache_slot)) {
    5703             :                 call->fbc = CACHED_PTR(opline->op2.literal->cache_slot);
    5704           2 :         } else if (IS_CONST != IS_CONST &&
    5705             :                    IS_VAR == IS_CONST &&
    5706             :                    (call->fbc = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
    5707             :                 /* do nothing */
    5708             :         } else if (IS_VAR != IS_UNUSED) {
    5709           2 :                 char *function_name_strval = NULL;
    5710           2 :                 int function_name_strlen = 0;
    5711             :                 zend_free_op free_op2;
    5712             : 
    5713           2 :                 if (IS_VAR == IS_CONST) {
    5714             :                         function_name_strval = Z_STRVAL_P(opline->op2.zv);
    5715             :                         function_name_strlen = Z_STRLEN_P(opline->op2.zv);
    5716             :                 } else {
    5717           4 :                         function_name = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5718             : 
    5719           2 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    5720           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5721           0 :                                         HANDLE_EXCEPTION();
    5722             :                                 }
    5723           0 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    5724             :                         } else {
    5725           2 :                                 function_name_strval = Z_STRVAL_P(function_name);
    5726           2 :                                 function_name_strlen = Z_STRLEN_P(function_name);
    5727             :                         }
    5728             :                 }
    5729             : 
    5730           2 :                 if (function_name_strval) {
    5731           2 :                         if (ce->get_static_method) {
    5732           0 :                                 call->fbc = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
    5733             :                         } else {
    5734           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);
    5735             :                         }
    5736           2 :                         if (UNEXPECTED(call->fbc == NULL)) {
    5737           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
    5738             :                         }
    5739           2 :                         if (IS_VAR == IS_CONST &&
    5740             :                             EXPECTED(call->fbc->type <= ZEND_USER_FUNCTION) &&
    5741             :                             EXPECTED((call->fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    5742             :                                 if (IS_CONST == IS_CONST) {
    5743             :                                         CACHE_PTR(opline->op2.literal->cache_slot, call->fbc);
    5744             :                                 } else {
    5745             :                                         CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, call->fbc);
    5746             :                                 }
    5747             :                         }
    5748             :                 }
    5749             :                 if (IS_VAR != IS_CONST) {
    5750           2 :                         zval_ptr_dtor_nogc(&free_op2.var);
    5751             :                 }
    5752             :         } else {
    5753             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    5754             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    5755             :                 }
    5756             :                 if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    5757             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
    5758             :                 }
    5759             :                 call->fbc = ce->constructor;
    5760             :         }
    5761             : 
    5762           2 :         if (call->fbc->common.fn_flags & ZEND_ACC_STATIC) {
    5763           1 :                 call->object = NULL;
    5764             :         } else {
    5765           1 :                 if (EG(This) &&
    5766           0 :                     Z_OBJ_HT_P(EG(This))->get_class_entry &&
    5767           0 :                     !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
    5768             :                     /* We are calling method of the other (incompatible) class,
    5769             :                        but passing $this. This is done for compatibility with php-4. */
    5770           0 :                         if (call->fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    5771           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);
    5772             :                         } else {
    5773             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    5774           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);
    5775             :                         }
    5776             :                 }
    5777           1 :                 if ((call->object = EG(This))) {
    5778           0 :                         Z_ADDREF_P(call->object);
    5779           0 :                         call->called_scope = Z_OBJCE_P(call->object);
    5780             :                 }
    5781             :         }
    5782             : 
    5783           2 :         call->num_additional_args = 0;
    5784           2 :         call->is_ctor_call = 0;
    5785           2 :         EX(call) = call;
    5786             : 
    5787             :         CHECK_EXCEPTION();
    5788           2 :         ZEND_VM_NEXT_OPCODE();
    5789             : }
    5790             : 
    5791           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5792             : {
    5793           0 :         USE_OPLINE
    5794             :         zend_free_op free_op2;
    5795             : 
    5796             :         SAVE_OPLINE();
    5797           0 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    5798             :                                  opline->op1.zv,
    5799             :                                  _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    5800             : 
    5801           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    5802             :         CHECK_EXCEPTION();
    5803           0 :         ZEND_VM_NEXT_OPCODE();
    5804             : }
    5805             : 
    5806          56 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5807             : {
    5808          56 :         USE_OPLINE
    5809             : 
    5810             :         zval *expr_ptr;
    5811             : 
    5812             :         SAVE_OPLINE();
    5813          56 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    5814             :                 zval **expr_ptr_ptr = NULL;
    5815             : 
    5816             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    5817             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    5818             :                 }
    5819             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    5820             :                 expr_ptr = *expr_ptr_ptr;
    5821             :                 Z_ADDREF_P(expr_ptr);
    5822             :         } else {
    5823          56 :                 expr_ptr=opline->op1.zv;
    5824          56 :                 if (0) { /* temporary variable */
    5825             :                         zval *new_expr;
    5826             : 
    5827             :                         ALLOC_ZVAL(new_expr);
    5828             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    5829             :                         expr_ptr = new_expr;
    5830             :                 } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    5831             :                         zval *new_expr;
    5832             : 
    5833          56 :                         ALLOC_ZVAL(new_expr);
    5834          56 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    5835          56 :                         expr_ptr = new_expr;
    5836          56 :                         zendi_zval_copy_ctor(*expr_ptr);
    5837             : 
    5838             :                 } else if (IS_CONST == IS_CV) {
    5839             :                         Z_ADDREF_P(expr_ptr);
    5840             :                 }
    5841             :         }
    5842             : 
    5843             :         if (IS_VAR != IS_UNUSED) {
    5844             :                 zend_free_op free_op2;
    5845         112 :                 zval *offset = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    5846             :                 ulong hval;
    5847             : 
    5848          56 :                 switch (Z_TYPE_P(offset)) {
    5849             :                         case IS_DOUBLE:
    5850           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    5851           0 :                                 goto num_index;
    5852             :                         case IS_LONG:
    5853             :                         case IS_BOOL:
    5854           0 :                                 hval = Z_LVAL_P(offset);
    5855             : num_index:
    5856           0 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    5857           0 :                                 break;
    5858             :                         case IS_STRING:
    5859           0 :                                 if (IS_VAR == IS_CONST) {
    5860             :                                         hval = Z_HASH_P(offset);
    5861             :                                 } else {
    5862           0 :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    5863           0 :                                         hval = str_hash(Z_STRVAL_P(offset), Z_STRLEN_P(offset));
    5864             :                                 }
    5865           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);
    5866           0 :                                 break;
    5867             :                         case IS_NULL:
    5868          45 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    5869          45 :                                 break;
    5870             :                         default:
    5871          11 :                                 zend_error(E_WARNING, "Illegal offset type");
    5872          11 :                                 zval_ptr_dtor(&expr_ptr);
    5873             :                                 /* do nothing */
    5874             :                                 break;
    5875             :                 }
    5876          56 :                 zval_ptr_dtor_nogc(&free_op2.var);
    5877             :         } else {
    5878             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    5879             :         }
    5880             :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    5881             : 
    5882             :         }
    5883             :         CHECK_EXCEPTION();
    5884          56 :         ZEND_VM_NEXT_OPCODE();
    5885             : }
    5886             : 
    5887          38 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5888             : {
    5889          38 :         USE_OPLINE
    5890             : 
    5891          38 :         array_init(&EX_T(opline->result.var).tmp_var);
    5892          38 :         if (IS_CONST == IS_UNUSED) {
    5893             :                 ZEND_VM_NEXT_OPCODE();
    5894             : #if 0 || IS_CONST != IS_UNUSED
    5895             :         } else {
    5896          38 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    5897             : #endif
    5898             :         }
    5899             : }
    5900             : 
    5901           0 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5902             : {
    5903           0 :         USE_OPLINE
    5904             :         zval tmp, *varname;
    5905             :         HashTable *target_symbol_table;
    5906             : 
    5907             : 
    5908             :         SAVE_OPLINE();
    5909           0 :         if (IS_CONST == IS_CV &&
    5910             :             IS_VAR == IS_UNUSED &&
    5911             :             (opline->extended_value & ZEND_QUICK_SET)) {
    5912             :                 if (EG(active_symbol_table)) {
    5913             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    5914             : 
    5915             :                         zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table),  cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
    5916             :                         EX_CV(opline->op1.var) = NULL;
    5917             :                 } else if (EX_CV(opline->op1.var)) {
    5918             :                         zval_ptr_dtor(EX_CV(opline->op1.var));
    5919             :                         EX_CV(opline->op1.var) = NULL;
    5920             :                 }
    5921             :                 CHECK_EXCEPTION();
    5922             :                 ZEND_VM_NEXT_OPCODE();
    5923             :         }
    5924             : 
    5925           0 :         varname = opline->op1.zv;
    5926             : 
    5927           0 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    5928             :                 ZVAL_COPY_VALUE(&tmp, varname);
    5929             :                 zval_copy_ctor(&tmp);
    5930             :                 convert_to_string(&tmp);
    5931             :                 varname = &tmp;
    5932           0 :         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    5933             :                 Z_ADDREF_P(varname);
    5934             :         }
    5935             : 
    5936             :         if (IS_VAR != IS_UNUSED) {
    5937             :                 zend_class_entry *ce;
    5938             : 
    5939           0 :                 if (IS_VAR == IS_CONST) {
    5940             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    5941             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    5942             :                         } else {
    5943             :                                 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);
    5944             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    5945             :                                         if (IS_CONST != IS_CONST && varname == &tmp) {
    5946             :                                                 zval_dtor(&tmp);
    5947             :                                         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    5948             :                                                 zval_ptr_dtor(&varname);
    5949             :                                         }
    5950             : 
    5951             :                                         HANDLE_EXCEPTION();
    5952             :                                 }
    5953             :                                 if (UNEXPECTED(ce == NULL)) {
    5954             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    5955             :                                 }
    5956             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    5957             :                         }
    5958             :                 } else {
    5959           0 :                         ce = EX_T(opline->op2.var).class_entry;
    5960             :                 }
    5961           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);
    5962             :         } else {
    5963             :                 ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
    5964             : 
    5965             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    5966             :                 zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
    5967             :         }
    5968             : 
    5969           0 :         if (IS_CONST != IS_CONST && varname == &tmp) {
    5970             :                 zval_dtor(&tmp);
    5971           0 :         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    5972             :                 zval_ptr_dtor(&varname);
    5973             :         }
    5974             : 
    5975             :         CHECK_EXCEPTION();
    5976           0 :         ZEND_VM_NEXT_OPCODE();
    5977             : }
    5978             : 
    5979         146 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    5980             : {
    5981         146 :         USE_OPLINE
    5982             :         zval **value;
    5983         146 :         zend_bool isset = 1;
    5984             : 
    5985             :         SAVE_OPLINE();
    5986         146 :         if (IS_CONST == IS_CV &&
    5987             :             IS_VAR == IS_UNUSED &&
    5988             :             (opline->extended_value & ZEND_QUICK_SET)) {
    5989             :                 if (EX_CV(opline->op1.var)) {
    5990             :                         value = EX_CV(opline->op1.var);
    5991             :                 } else if (EG(active_symbol_table)) {
    5992             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    5993             : 
    5994             :                         if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
    5995             :                                 isset = 0;
    5996             :                         }
    5997             :                 } else {
    5998             :                         isset = 0;
    5999             :                 }
    6000             :         } else {
    6001             :                 HashTable *target_symbol_table;
    6002             : 
    6003         146 :                 zval tmp, *varname = opline->op1.zv;
    6004             : 
    6005         146 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6006             :                         ZVAL_COPY_VALUE(&tmp, varname);
    6007             :                         zval_copy_ctor(&tmp);
    6008             :                         convert_to_string(&tmp);
    6009             :                         varname = &tmp;
    6010             :                 }
    6011             : 
    6012             :                 if (IS_VAR != IS_UNUSED) {
    6013             :                         zend_class_entry *ce;
    6014             : 
    6015         146 :                         if (IS_VAR == IS_CONST) {
    6016             :                                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    6017             :                                         ce = CACHED_PTR(opline->op2.literal->cache_slot);
    6018             :                                 } else {
    6019             :                                         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);
    6020             :                                         if (UNEXPECTED(ce == NULL)) {
    6021             :                                                 CHECK_EXCEPTION();
    6022             :                                                 ZEND_VM_NEXT_OPCODE();
    6023             :                                         }
    6024             :                                         CACHE_PTR(opline->op2.literal->cache_slot, ce);
    6025             :                                 }
    6026             :                         } else {
    6027         146 :                                 ce = EX_T(opline->op2.var).class_entry;
    6028             :                         }
    6029         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);
    6030         146 :                         if (!value) {
    6031           0 :                                 isset = 0;
    6032             :                         }
    6033             :                 } else {
    6034             :                         target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    6035             :                         if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
    6036             :                                 isset = 0;
    6037             :                         }
    6038             :                 }
    6039             : 
    6040         146 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    6041             :                         zval_dtor(&tmp);
    6042             :                 }
    6043             : 
    6044             :         }
    6045             : 
    6046         146 :         if (opline->extended_value & ZEND_ISSET) {
    6047         195 :                 if (isset && Z_TYPE_PP(value) != IS_NULL) {
    6048          49 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    6049             :                 } else {
    6050          97 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    6051             :                 }
    6052             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6053           0 :                 if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
    6054           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    6055             :                 } else {
    6056           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    6057             :                 }
    6058             :         }
    6059             : 
    6060             :         CHECK_EXCEPTION();
    6061         146 :         ZEND_VM_NEXT_OPCODE();
    6062             : }
    6063             : 
    6064           1 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6065             : {
    6066           1 :         USE_OPLINE
    6067             : 
    6068             :         /* The generator object is stored in return_value_ptr_ptr */
    6069           1 :         zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
    6070             : 
    6071           1 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    6072           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    6073             :         }
    6074             : 
    6075             :         /* Destroy the previously yielded value */
    6076           1 :         if (generator->value) {
    6077           1 :                 zval_ptr_dtor(&generator->value);
    6078             :         }
    6079             : 
    6080             :         /* Destroy the previously yielded key */
    6081           1 :         if (generator->key) {
    6082           1 :                 zval_ptr_dtor(&generator->key);
    6083             :         }
    6084             : 
    6085             :         /* Set the new yielded value */
    6086             :         if (IS_CONST != IS_UNUSED) {
    6087             : 
    6088             : 
    6089           1 :                 if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    6090             :                         /* Constants and temporary variables aren't yieldable by reference,
    6091             :                          * but we still allow them with a notice. */
    6092             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6093             :                                 zval *value, *copy;
    6094             : 
    6095           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6096             : 
    6097           0 :                                 value = opline->op1.zv;
    6098           0 :                                 ALLOC_ZVAL(copy);
    6099           0 :                                 INIT_PZVAL_COPY(copy, value);
    6100             : 
    6101             :                                 /* Temporary variables don't need ctor copying */
    6102             :                                 if (!0) {
    6103             :                                         zval_copy_ctor(copy);
    6104             :                                 }
    6105             : 
    6106           0 :                                 generator->value = copy;
    6107             :                         } else {
    6108             :                                 zval **value_ptr = NULL;
    6109             : 
    6110             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    6111             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    6112             :                                 }
    6113             : 
    6114             :                                 /* If a function call result is yielded and the function did
    6115             :                                  * not return by reference we throw a notice. */
    6116             :                                 if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
    6117             :                                     && !(opline->extended_value == ZEND_RETURNS_FUNCTION
    6118             :                                          && EX_T(opline->op1.var).var.fcall_returned_reference)
    6119             :                                     && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    6120             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6121             : 
    6122             :                                         Z_ADDREF_PP(value_ptr);
    6123             :                                         generator->value = *value_ptr;
    6124             :                                 } else {
    6125             :                                         SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
    6126             :                                         Z_ADDREF_PP(value_ptr);
    6127             :                                         generator->value = *value_ptr;
    6128             :                                 }
    6129             : 
    6130             :                         }
    6131             :                 } else {
    6132           1 :                         zval *value = opline->op1.zv;
    6133             : 
    6134             :                         /* Consts, temporary variables and references need copying */
    6135             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    6136             :                                 || PZVAL_IS_REF(value)
    6137             :                         ) {
    6138             :                                 zval *copy;
    6139             : 
    6140           1 :                                 ALLOC_ZVAL(copy);
    6141           1 :                                 INIT_PZVAL_COPY(copy, value);
    6142             : 
    6143             :                                 /* Temporary variables don't need ctor copying */
    6144             :                                 if (!0) {
    6145             :                                         zval_copy_ctor(copy);
    6146             :                                 }
    6147             : 
    6148           1 :                                 generator->value = copy;
    6149             : 
    6150             :                         } else {
    6151             :                                 if (IS_CONST == IS_CV) {
    6152             :                                         Z_ADDREF_P(value);
    6153             :                                 }
    6154             :                                 generator->value = value;
    6155             :                         }
    6156             :                 }
    6157             :         } else {
    6158             :                 /* If no value was specified yield null */
    6159             :                 Z_ADDREF(EG(uninitialized_zval));
    6160             :                 generator->value = &EG(uninitialized_zval);
    6161             :         }
    6162             : 
    6163             :         /* Set the new yielded key */
    6164             :         if (IS_VAR != IS_UNUSED) {
    6165             :                 zend_free_op free_op2;
    6166           2 :                 zval *key = _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC);
    6167             : 
    6168             :                 /* Consts, temporary variables and references need copying */
    6169           1 :                 if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR
    6170             :                         || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
    6171             :                 ) {
    6172             :                         zval *copy;
    6173             : 
    6174           0 :                         ALLOC_ZVAL(copy);
    6175           0 :                         INIT_PZVAL_COPY(copy, key);
    6176             : 
    6177             :                         /* Temporary variables don't need ctor copying */
    6178             :                         if (!0) {
    6179             :                                 zval_copy_ctor(copy);
    6180             :                         }
    6181             : 
    6182           0 :                         generator->key = copy;
    6183             :                 } else {
    6184             :                         Z_ADDREF_P(key);
    6185           1 :                         generator->key = key;
    6186             :                 }
    6187             : 
    6188           2 :                 if (Z_TYPE_P(generator->key) == IS_LONG
    6189           1 :                     && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
    6190             :                 ) {
    6191           0 :                         generator->largest_used_integer_key = Z_LVAL_P(generator->key);
    6192             :                 }
    6193             : 
    6194           1 :                 zval_ptr_dtor_nogc(&free_op2.var);
    6195             :         } else {
    6196             :                 /* If no key was specified we use auto-increment keys */
    6197             :                 generator->largest_used_integer_key++;
    6198             : 
    6199             :                 ALLOC_INIT_ZVAL(generator->key);
    6200             :                 ZVAL_LONG(generator->key, generator->largest_used_integer_key);
    6201             :         }
    6202             : 
    6203           1 :         if (RETURN_VALUE_USED(opline)) {
    6204             :                 /* If the return value of yield is used set the send
    6205             :                  * target and initialize it to NULL */
    6206           0 :                 generator->send_target = &EX_T(opline->result.var).var.ptr;
    6207             :                 Z_ADDREF(EG(uninitialized_zval));
    6208           0 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    6209             :         } else {
    6210           1 :                 generator->send_target = NULL;
    6211             :         }
    6212             : 
    6213             :         /* We increment to the next op, so we are at the correct position when the
    6214             :          * generator is resumed. */
    6215           1 :         ZEND_VM_INC_OPCODE();
    6216             : 
    6217             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6218             :          * variable in execute_data so we don't resume at an old position. */
    6219             :         SAVE_OPLINE();
    6220             : 
    6221           1 :         ZEND_VM_RETURN();
    6222             : }
    6223             : 
    6224           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6225             : {
    6226           0 :         USE_OPLINE
    6227             :         zend_free_op free_op2;
    6228             : 
    6229             :         SAVE_OPLINE();
    6230           0 :         pow_function(&EX_T(opline->result.var).tmp_var,
    6231             :                 opline->op1.zv,
    6232             :                 _get_zval_ptr_var(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    6233             : 
    6234           0 :         zval_ptr_dtor_nogc(&free_op2.var);
    6235             :         CHECK_EXCEPTION();
    6236           0 :         ZEND_VM_NEXT_OPCODE();
    6237             : }
    6238             : 
    6239     2136466 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
    6240             : {
    6241     2136466 :         USE_OPLINE
    6242             :         zend_free_op free_op1;
    6243             :         zval *varname;
    6244             :         zval **retval;
    6245             :         zval tmp_varname;
    6246             :         HashTable *target_symbol_table;
    6247             :         ulong hash_value;
    6248             : 
    6249             :         SAVE_OPLINE();
    6250     2136466 :         varname = opline->op1.zv;
    6251             : 
    6252     2136466 :         if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
    6253             :                 ZVAL_COPY_VALUE(&tmp_varname, varname);
    6254             :                 zval_copy_ctor(&tmp_varname);
    6255             :                 Z_SET_REFCOUNT(tmp_varname, 1);
    6256             :                 Z_UNSET_ISREF(tmp_varname);
    6257             :                 convert_to_string(&tmp_varname);
    6258             :                 varname = &tmp_varname;
    6259             :         }
    6260             : 
    6261     2136466 :         if (IS_UNUSED != IS_UNUSED) {
    6262             :                 zend_class_entry *ce;
    6263             : 
    6264             :                 if (IS_UNUSED == IS_CONST) {
    6265             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    6266             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    6267             :                         } else {
    6268             :                                 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);
    6269             :                                 if (UNEXPECTED(ce == NULL)) {
    6270             :                                         if (IS_CONST != IS_CONST && varname == &tmp_varname) {
    6271             :                                                 zval_dtor(&tmp_varname);
    6272             :                                         }
    6273             : 
    6274             :                                         CHECK_EXCEPTION();
    6275             :                                         ZEND_VM_NEXT_OPCODE();
    6276             :                                 }
    6277             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    6278             :                         }
    6279             :                 } else {
    6280             :                         ce = EX_T(opline->op2.var).class_entry;
    6281             :                 }
    6282             :                 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);
    6283             : 
    6284             :         } else {
    6285     2136466 :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    6286             : /*
    6287             :                 if (!target_symbol_table) {
    6288             :                         CHECK_EXCEPTION();
    6289             :                         ZEND_VM_NEXT_OPCODE();
    6290             :                 }
    6291             : */
    6292             :                 if (IS_CONST == IS_CONST) {
    6293     2136466 :                         hash_value = Z_HASH_P(varname);
    6294             :                 } else {
    6295             :                         hash_value = str_hash(Z_STRVAL_P(varname), Z_STRLEN_P(varname));
    6296             :                 }
    6297             : 
    6298     2136466 :                 if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
    6299        1821 :                         switch (type) {
    6300             :                                 case BP_VAR_R:
    6301             :                                 case BP_VAR_UNSET:
    6302        1534 :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    6303             :                                         /* break missing intentionally */
    6304             :                                 case BP_VAR_IS:
    6305        1534 :                                         retval = &EG(uninitialized_zval_ptr);
    6306        1534 :                                         break;
    6307             :                                 case BP_VAR_RW:
    6308           0 :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    6309             :                                         /* break missing intentionally */
    6310             :                                 case BP_VAR_W:
    6311             :                                         Z_ADDREF_P(&EG(uninitialized_zval));
    6312         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);
    6313             :                                         break;
    6314             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    6315             :                         }
    6316             :                 }
    6317     2136466 :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    6318             :                         case ZEND_FETCH_GLOBAL:
    6319             :                                 if (IS_CONST != IS_TMP_VAR) {
    6320             : 
    6321             :                                 }
    6322       13545 :                                 break;
    6323             :                         case ZEND_FETCH_LOCAL:
    6324             : 
    6325     1314141 :                                 break;
    6326             :                         case ZEND_FETCH_STATIC:
    6327        1535 :                                 zval_update_constant(retval, (void*) 1 TSRMLS_CC);
    6328        1535 :                                 break;
    6329             :                         case ZEND_FETCH_GLOBAL_LOCK:
    6330      807245 :                                 if (IS_CONST == IS_VAR && !free_op1.var) {
    6331             :                                         PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
    6332             :                                 }
    6333             :                                 break;
    6334             :                 }
    6335             :         }
    6336             : 
    6337             : 
    6338     2136466 :         if (IS_CONST != IS_CONST && varname == &tmp_varname) {
    6339             :                 zval_dtor(&tmp_varname);
    6340             :         }
    6341     2136466 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    6342           8 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    6343             :         }
    6344     2136466 :         PZVAL_LOCK(*retval);
    6345     2136466 :         switch (type) {
    6346             :                 case BP_VAR_R:
    6347             :                 case BP_VAR_IS:
    6348      470437 :                         EX_T(opline->result.var).var.ptr = *retval;
    6349      470437 :                         break;
    6350             :                 case BP_VAR_UNSET: {
    6351             :                         zend_free_op free_res;
    6352             : 
    6353          30 :                         PZVAL_UNLOCK(*retval, &free_res);
    6354          30 :                         if (retval != &EG(uninitialized_zval_ptr)) {
    6355          90 :                                 SEPARATE_ZVAL_IF_NOT_REF(retval);
    6356             :                         }
    6357          30 :                         PZVAL_LOCK(*retval);
    6358          30 :                         FREE_OP_VAR_PTR(free_res);
    6359             :                 }
    6360             :                 /* break missing intentionally */
    6361             :                 default:
    6362     1666029 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    6363             :                         break;
    6364             :         }
    6365             :         CHECK_EXCEPTION();
    6366     2136466 :         ZEND_VM_NEXT_OPCODE();
    6367             : }
    6368             : 
    6369      470417 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6370             : {
    6371      470417 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6372             : }
    6373             : 
    6374     1665995 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6375             : {
    6376     1665995 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6377             : }
    6378             : 
    6379           4 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6380             : {
    6381           4 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6382             : }
    6383             : 
    6384           4 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6385             : {
    6386           4 :         USE_OPLINE
    6387             : 
    6388           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);
    6389             : }
    6390             : 
    6391          30 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6392             : {
    6393          30 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6394             : }
    6395             : 
    6396          16 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6397             : {
    6398          16 :         return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6399             : }
    6400             : 
    6401           2 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6402             : {
    6403           2 :         USE_OPLINE
    6404             :         zval *function_name;
    6405             :         zend_class_entry *ce;
    6406           2 :         call_slot *call = EX(call_slots) + opline->result.num;
    6407             : 
    6408             :         SAVE_OPLINE();
    6409             : 
    6410             :         if (IS_CONST == IS_CONST) {
    6411             :                 /* no function found. try a static method in class */
    6412           2 :                 if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    6413           0 :                         ce = CACHED_PTR(opline->op1.literal->cache_slot);
    6414             :                 } else {
    6415           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);
    6416           2 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    6417           0 :                                 HANDLE_EXCEPTION();
    6418             :                         }
    6419           2 :                         if (UNEXPECTED(ce == NULL)) {
    6420           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    6421             :                         }
    6422           2 :                         CACHE_PTR(opline->op1.literal->cache_slot, ce);
    6423             :                 }
    6424           2 :                 call->called_scope = ce;
    6425             :         } else {
    6426             :                 ce = EX_T(opline->op1.var).class_entry;
    6427             : 
    6428             :                 if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
    6429             :                         call->called_scope = EG(called_scope);
    6430             :                 } else {
    6431             :                         call->called_scope = ce;
    6432             :                 }
    6433             :         }
    6434             : 
    6435           2 :         if (IS_CONST == IS_CONST &&
    6436             :             IS_UNUSED == IS_CONST &&
    6437             :             CACHED_PTR(opline->op2.literal->cache_slot)) {
    6438             :                 call->fbc = CACHED_PTR(opline->op2.literal->cache_slot);
    6439           2 :         } else if (IS_CONST != IS_CONST &&
    6440             :                    IS_UNUSED == IS_CONST &&
    6441             :                    (call->fbc = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
    6442             :                 /* do nothing */
    6443           2 :         } else if (IS_UNUSED != IS_UNUSED) {
    6444             :                 char *function_name_strval = NULL;
    6445             :                 int function_name_strlen = 0;
    6446             : 
    6447             : 
    6448             :                 if (IS_UNUSED == IS_CONST) {
    6449             :                         function_name_strval = Z_STRVAL_P(opline->op2.zv);
    6450             :                         function_name_strlen = Z_STRLEN_P(opline->op2.zv);
    6451             :                 } else {
    6452             :                         function_name = NULL;
    6453             : 
    6454             :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    6455             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    6456             :                                         HANDLE_EXCEPTION();
    6457             :                                 }
    6458             :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    6459             :                         } else {
    6460             :                                 function_name_strval = Z_STRVAL_P(function_name);
    6461             :                                 function_name_strlen = Z_STRLEN_P(function_name);
    6462             :                         }
    6463             :                 }
    6464             : 
    6465             :                 if (function_name_strval) {
    6466             :                         if (ce->get_static_method) {
    6467             :                                 call->fbc = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
    6468             :                         } else {
    6469             :                                 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);
    6470             :                         }
    6471             :                         if (UNEXPECTED(call->fbc == NULL)) {
    6472             :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
    6473             :                         }
    6474             :                         if (IS_UNUSED == IS_CONST &&
    6475             :                             EXPECTED(call->fbc->type <= ZEND_USER_FUNCTION) &&
    6476             :                             EXPECTED((call->fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    6477             :                                 if (IS_CONST == IS_CONST) {
    6478             :                                         CACHE_PTR(opline->op2.literal->cache_slot, call->fbc);
    6479             :                                 } else {
    6480             :                                         CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, call->fbc);
    6481             :                                 }
    6482             :                         }
    6483             :                 }
    6484             :                 if (IS_UNUSED != IS_CONST) {
    6485             : 
    6486             :                 }
    6487             :         } else {
    6488           2 :                 if (UNEXPECTED(ce->constructor == NULL)) {
    6489           1 :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    6490             :                 }
    6491           1 :                 if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    6492           0 :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
    6493             :                 }
    6494           1 :                 call->fbc = ce->constructor;
    6495             :         }
    6496             : 
    6497           1 :         if (call->fbc->common.fn_flags & ZEND_ACC_STATIC) {
    6498           0 :                 call->object = NULL;
    6499             :         } else {
    6500           3 :                 if (EG(This) &&
    6501           1 :                     Z_OBJ_HT_P(EG(This))->get_class_entry &&
    6502           1 :                     !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
    6503             :                     /* We are calling method of the other (incompatible) class,
    6504             :                        but passing $this. This is done for compatibility with php-4. */
    6505           0 :                         if (call->fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    6506           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);
    6507             :                         } else {
    6508             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    6509           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);
    6510             :                         }
    6511             :                 }
    6512           1 :                 if ((call->object = EG(This))) {
    6513           1 :                         Z_ADDREF_P(call->object);
    6514           1 :                         call->called_scope = Z_OBJCE_P(call->object);
    6515             :                 }
    6516             :         }
    6517             : 
    6518           1 :         call->num_additional_args = 0;
    6519           1 :         call->is_ctor_call = 0;
    6520           1 :         EX(call) = call;
    6521             : 
    6522             :         CHECK_EXCEPTION();
    6523           1 :         ZEND_VM_NEXT_OPCODE();
    6524             : }
    6525             : 
    6526      406490 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6527             : {
    6528      406490 :         USE_OPLINE
    6529             : 
    6530             :         zval *expr_ptr;
    6531             : 
    6532             :         SAVE_OPLINE();
    6533      406490 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    6534             :                 zval **expr_ptr_ptr = NULL;
    6535             : 
    6536             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    6537             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    6538             :                 }
    6539             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    6540             :                 expr_ptr = *expr_ptr_ptr;
    6541             :                 Z_ADDREF_P(expr_ptr);
    6542             :         } else {
    6543      406490 :                 expr_ptr=opline->op1.zv;
    6544      406490 :                 if (0) { /* temporary variable */
    6545             :                         zval *new_expr;
    6546             : 
    6547             :                         ALLOC_ZVAL(new_expr);
    6548             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    6549             :                         expr_ptr = new_expr;
    6550             :                 } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    6551             :                         zval *new_expr;
    6552             : 
    6553      406490 :                         ALLOC_ZVAL(new_expr);
    6554      406490 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    6555      406490 :                         expr_ptr = new_expr;
    6556      406490 :                         zendi_zval_copy_ctor(*expr_ptr);
    6557             : 
    6558             :                 } else if (IS_CONST == IS_CV) {
    6559             :                         Z_ADDREF_P(expr_ptr);
    6560             :                 }
    6561             :         }
    6562             : 
    6563      406490 :         if (IS_UNUSED != IS_UNUSED) {
    6564             : 
    6565             :                 zval *offset = NULL;
    6566             :                 ulong hval;
    6567             : 
    6568             :                 switch (Z_TYPE_P(offset)) {
    6569             :                         case IS_DOUBLE:
    6570             :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    6571             :                                 goto num_index;
    6572             :                         case IS_LONG:
    6573             :                         case IS_BOOL:
    6574             :                                 hval = Z_LVAL_P(offset);
    6575             : num_index:
    6576             :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    6577             :                                 break;
    6578             :                         case IS_STRING:
    6579             :                                 if (IS_UNUSED == IS_CONST) {
    6580             :                                         hval = Z_HASH_P(offset);
    6581             :                                 } else {
    6582             :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    6583             :                                         hval = str_hash(Z_STRVAL_P(offset), Z_STRLEN_P(offset));
    6584             :                                 }
    6585             :                                 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);
    6586             :                                 break;
    6587             :                         case IS_NULL:
    6588             :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    6589             :                                 break;
    6590             :                         default:
    6591             :                                 zend_error(E_WARNING, "Illegal offset type");
    6592             :                                 zval_ptr_dtor(&expr_ptr);
    6593             :                                 /* do nothing */
    6594             :                                 break;
    6595             :                 }
    6596             : 
    6597             :         } else {
    6598      406490 :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    6599             :         }
    6600             :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    6601             : 
    6602             :         }
    6603             :         CHECK_EXCEPTION();
    6604      406490 :         ZEND_VM_NEXT_OPCODE();
    6605             : }
    6606             : 
    6607      239631 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6608             : {
    6609      239631 :         USE_OPLINE
    6610             : 
    6611      239631 :         array_init(&EX_T(opline->result.var).tmp_var);
    6612      239631 :         if (IS_CONST == IS_UNUSED) {
    6613             :                 ZEND_VM_NEXT_OPCODE();
    6614             : #if 0 || IS_CONST != IS_UNUSED
    6615             :         } else {
    6616      239631 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    6617             : #endif
    6618             :         }
    6619             : }
    6620             : 
    6621           4 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6622             : {
    6623           4 :         USE_OPLINE
    6624             :         zval tmp, *varname;
    6625             :         HashTable *target_symbol_table;
    6626             : 
    6627             : 
    6628             :         SAVE_OPLINE();
    6629           4 :         if (IS_CONST == IS_CV &&
    6630             :             IS_UNUSED == IS_UNUSED &&
    6631             :             (opline->extended_value & ZEND_QUICK_SET)) {
    6632             :                 if (EG(active_symbol_table)) {
    6633             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    6634             : 
    6635             :                         zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table),  cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
    6636             :                         EX_CV(opline->op1.var) = NULL;
    6637             :                 } else if (EX_CV(opline->op1.var)) {
    6638             :                         zval_ptr_dtor(EX_CV(opline->op1.var));
    6639             :                         EX_CV(opline->op1.var) = NULL;
    6640             :                 }
    6641             :                 CHECK_EXCEPTION();
    6642             :                 ZEND_VM_NEXT_OPCODE();
    6643             :         }
    6644             : 
    6645           4 :         varname = opline->op1.zv;
    6646             : 
    6647           4 :         if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6648             :                 ZVAL_COPY_VALUE(&tmp, varname);
    6649             :                 zval_copy_ctor(&tmp);
    6650             :                 convert_to_string(&tmp);
    6651             :                 varname = &tmp;
    6652           4 :         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    6653             :                 Z_ADDREF_P(varname);
    6654             :         }
    6655             : 
    6656           4 :         if (IS_UNUSED != IS_UNUSED) {
    6657             :                 zend_class_entry *ce;
    6658             : 
    6659             :                 if (IS_UNUSED == IS_CONST) {
    6660             :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    6661             :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    6662             :                         } else {
    6663             :                                 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);
    6664             :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    6665             :                                         if (IS_CONST != IS_CONST && varname == &tmp) {
    6666             :                                                 zval_dtor(&tmp);
    6667             :                                         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    6668             :                                                 zval_ptr_dtor(&varname);
    6669             :                                         }
    6670             : 
    6671             :                                         HANDLE_EXCEPTION();
    6672             :                                 }
    6673             :                                 if (UNEXPECTED(ce == NULL)) {
    6674             :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    6675             :                                 }
    6676             :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    6677             :                         }
    6678             :                 } else {
    6679             :                         ce = EX_T(opline->op2.var).class_entry;
    6680             :                 }
    6681             :                 zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
    6682             :         } else {
    6683           4 :                 ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
    6684             : 
    6685           4 :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    6686           4 :                 zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
    6687             :         }
    6688             : 
    6689           4 :         if (IS_CONST != IS_CONST && varname == &tmp) {
    6690             :                 zval_dtor(&tmp);
    6691           4 :         } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
    6692             :                 zval_ptr_dtor(&varname);
    6693             :         }
    6694             : 
    6695             :         CHECK_EXCEPTION();
    6696           4 :         ZEND_VM_NEXT_OPCODE();
    6697             : }
    6698             : 
    6699          11 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6700             : {
    6701          11 :         USE_OPLINE
    6702             :         zval **value;
    6703          11 :         zend_bool isset = 1;
    6704             : 
    6705             :         SAVE_OPLINE();
    6706          11 :         if (IS_CONST == IS_CV &&
    6707             :             IS_UNUSED == IS_UNUSED &&
    6708             :             (opline->extended_value & ZEND_QUICK_SET)) {
    6709             :                 if (EX_CV(opline->op1.var)) {
    6710             :                         value = EX_CV(opline->op1.var);
    6711             :                 } else if (EG(active_symbol_table)) {
    6712             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    6713             : 
    6714             :                         if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
    6715             :                                 isset = 0;
    6716             :                         }
    6717             :                 } else {
    6718             :                         isset = 0;
    6719             :                 }
    6720             :         } else {
    6721             :                 HashTable *target_symbol_table;
    6722             : 
    6723          11 :                 zval tmp, *varname = opline->op1.zv;
    6724             : 
    6725          11 :                 if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    6726             :                         ZVAL_COPY_VALUE(&tmp, varname);
    6727             :                         zval_copy_ctor(&tmp);
    6728             :                         convert_to_string(&tmp);
    6729             :                         varname = &tmp;
    6730             :                 }
    6731             : 
    6732          11 :                 if (IS_UNUSED != IS_UNUSED) {
    6733             :                         zend_class_entry *ce;
    6734             : 
    6735             :                         if (IS_UNUSED == IS_CONST) {
    6736             :                                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    6737             :                                         ce = CACHED_PTR(opline->op2.literal->cache_slot);
    6738             :                                 } else {
    6739             :                                         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);
    6740             :                                         if (UNEXPECTED(ce == NULL)) {
    6741             :                                                 CHECK_EXCEPTION();
    6742             :                                                 ZEND_VM_NEXT_OPCODE();
    6743             :                                         }
    6744             :                                         CACHE_PTR(opline->op2.literal->cache_slot, ce);
    6745             :                                 }
    6746             :                         } else {
    6747             :                                 ce = EX_T(opline->op2.var).class_entry;
    6748             :                         }
    6749             :                         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);
    6750             :                         if (!value) {
    6751             :                                 isset = 0;
    6752             :                         }
    6753             :                 } else {
    6754          11 :                         target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    6755          11 :                         if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
    6756           0 :                                 isset = 0;
    6757             :                         }
    6758             :                 }
    6759             : 
    6760          11 :                 if (IS_CONST != IS_CONST && varname == &tmp) {
    6761             :                         zval_dtor(&tmp);
    6762             :                 }
    6763             : 
    6764             :         }
    6765             : 
    6766          11 :         if (opline->extended_value & ZEND_ISSET) {
    6767          14 :                 if (isset && Z_TYPE_PP(value) != IS_NULL) {
    6768           7 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    6769             :                 } else {
    6770           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    6771             :                 }
    6772             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    6773           8 :                 if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
    6774           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    6775             :                 } else {
    6776           4 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    6777             :                 }
    6778             :         }
    6779             : 
    6780             :         CHECK_EXCEPTION();
    6781          11 :         ZEND_VM_NEXT_OPCODE();
    6782             : }
    6783             : 
    6784         284 : static int ZEND_FASTCALL  ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6785             : {
    6786         284 :         USE_OPLINE
    6787             :         zend_function *op_array;
    6788             : 
    6789             :         SAVE_OPLINE();
    6790             : 
    6791         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) ||
    6792         284 :             UNEXPECTED(op_array->type != ZEND_USER_FUNCTION)) {
    6793           0 :                 zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
    6794             :         }
    6795             : 
    6796         284 :         zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
    6797             : 
    6798             :         CHECK_EXCEPTION();
    6799         284 :         ZEND_VM_NEXT_OPCODE();
    6800             : }
    6801             : 
    6802          28 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6803             : {
    6804          28 :         USE_OPLINE
    6805             : 
    6806             :         /* The generator object is stored in return_value_ptr_ptr */
    6807          28 :         zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
    6808             : 
    6809          28 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    6810           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    6811             :         }
    6812             : 
    6813             :         /* Destroy the previously yielded value */
    6814          28 :         if (generator->value) {
    6815          12 :                 zval_ptr_dtor(&generator->value);
    6816             :         }
    6817             : 
    6818             :         /* Destroy the previously yielded key */
    6819          28 :         if (generator->key) {
    6820          12 :                 zval_ptr_dtor(&generator->key);
    6821             :         }
    6822             : 
    6823             :         /* Set the new yielded value */
    6824             :         if (IS_CONST != IS_UNUSED) {
    6825             : 
    6826             : 
    6827          28 :                 if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    6828             :                         /* Constants and temporary variables aren't yieldable by reference,
    6829             :                          * but we still allow them with a notice. */
    6830             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    6831             :                                 zval *value, *copy;
    6832             : 
    6833           1 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6834             : 
    6835           1 :                                 value = opline->op1.zv;
    6836           1 :                                 ALLOC_ZVAL(copy);
    6837           1 :                                 INIT_PZVAL_COPY(copy, value);
    6838             : 
    6839             :                                 /* Temporary variables don't need ctor copying */
    6840             :                                 if (!0) {
    6841             :                                         zval_copy_ctor(copy);
    6842             :                                 }
    6843             : 
    6844           1 :                                 generator->value = copy;
    6845             :                         } else {
    6846             :                                 zval **value_ptr = NULL;
    6847             : 
    6848             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    6849             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    6850             :                                 }
    6851             : 
    6852             :                                 /* If a function call result is yielded and the function did
    6853             :                                  * not return by reference we throw a notice. */
    6854             :                                 if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
    6855             :                                     && !(opline->extended_value == ZEND_RETURNS_FUNCTION
    6856             :                                          && EX_T(opline->op1.var).var.fcall_returned_reference)
    6857             :                                     && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    6858             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    6859             : 
    6860             :                                         Z_ADDREF_PP(value_ptr);
    6861             :                                         generator->value = *value_ptr;
    6862             :                                 } else {
    6863             :                                         SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
    6864             :                                         Z_ADDREF_PP(value_ptr);
    6865             :                                         generator->value = *value_ptr;
    6866             :                                 }
    6867             : 
    6868             :                         }
    6869             :                 } else {
    6870          27 :                         zval *value = opline->op1.zv;
    6871             : 
    6872             :                         /* Consts, temporary variables and references need copying */
    6873             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    6874             :                                 || PZVAL_IS_REF(value)
    6875             :                         ) {
    6876             :                                 zval *copy;
    6877             : 
    6878          27 :                                 ALLOC_ZVAL(copy);
    6879          27 :                                 INIT_PZVAL_COPY(copy, value);
    6880             : 
    6881             :                                 /* Temporary variables don't need ctor copying */
    6882             :                                 if (!0) {
    6883             :                                         zval_copy_ctor(copy);
    6884             :                                 }
    6885             : 
    6886          27 :                                 generator->value = copy;
    6887             : 
    6888             :                         } else {
    6889             :                                 if (IS_CONST == IS_CV) {
    6890             :                                         Z_ADDREF_P(value);
    6891             :                                 }
    6892             :                                 generator->value = value;
    6893             :                         }
    6894             :                 }
    6895             :         } else {
    6896             :                 /* If no value was specified yield null */
    6897             :                 Z_ADDREF(EG(uninitialized_zval));
    6898             :                 generator->value = &EG(uninitialized_zval);
    6899             :         }
    6900             : 
    6901             :         /* Set the new yielded key */
    6902          28 :         if (IS_UNUSED != IS_UNUSED) {
    6903             : 
    6904             :                 zval *key = NULL;
    6905             : 
    6906             :                 /* Consts, temporary variables and references need copying */
    6907             :                 if (IS_UNUSED == IS_CONST || IS_UNUSED == IS_TMP_VAR
    6908             :                         || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
    6909             :                 ) {
    6910             :                         zval *copy;
    6911             : 
    6912             :                         ALLOC_ZVAL(copy);
    6913             :                         INIT_PZVAL_COPY(copy, key);
    6914             : 
    6915             :                         /* Temporary variables don't need ctor copying */
    6916             :                         if (!0) {
    6917             :                                 zval_copy_ctor(copy);
    6918             :                         }
    6919             : 
    6920             :                         generator->key = copy;
    6921             :                 } else {
    6922             :                         Z_ADDREF_P(key);
    6923             :                         generator->key = key;
    6924             :                 }
    6925             : 
    6926             :                 if (Z_TYPE_P(generator->key) == IS_LONG
    6927             :                     && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
    6928             :                 ) {
    6929             :                         generator->largest_used_integer_key = Z_LVAL_P(generator->key);
    6930             :                 }
    6931             : 
    6932             :         } else {
    6933             :                 /* If no key was specified we use auto-increment keys */
    6934          28 :                 generator->largest_used_integer_key++;
    6935             : 
    6936          28 :                 ALLOC_INIT_ZVAL(generator->key);
    6937          28 :                 ZVAL_LONG(generator->key, generator->largest_used_integer_key);
    6938             :         }
    6939             : 
    6940          28 :         if (RETURN_VALUE_USED(opline)) {
    6941             :                 /* If the return value of yield is used set the send
    6942             :                  * target and initialize it to NULL */
    6943           2 :                 generator->send_target = &EX_T(opline->result.var).var.ptr;
    6944             :                 Z_ADDREF(EG(uninitialized_zval));
    6945           2 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    6946             :         } else {
    6947          26 :                 generator->send_target = NULL;
    6948             :         }
    6949             : 
    6950             :         /* We increment to the next op, so we are at the correct position when the
    6951             :          * generator is resumed. */
    6952          28 :         ZEND_VM_INC_OPCODE();
    6953             : 
    6954             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    6955             :          * variable in execute_data so we don't resume at an old position. */
    6956             :         SAVE_OPLINE();
    6957             : 
    6958          28 :         ZEND_VM_RETURN();
    6959             : }
    6960             : 
    6961          54 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6962             : {
    6963          54 :         USE_OPLINE
    6964             : 
    6965             : 
    6966             :         SAVE_OPLINE();
    6967         108 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    6968             :                 opline->op1.zv,
    6969             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6970             : 
    6971             : 
    6972             :         CHECK_EXCEPTION();
    6973          54 :         ZEND_VM_NEXT_OPCODE();
    6974             : }
    6975             : 
    6976         122 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6977             : {
    6978         122 :         USE_OPLINE
    6979             : 
    6980             : 
    6981             :         SAVE_OPLINE();
    6982         244 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    6983             :                 opline->op1.zv,
    6984             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    6985             : 
    6986             : 
    6987             :         CHECK_EXCEPTION();
    6988         122 :         ZEND_VM_NEXT_OPCODE();
    6989             : }
    6990             : 
    6991        2115 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    6992             : {
    6993        2115 :         USE_OPLINE
    6994             : 
    6995             : 
    6996             :         SAVE_OPLINE();
    6997        4230 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    6998             :                 opline->op1.zv,
    6999             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7000             : 
    7001             : 
    7002             :         CHECK_EXCEPTION();
    7003        2115 :         ZEND_VM_NEXT_OPCODE();
    7004             : }
    7005             : 
    7006           1 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7007             : {
    7008           1 :         USE_OPLINE
    7009             : 
    7010             : 
    7011             :         SAVE_OPLINE();
    7012           2 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    7013             :                 opline->op1.zv,
    7014             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7015             : 
    7016             : 
    7017             :         CHECK_EXCEPTION();
    7018           1 :         ZEND_VM_NEXT_OPCODE();
    7019             : }
    7020             : 
    7021           1 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7022             : {
    7023           1 :         USE_OPLINE
    7024             : 
    7025             : 
    7026             :         SAVE_OPLINE();
    7027           2 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    7028             :                 opline->op1.zv,
    7029             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7030             : 
    7031             : 
    7032             :         CHECK_EXCEPTION();
    7033           1 :         ZEND_VM_NEXT_OPCODE();
    7034             : }
    7035             : 
    7036           1 : static int ZEND_FASTCALL  ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7037             : {
    7038           1 :         USE_OPLINE
    7039             : 
    7040             : 
    7041             :         SAVE_OPLINE();
    7042           2 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    7043             :                 opline->op1.zv,
    7044             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7045             : 
    7046             : 
    7047             :         CHECK_EXCEPTION();
    7048           1 :         ZEND_VM_NEXT_OPCODE();
    7049             : }
    7050             : 
    7051           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7052             : {
    7053           0 :         USE_OPLINE
    7054             : 
    7055             : 
    7056             :         SAVE_OPLINE();
    7057           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    7058             :                 opline->op1.zv,
    7059             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7060             : 
    7061             : 
    7062             :         CHECK_EXCEPTION();
    7063           0 :         ZEND_VM_NEXT_OPCODE();
    7064             : }
    7065             : 
    7066      180862 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7067             : {
    7068      180862 :         USE_OPLINE
    7069             : 
    7070             : 
    7071             :         SAVE_OPLINE();
    7072      361724 :         concat_function(&EX_T(opline->result.var).tmp_var,
    7073             :                 opline->op1.zv,
    7074             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7075             : 
    7076             : 
    7077             :         CHECK_EXCEPTION();
    7078      180862 :         ZEND_VM_NEXT_OPCODE();
    7079             : }
    7080             : 
    7081          49 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7082             : {
    7083          49 :         USE_OPLINE
    7084             : 
    7085             : 
    7086             :         SAVE_OPLINE();
    7087          98 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    7088             :                 opline->op1.zv,
    7089             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7090             : 
    7091             : 
    7092             :         CHECK_EXCEPTION();
    7093          49 :         ZEND_VM_NEXT_OPCODE();
    7094             : }
    7095             : 
    7096         137 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7097             : {
    7098         137 :         USE_OPLINE
    7099             : 
    7100         137 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7101             : 
    7102             :         SAVE_OPLINE();
    7103         274 :         is_identical_function(result,
    7104             :                 opline->op1.zv,
    7105             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7106         137 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    7107             : 
    7108             : 
    7109             :         CHECK_EXCEPTION();
    7110         137 :         ZEND_VM_NEXT_OPCODE();
    7111             : }
    7112             : 
    7113        3205 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7114             : {
    7115        3205 :         USE_OPLINE
    7116             : 
    7117        3205 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7118             : 
    7119             :         SAVE_OPLINE();
    7120        9615 :         ZVAL_BOOL(result, fast_equal_function(result,
    7121             :                 opline->op1.zv,
    7122             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC));
    7123             : 
    7124             : 
    7125             :         CHECK_EXCEPTION();
    7126        3205 :         ZEND_VM_NEXT_OPCODE();
    7127             : }
    7128             : 
    7129         144 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7130             : {
    7131         144 :         USE_OPLINE
    7132             : 
    7133         144 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7134             : 
    7135             :         SAVE_OPLINE();
    7136         432 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    7137             :                 opline->op1.zv,
    7138             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC));
    7139             : 
    7140             : 
    7141             :         CHECK_EXCEPTION();
    7142         144 :         ZEND_VM_NEXT_OPCODE();
    7143             : }
    7144             : 
    7145     1003837 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7146             : {
    7147     1003837 :         USE_OPLINE
    7148             : 
    7149     1003837 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7150             : 
    7151             :         SAVE_OPLINE();
    7152     3011511 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    7153             :                 opline->op1.zv,
    7154             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC));
    7155             : 
    7156             : 
    7157             :         CHECK_EXCEPTION();
    7158     1003837 :         ZEND_VM_NEXT_OPCODE();
    7159             : }
    7160             : 
    7161      170913 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7162             : {
    7163      170913 :         USE_OPLINE
    7164             : 
    7165      170913 :         zval *result = &EX_T(opline->result.var).tmp_var;
    7166             : 
    7167             :         SAVE_OPLINE();
    7168      512739 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    7169             :                 opline->op1.zv,
    7170             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC));
    7171             : 
    7172             : 
    7173             :         CHECK_EXCEPTION();
    7174      170913 :         ZEND_VM_NEXT_OPCODE();
    7175             : }
    7176             : 
    7177           1 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7178             : {
    7179           1 :         USE_OPLINE
    7180             : 
    7181             : 
    7182             :         SAVE_OPLINE();
    7183           2 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    7184             :                 opline->op1.zv,
    7185             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7186             : 
    7187             : 
    7188             :         CHECK_EXCEPTION();
    7189           1 :         ZEND_VM_NEXT_OPCODE();
    7190             : }
    7191             : 
    7192           1 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7193             : {
    7194           1 :         USE_OPLINE
    7195             : 
    7196             : 
    7197             :         SAVE_OPLINE();
    7198           2 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    7199             :                 opline->op1.zv,
    7200             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7201             : 
    7202             : 
    7203             :         CHECK_EXCEPTION();
    7204           1 :         ZEND_VM_NEXT_OPCODE();
    7205             : }
    7206             : 
    7207           1 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7208             : {
    7209           1 :         USE_OPLINE
    7210             : 
    7211             : 
    7212             :         SAVE_OPLINE();
    7213           2 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    7214             :                 opline->op1.zv,
    7215             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7216             : 
    7217             : 
    7218             :         CHECK_EXCEPTION();
    7219           1 :         ZEND_VM_NEXT_OPCODE();
    7220             : }
    7221             : 
    7222           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7223             : {
    7224           0 :         USE_OPLINE
    7225             : 
    7226             : 
    7227             :         SAVE_OPLINE();
    7228           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    7229             :                 opline->op1.zv,
    7230             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7231             : 
    7232             : 
    7233             :         CHECK_EXCEPTION();
    7234           0 :         ZEND_VM_NEXT_OPCODE();
    7235             : }
    7236             : 
    7237           0 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7238             : {
    7239           0 :         USE_OPLINE
    7240             : 
    7241             :         zval *container;
    7242             : 
    7243             :         SAVE_OPLINE();
    7244           0 :         container = opline->op1.zv;
    7245           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);
    7246             : 
    7247             :         if (IS_CONST != IS_VAR || !(opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
    7248             : 
    7249             :         }
    7250             :         CHECK_EXCEPTION();
    7251           0 :         ZEND_VM_NEXT_OPCODE();
    7252             : }
    7253             : 
    7254          10 : static int ZEND_FASTCALL  ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7255             : {
    7256          10 :         USE_OPLINE
    7257             :         zval *function_name;
    7258             :         zend_class_entry *ce;
    7259          10 :         call_slot *call = EX(call_slots) + opline->result.num;
    7260             : 
    7261             :         SAVE_OPLINE();
    7262             : 
    7263             :         if (IS_CONST == IS_CONST) {
    7264             :                 /* no function found. try a static method in class */
    7265          10 :                 if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    7266           2 :                         ce = CACHED_PTR(opline->op1.literal->cache_slot);
    7267             :                 } else {
    7268           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);
    7269           8 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    7270           0 :                                 HANDLE_EXCEPTION();
    7271             :                         }
    7272           8 :                         if (UNEXPECTED(ce == NULL)) {
    7273           0 :                                 zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
    7274             :                         }
    7275           8 :                         CACHE_PTR(opline->op1.literal->cache_slot, ce);
    7276             :                 }
    7277          10 :                 call->called_scope = ce;
    7278             :         } else {
    7279             :                 ce = EX_T(opline->op1.var).class_entry;
    7280             : 
    7281             :                 if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
    7282             :                         call->called_scope = EG(called_scope);
    7283             :                 } else {
    7284             :                         call->called_scope = ce;
    7285             :                 }
    7286             :         }
    7287             : 
    7288          10 :         if (IS_CONST == IS_CONST &&
    7289             :             IS_CV == IS_CONST &&
    7290             :             CACHED_PTR(opline->op2.literal->cache_slot)) {
    7291             :                 call->fbc = CACHED_PTR(opline->op2.literal->cache_slot);
    7292          10 :         } else if (IS_CONST != IS_CONST &&
    7293             :                    IS_CV == IS_CONST &&
    7294             :                    (call->fbc = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
    7295             :                 /* do nothing */
    7296             :         } else if (IS_CV != IS_UNUSED) {
    7297          10 :                 char *function_name_strval = NULL;
    7298          10 :                 int function_name_strlen = 0;
    7299             : 
    7300             : 
    7301          10 :                 if (IS_CV == IS_CONST) {
    7302             :                         function_name_strval = Z_STRVAL_P(opline->op2.zv);
    7303             :                         function_name_strlen = Z_STRLEN_P(opline->op2.zv);
    7304             :                 } else {
    7305          20 :                         function_name = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    7306             : 
    7307          10 :                         if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    7308           2 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    7309           1 :                                         HANDLE_EXCEPTION();
    7310             :                                 }
    7311           1 :                                 zend_error_noreturn(E_ERROR, "Function name must be a string");
    7312             :                         } else {
    7313           8 :                                 function_name_strval = Z_STRVAL_P(function_name);
    7314           8 :                                 function_name_strlen = Z_STRLEN_P(function_name);
    7315             :                         }
    7316             :                 }
    7317             : 
    7318           8 :                 if (function_name_strval) {
    7319           8 :                         if (ce->get_static_method) {
    7320           0 :                                 call->fbc = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
    7321             :                         } else {
    7322           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);
    7323             :                         }
    7324           8 :                         if (UNEXPECTED(call->fbc == NULL)) {
    7325           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
    7326             :                         }
    7327           8 :                         if (IS_CV == IS_CONST &&
    7328             :                             EXPECTED(call->fbc->type <= ZEND_USER_FUNCTION) &&
    7329             :                             EXPECTED((call->fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
    7330             :                                 if (IS_CONST == IS_CONST) {
    7331             :                                         CACHE_PTR(opline->op2.literal->cache_slot, call->fbc);
    7332             :                                 } else {
    7333             :                                         CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, call->fbc);
    7334             :                                 }
    7335             :                         }
    7336             :                 }
    7337             :                 if (IS_CV != IS_CONST) {
    7338             : 
    7339             :                 }
    7340             :         } else {
    7341             :                 if (UNEXPECTED(ce->constructor == NULL)) {
    7342             :                         zend_error_noreturn(E_ERROR, "Cannot call constructor");
    7343             :                 }
    7344             :                 if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
    7345             :                         zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
    7346             :                 }
    7347             :                 call->fbc = ce->constructor;
    7348             :         }
    7349             : 
    7350           8 :         if (call->fbc->common.fn_flags & ZEND_ACC_STATIC) {
    7351           7 :                 call->object = NULL;
    7352             :         } else {
    7353           1 :                 if (EG(This) &&
    7354           0 :                     Z_OBJ_HT_P(EG(This))->get_class_entry &&
    7355           0 :                     !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
    7356             :                     /* We are calling method of the other (incompatible) class,
    7357             :                        but passing $this. This is done for compatibility with php-4. */
    7358           0 :                         if (call->fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
    7359           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);
    7360             :                         } else {
    7361             :                                 /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
    7362           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);
    7363             :                         }
    7364             :                 }
    7365           1 :                 if ((call->object = EG(This))) {
    7366           0 :                         Z_ADDREF_P(call->object);
    7367           0 :                         call->called_scope = Z_OBJCE_P(call->object);
    7368             :                 }
    7369             :         }
    7370             : 
    7371           8 :         call->num_additional_args = 0;
    7372           8 :         call->is_ctor_call = 0;
    7373           8 :         EX(call) = call;
    7374             : 
    7375             :         CHECK_EXCEPTION();
    7376           8 :         ZEND_VM_NEXT_OPCODE();
    7377             : }
    7378             : 
    7379        1125 : static int ZEND_FASTCALL  ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7380             : {
    7381        1125 :         USE_OPLINE
    7382             :         zend_class_entry *ce, *catch_ce;
    7383             :         zval *exception;
    7384             : 
    7385             :         SAVE_OPLINE();
    7386             :         /* Check whether an exception has been thrown, if not, jump over code */
    7387        1125 :         zend_exception_restore(TSRMLS_C);
    7388        1125 :         if (EG(exception) == NULL) {
    7389           0 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    7390           0 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    7391             :         }
    7392        1125 :         if (CACHED_PTR(opline->op1.literal->cache_slot)) {
    7393         295 :                 catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
    7394             :         } else {
    7395         830 :                 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);
    7396             : 
    7397         830 :                 CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
    7398             :         }
    7399        1125 :         ce = Z_OBJCE_P(EG(exception));
    7400             : 
    7401             : #ifdef HAVE_DTRACE
    7402             :         if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
    7403             :                 DTRACE_EXCEPTION_CAUGHT((char *)ce->name);
    7404             :         }
    7405             : #endif /* HAVE_DTRACE */
    7406             : 
    7407        1125 :         if (ce != catch_ce) {
    7408         512 :                 if (!instanceof_function(ce, catch_ce TSRMLS_CC)) {
    7409          10 :                         if (opline->result.num) {
    7410           5 :                                 zend_throw_exception_internal(NULL TSRMLS_CC);
    7411           5 :                                 HANDLE_EXCEPTION();
    7412             :                         }
    7413           5 :                         ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    7414           5 :                         ZEND_VM_CONTINUE(); /* CHECK_ME */
    7415             :                 }
    7416             :         }
    7417             : 
    7418        1115 :         exception = EG(exception);
    7419        1115 :         if (!EG(active_symbol_table)) {
    7420         165 :                 if (EX_CV(opline->op2.var)) {
    7421          36 :                         zval_ptr_dtor(EX_CV(opline->op2.var));
    7422             :                 }
    7423         165 :                 EX_CV(opline->op2.var) = (zval**)EX_CV_NUM(execute_data, EX(op_array)->last_var + opline->op2.var);
    7424         165 :                 *EX_CV(opline->op2.var) = EG(exception);
    7425             :         } else {
    7426         950 :                 zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.var);
    7427         950 :                 zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value,
    7428             :                     &EG(exception), sizeof(zval *), (void**)&EX_CV(opline->op2.var));
    7429             :         }
    7430        1115 :         if (UNEXPECTED(EG(exception) != exception)) {
    7431           1 :                 Z_ADDREF_P(EG(exception));
    7432           1 :                 HANDLE_EXCEPTION();
    7433             :         } else {
    7434        1114 :                 EG(exception) = NULL;
    7435        1114 :                 ZEND_VM_NEXT_OPCODE();
    7436             :         }
    7437             : }
    7438             : 
    7439           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7440             : {
    7441           0 :         USE_OPLINE
    7442             : 
    7443             : 
    7444             :         SAVE_OPLINE();
    7445           0 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    7446             :                                  opline->op1.zv,
    7447             :                                  _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7448             : 
    7449             :         CHECK_EXCEPTION();
    7450           0 :         ZEND_VM_NEXT_OPCODE();
    7451             : }
    7452             : 
    7453          66 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7454             : {
    7455          66 :         USE_OPLINE
    7456             : 
    7457             :         zval *expr_ptr;
    7458             : 
    7459             :         SAVE_OPLINE();
    7460          66 :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    7461             :                 zval **expr_ptr_ptr = NULL;
    7462             : 
    7463             :                 if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    7464             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    7465             :                 }
    7466             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    7467             :                 expr_ptr = *expr_ptr_ptr;
    7468             :                 Z_ADDREF_P(expr_ptr);
    7469             :         } else {
    7470          66 :                 expr_ptr=opline->op1.zv;
    7471          66 :                 if (0) { /* temporary variable */
    7472             :                         zval *new_expr;
    7473             : 
    7474             :                         ALLOC_ZVAL(new_expr);
    7475             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    7476             :                         expr_ptr = new_expr;
    7477             :                 } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    7478             :                         zval *new_expr;
    7479             : 
    7480          66 :                         ALLOC_ZVAL(new_expr);
    7481          66 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    7482          66 :                         expr_ptr = new_expr;
    7483          66 :                         zendi_zval_copy_ctor(*expr_ptr);
    7484             : 
    7485             :                 } else if (IS_CONST == IS_CV) {
    7486             :                         Z_ADDREF_P(expr_ptr);
    7487             :                 }
    7488             :         }
    7489             : 
    7490             :         if (IS_CV != IS_UNUSED) {
    7491             : 
    7492         132 :                 zval *offset = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    7493             :                 ulong hval;
    7494             : 
    7495          66 :                 switch (Z_TYPE_P(offset)) {
    7496             :                         case IS_DOUBLE:
    7497           0 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    7498           0 :                                 goto num_index;
    7499             :                         case IS_LONG:
    7500             :                         case IS_BOOL:
    7501           1 :                                 hval = Z_LVAL_P(offset);
    7502             : num_index:
    7503           1 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    7504           1 :                                 break;
    7505             :                         case IS_STRING:
    7506          55 :                                 if (IS_CV == IS_CONST) {
    7507             :                                         hval = Z_HASH_P(offset);
    7508             :                                 } else {
    7509          55 :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    7510          55 :                                         hval = str_hash(Z_STRVAL_P(offset), Z_STRLEN_P(offset));
    7511             :                                 }
    7512          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);
    7513          55 :                                 break;
    7514             :                         case IS_NULL:
    7515           0 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    7516           0 :                                 break;
    7517             :                         default:
    7518          10 :                                 zend_error(E_WARNING, "Illegal offset type");
    7519          10 :                                 zval_ptr_dtor(&expr_ptr);
    7520             :                                 /* do nothing */
    7521             :                                 break;
    7522             :                 }
    7523             : 
    7524             :         } else {
    7525             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    7526             :         }
    7527             :         if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
    7528             : 
    7529             :         }
    7530             :         CHECK_EXCEPTION();
    7531          66 :         ZEND_VM_NEXT_OPCODE();
    7532             : }
    7533             : 
    7534           6 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7535             : {
    7536           6 :         USE_OPLINE
    7537             : 
    7538           6 :         array_init(&EX_T(opline->result.var).tmp_var);
    7539           6 :         if (IS_CONST == IS_UNUSED) {
    7540             :                 ZEND_VM_NEXT_OPCODE();
    7541             : #if 0 || IS_CONST != IS_UNUSED
    7542             :         } else {
    7543           6 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7544             : #endif
    7545             :         }
    7546             : }
    7547             : 
    7548           0 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7549             : {
    7550           0 :         USE_OPLINE
    7551             : 
    7552             :         /* The generator object is stored in return_value_ptr_ptr */
    7553           0 :         zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
    7554             : 
    7555           0 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    7556           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    7557             :         }
    7558             : 
    7559             :         /* Destroy the previously yielded value */
    7560           0 :         if (generator->value) {
    7561           0 :                 zval_ptr_dtor(&generator->value);
    7562             :         }
    7563             : 
    7564             :         /* Destroy the previously yielded key */
    7565           0 :         if (generator->key) {
    7566           0 :                 zval_ptr_dtor(&generator->key);
    7567             :         }
    7568             : 
    7569             :         /* Set the new yielded value */
    7570             :         if (IS_CONST != IS_UNUSED) {
    7571             : 
    7572             : 
    7573           0 :                 if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    7574             :                         /* Constants and temporary variables aren't yieldable by reference,
    7575             :                          * but we still allow them with a notice. */
    7576             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
    7577             :                                 zval *value, *copy;
    7578             : 
    7579           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7580             : 
    7581           0 :                                 value = opline->op1.zv;
    7582           0 :                                 ALLOC_ZVAL(copy);
    7583           0 :                                 INIT_PZVAL_COPY(copy, value);
    7584             : 
    7585             :                                 /* Temporary variables don't need ctor copying */
    7586             :                                 if (!0) {
    7587             :                                         zval_copy_ctor(copy);
    7588             :                                 }
    7589             : 
    7590           0 :                                 generator->value = copy;
    7591             :                         } else {
    7592             :                                 zval **value_ptr = NULL;
    7593             : 
    7594             :                                 if (IS_CONST == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    7595             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    7596             :                                 }
    7597             : 
    7598             :                                 /* If a function call result is yielded and the function did
    7599             :                                  * not return by reference we throw a notice. */
    7600             :                                 if (IS_CONST == IS_VAR && !Z_ISREF_PP(value_ptr)
    7601             :                                     && !(opline->extended_value == ZEND_RETURNS_FUNCTION
    7602             :                                          && EX_T(opline->op1.var).var.fcall_returned_reference)
    7603             :                                     && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    7604             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    7605             : 
    7606             :                                         Z_ADDREF_PP(value_ptr);
    7607             :                                         generator->value = *value_ptr;
    7608             :                                 } else {
    7609             :                                         SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
    7610             :                                         Z_ADDREF_PP(value_ptr);
    7611             :                                         generator->value = *value_ptr;
    7612             :                                 }
    7613             : 
    7614             :                         }
    7615             :                 } else {
    7616           0 :                         zval *value = opline->op1.zv;
    7617             : 
    7618             :                         /* Consts, temporary variables and references need copying */
    7619             :                         if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    7620             :                                 || PZVAL_IS_REF(value)
    7621             :                         ) {
    7622             :                                 zval *copy;
    7623             : 
    7624           0 :                                 ALLOC_ZVAL(copy);
    7625           0 :                                 INIT_PZVAL_COPY(copy, value);
    7626             : 
    7627             :                                 /* Temporary variables don't need ctor copying */
    7628             :                                 if (!0) {
    7629             :                                         zval_copy_ctor(copy);
    7630             :                                 }
    7631             : 
    7632           0 :                                 generator->value = copy;
    7633             : 
    7634             :                         } else {
    7635             :                                 if (IS_CONST == IS_CV) {
    7636             :                                         Z_ADDREF_P(value);
    7637             :                                 }
    7638             :                                 generator->value = value;
    7639             :                         }
    7640             :                 }
    7641             :         } else {
    7642             :                 /* If no value was specified yield null */
    7643             :                 Z_ADDREF(EG(uninitialized_zval));
    7644             :                 generator->value = &EG(uninitialized_zval);
    7645             :         }
    7646             : 
    7647             :         /* Set the new yielded key */
    7648             :         if (IS_CV != IS_UNUSED) {
    7649             : 
    7650           0 :                 zval *key = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC);
    7651             : 
    7652             :                 /* Consts, temporary variables and references need copying */
    7653           0 :                 if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR
    7654             :                         || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
    7655             :                 ) {
    7656             :                         zval *copy;
    7657             : 
    7658           0 :                         ALLOC_ZVAL(copy);
    7659           0 :                         INIT_PZVAL_COPY(copy, key);
    7660             : 
    7661             :                         /* Temporary variables don't need ctor copying */
    7662             :                         if (!0) {
    7663             :                                 zval_copy_ctor(copy);
    7664             :                         }
    7665             : 
    7666           0 :                         generator->key = copy;
    7667             :                 } else {
    7668             :                         Z_ADDREF_P(key);
    7669           0 :                         generator->key = key;
    7670             :                 }
    7671             : 
    7672           0 :                 if (Z_TYPE_P(generator->key) == IS_LONG
    7673           0 :                     && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
    7674             :                 ) {
    7675           0 :                         generator->largest_used_integer_key = Z_LVAL_P(generator->key);
    7676             :                 }
    7677             : 
    7678             :         } else {
    7679             :                 /* If no key was specified we use auto-increment keys */
    7680             :                 generator->largest_used_integer_key++;
    7681             : 
    7682             :                 ALLOC_INIT_ZVAL(generator->key);
    7683             :                 ZVAL_LONG(generator->key, generator->largest_used_integer_key);
    7684             :         }
    7685             : 
    7686           0 :         if (RETURN_VALUE_USED(opline)) {
    7687             :                 /* If the return value of yield is used set the send
    7688             :                  * target and initialize it to NULL */
    7689           0 :                 generator->send_target = &EX_T(opline->result.var).var.ptr;
    7690             :                 Z_ADDREF(EG(uninitialized_zval));
    7691           0 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    7692             :         } else {
    7693           0 :                 generator->send_target = NULL;
    7694             :         }
    7695             : 
    7696             :         /* We increment to the next op, so we are at the correct position when the
    7697             :          * generator is resumed. */
    7698           0 :         ZEND_VM_INC_OPCODE();
    7699             : 
    7700             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    7701             :          * variable in execute_data so we don't resume at an old position. */
    7702             :         SAVE_OPLINE();
    7703             : 
    7704           0 :         ZEND_VM_RETURN();
    7705             : }
    7706             : 
    7707           0 : static int ZEND_FASTCALL  ZEND_POW_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7708             : {
    7709           0 :         USE_OPLINE
    7710             : 
    7711             : 
    7712             :         SAVE_OPLINE();
    7713           0 :         pow_function(&EX_T(opline->result.var).tmp_var,
    7714             :                 opline->op1.zv,
    7715             :                 _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op2.var TSRMLS_CC) TSRMLS_CC);
    7716             : 
    7717             : 
    7718             :         CHECK_EXCEPTION();
    7719           0 :         ZEND_VM_NEXT_OPCODE();
    7720             : }
    7721             : 
    7722           0 : static int ZEND_FASTCALL  ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7723             : {
    7724           0 :         USE_OPLINE
    7725             :         zend_free_op free_op1;
    7726             : 
    7727             :         SAVE_OPLINE();
    7728           0 :         bitwise_not_function(&EX_T(opline->result.var).tmp_var,
    7729             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC);
    7730           0 :         zval_dtor(free_op1.var);
    7731             :         CHECK_EXCEPTION();
    7732           0 :         ZEND_VM_NEXT_OPCODE();
    7733             : }
    7734             : 
    7735      181343 : static int ZEND_FASTCALL  ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7736             : {
    7737      181343 :         USE_OPLINE
    7738             :         zend_free_op free_op1;
    7739             : 
    7740             :         SAVE_OPLINE();
    7741      362686 :         boolean_not_function(&EX_T(opline->result.var).tmp_var,
    7742             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC);
    7743      181343 :         zval_dtor(free_op1.var);
    7744             :         CHECK_EXCEPTION();
    7745      181343 :         ZEND_VM_NEXT_OPCODE();
    7746             : }
    7747             : 
    7748      110445 : static int ZEND_FASTCALL  ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7749             : {
    7750      110445 :         USE_OPLINE
    7751             :         zend_free_op free_op1;
    7752             :         zval *z;
    7753             : 
    7754             :         SAVE_OPLINE();
    7755      220890 :         z = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7756             : 
    7757      110445 :         if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(z) == IS_OBJECT) {
    7758           1 :                 INIT_PZVAL(z);
    7759             :         }
    7760      110445 :         zend_print_variable(z);
    7761             : 
    7762      110445 :         zval_dtor(free_op1.var);
    7763             :         CHECK_EXCEPTION();
    7764      110445 :         ZEND_VM_NEXT_OPCODE();
    7765             : }
    7766             : 
    7767        8162 : static int ZEND_FASTCALL  ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7768             : {
    7769        8162 :         USE_OPLINE
    7770             : 
    7771        8162 :         ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
    7772        8162 :         return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7773             : }
    7774             : 
    7775    14755173 : static int ZEND_FASTCALL  ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7776             : {
    7777    14755173 :         USE_OPLINE
    7778             :         zend_free_op free_op1;
    7779             :         zval *val;
    7780             :         int ret;
    7781             : 
    7782             :         SAVE_OPLINE();
    7783    29510346 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7784             : 
    7785    14755173 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    7786    14583659 :                 ret = Z_LVAL_P(val);
    7787             :         } else {
    7788      171514 :                 ret = i_zend_is_true(val TSRMLS_CC);
    7789      171514 :                 zval_dtor(free_op1.var);
    7790      171514 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7791           0 :                         HANDLE_EXCEPTION();
    7792             :                 }
    7793             :         }
    7794    14755173 :         if (!ret) {
    7795             : #if DEBUG_ZEND>=2
    7796             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    7797             : #endif
    7798     9572181 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    7799     9572181 :                 ZEND_VM_CONTINUE();
    7800             :         }
    7801             : 
    7802     5182992 :         ZEND_VM_NEXT_OPCODE();
    7803             : }
    7804             : 
    7805       95689 : static int ZEND_FASTCALL  ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7806             : {
    7807       95689 :         USE_OPLINE
    7808             :         zend_free_op free_op1;
    7809             :         zval *val;
    7810             :         int ret;
    7811             : 
    7812             :         SAVE_OPLINE();
    7813      191378 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7814             : 
    7815       95689 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    7816       95689 :                 ret = Z_LVAL_P(val);
    7817             :         } else {
    7818           0 :                 ret = i_zend_is_true(val TSRMLS_CC);
    7819           0 :                 zval_dtor(free_op1.var);
    7820           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7821           0 :                         HANDLE_EXCEPTION();
    7822             :                 }
    7823             :         }
    7824       95689 :         if (ret) {
    7825             : #if DEBUG_ZEND>=2
    7826             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    7827             : #endif
    7828       95342 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    7829       95342 :                 ZEND_VM_CONTINUE();
    7830             :         }
    7831             : 
    7832         347 :         ZEND_VM_NEXT_OPCODE();
    7833             : }
    7834             : 
    7835     4080700 : static int ZEND_FASTCALL  ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7836             : {
    7837     4080700 :         USE_OPLINE
    7838             :         zend_free_op free_op1;
    7839             :         zval *val;
    7840             :         int retval;
    7841             : 
    7842             :         SAVE_OPLINE();
    7843     8161400 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7844             : 
    7845     4080700 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    7846     4080700 :                 retval = Z_LVAL_P(val);
    7847             :         } else {
    7848           0 :                 retval = i_zend_is_true(val TSRMLS_CC);
    7849           0 :                 zval_dtor(free_op1.var);
    7850           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7851           0 :                         HANDLE_EXCEPTION();
    7852             :                 }
    7853             :         }
    7854     4080700 :         if (EXPECTED(retval != 0)) {
    7855             : #if DEBUG_ZEND>=2
    7856             :                 printf("Conditional jmp on true to %d\n", opline->extended_value);
    7857             : #endif
    7858     3911930 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
    7859     3911930 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    7860             :         } else {
    7861             : #if DEBUG_ZEND>=2
    7862             :                 printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
    7863             : #endif
    7864      168770 :                 ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
    7865      168770 :                 ZEND_VM_CONTINUE(); /* CHECK_ME */
    7866             :         }
    7867             : }
    7868             : 
    7869     2391121 : static int ZEND_FASTCALL  ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7870             : {
    7871     2391121 :         USE_OPLINE
    7872             :         zend_free_op free_op1;
    7873             :         zval *val;
    7874             :         int retval;
    7875             : 
    7876             :         SAVE_OPLINE();
    7877     4782242 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7878             : 
    7879     2391121 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    7880     2391112 :                 retval = Z_LVAL_P(val);
    7881             :         } else {
    7882           9 :                 retval = i_zend_is_true(val TSRMLS_CC);
    7883           9 :                 zval_dtor(free_op1.var);
    7884           9 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7885           0 :                         HANDLE_EXCEPTION();
    7886             :                 }
    7887             :         }
    7888     2391121 :         Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
    7889     2391121 :         Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
    7890     2391121 :         if (!retval) {
    7891             : #if DEBUG_ZEND>=2
    7892             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    7893             : #endif
    7894     1037776 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    7895     1037776 :                 ZEND_VM_CONTINUE();
    7896             :         }
    7897     1353345 :         ZEND_VM_NEXT_OPCODE();
    7898             : }
    7899             : 
    7900      364398 : static int ZEND_FASTCALL  ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7901             : {
    7902      364398 :         USE_OPLINE
    7903             :         zend_free_op free_op1;
    7904             :         zval *val;
    7905             :         int retval;
    7906             : 
    7907             :         SAVE_OPLINE();
    7908      728796 :         val = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7909             : 
    7910      364398 :         if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
    7911      364398 :                 retval = Z_LVAL_P(val);
    7912             :         } else {
    7913           0 :                 retval = i_zend_is_true(val TSRMLS_CC);
    7914           0 :                 zval_dtor(free_op1.var);
    7915           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    7916           0 :                         HANDLE_EXCEPTION();
    7917             :                 }
    7918             :         }
    7919      364398 :         Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
    7920      364398 :         Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
    7921      364398 :         if (retval) {
    7922             : #if DEBUG_ZEND>=2
    7923             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    7924             : #endif
    7925       53041 :                 ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
    7926       53041 :                 ZEND_VM_CONTINUE();
    7927             :         }
    7928      311357 :         ZEND_VM_NEXT_OPCODE();
    7929             : }
    7930             : 
    7931     4669863 : static int ZEND_FASTCALL  ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7932             : {
    7933     4669863 :         USE_OPLINE
    7934             : 
    7935             :         SAVE_OPLINE();
    7936             :         if (IS_TMP_VAR == IS_TMP_VAR) {
    7937     4669863 :                 zendi_zval_dtor(EX_T(opline->op1.var).tmp_var);
    7938             :         } else {
    7939             :                 zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
    7940             :         }
    7941             :         CHECK_EXCEPTION();
    7942     4669863 :         ZEND_VM_NEXT_OPCODE();
    7943             : }
    7944             : 
    7945      308312 : static int ZEND_FASTCALL  ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7946             : {
    7947      308312 :         USE_OPLINE
    7948             :         zval *retval_ptr;
    7949             :         zend_free_op free_op1;
    7950             : 
    7951             :         SAVE_OPLINE();
    7952      616624 :         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    7953             : 
    7954      308312 :         if (!EG(return_value_ptr_ptr)) {
    7955           0 :                 zval_dtor(free_op1.var);
    7956             :         } else {
    7957             :                 if (IS_TMP_VAR == IS_CONST ||
    7958             :                     IS_TMP_VAR == IS_TMP_VAR ||
    7959             :                     PZVAL_IS_REF(retval_ptr)) {
    7960             :                         zval *ret;
    7961             : 
    7962      308312 :                         ALLOC_ZVAL(ret);
    7963      308312 :                         INIT_PZVAL_COPY(ret, retval_ptr);
    7964      308312 :                         if (IS_TMP_VAR != IS_TMP_VAR) {
    7965             :                                 zval_copy_ctor(ret);
    7966             :                         }
    7967      308312 :                         *EG(return_value_ptr_ptr) = ret;
    7968             : 
    7969             :                 } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
    7970             :                            retval_ptr == &EG(uninitialized_zval)) {
    7971             :                         zval *ret;
    7972             : 
    7973             :                         if (IS_TMP_VAR == IS_VAR) {
    7974             :                                 Z_DELREF_P(retval_ptr);
    7975             :                         }
    7976             :                         ALLOC_INIT_ZVAL(ret);
    7977             :                         *EG(return_value_ptr_ptr) = ret;
    7978             :                 } else {
    7979             :                         *EG(return_value_ptr_ptr) = retval_ptr;
    7980             :                         if (IS_TMP_VAR == IS_CV) {
    7981             :                                 Z_ADDREF_P(retval_ptr);
    7982             :                         }
    7983             :                 }
    7984             :         }
    7985      308312 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    7986             : }
    7987             : 
    7988           0 : static int ZEND_FASTCALL  ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    7989             : {
    7990           0 :         USE_OPLINE
    7991             :         zval *retval_ptr;
    7992             :         zval **retval_ptr_ptr;
    7993             :         zend_free_op free_op1;
    7994             : 
    7995             :         SAVE_OPLINE();
    7996             : 
    7997             :         do {
    7998             :                 if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR ||
    7999             :                     (IS_TMP_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_VALUE)) {
    8000             :                         /* Not supposed to happen, but we'll allow it */
    8001           0 :                         zend_error(E_NOTICE, "Only variable references should be returned by reference");
    8002             : 
    8003           0 :                         retval_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8004           0 :                         if (!EG(return_value_ptr_ptr)) {
    8005             :                                 if (IS_TMP_VAR == IS_TMP_VAR) {
    8006           0 :                                         zval_dtor(free_op1.var);
    8007             :                                 }
    8008           0 :                         } else if (!1) { /* Not a temp var */
    8009             :                                 zval *ret;
    8010             : 
    8011             :                                 ALLOC_ZVAL(ret);
    8012             :                                 INIT_PZVAL_COPY(ret, retval_ptr);
    8013             :                                 zval_copy_ctor(ret);
    8014             :                                 *EG(return_value_ptr_ptr) = ret;
    8015             :                         } else {
    8016             :                                 zval *ret;
    8017             : 
    8018           0 :                                 ALLOC_ZVAL(ret);
    8019           0 :                                 INIT_PZVAL_COPY(ret, retval_ptr);
    8020           0 :                                 *EG(return_value_ptr_ptr) = ret;
    8021             :                         }
    8022           0 :                         break;
    8023             :                 }
    8024             : 
    8025             :                 retval_ptr_ptr = NULL;
    8026             : 
    8027             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
    8028             :                         zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
    8029             :                 }
    8030             : 
    8031             :                 if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
    8032             :                         if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
    8033             :                             EX_T(opline->op1.var).var.fcall_returned_reference) {
    8034             :                         } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    8035             :                                 zend_error(E_NOTICE, "Only variable references should be returned by reference");
    8036             :                                 if (EG(return_value_ptr_ptr)) {
    8037             :                                         zval *ret;
    8038             : 
    8039             :                                         ALLOC_ZVAL(ret);
    8040             :                                         INIT_PZVAL_COPY(ret, *retval_ptr_ptr);
    8041             :                                         zval_copy_ctor(ret);
    8042             :                                         *EG(return_value_ptr_ptr) = ret;
    8043             :                                 }
    8044             :                                 break;
    8045             :                         }
    8046             :                 }
    8047             : 
    8048             :                 if (EG(return_value_ptr_ptr)) {
    8049             :                         SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
    8050             :                         Z_ADDREF_PP(retval_ptr_ptr);
    8051             : 
    8052             :                         *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
    8053             :                 }
    8054             :         } while (0);
    8055             : 
    8056           0 :         return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    8057             : }
    8058             : 
    8059           0 : static int ZEND_FASTCALL  ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8060             : {
    8061           0 :         USE_OPLINE
    8062             :         zval *value;
    8063             :         zval *exception;
    8064             :         zend_free_op free_op1;
    8065             : 
    8066             :         SAVE_OPLINE();
    8067           0 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8068             : 
    8069           0 :         if (IS_TMP_VAR == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
    8070           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    8071           0 :                         HANDLE_EXCEPTION();
    8072             :                 }
    8073           0 :                 zend_error_noreturn(E_ERROR, "Can only throw objects");
    8074             :         }
    8075             : 
    8076           0 :         zend_exception_save(TSRMLS_C);
    8077             :         /* Not sure if a complete copy is what we want here */
    8078           0 :         ALLOC_ZVAL(exception);
    8079           0 :         INIT_PZVAL_COPY(exception, value);
    8080           0 :         if (!1) {
    8081             :                 zval_copy_ctor(exception);
    8082             :         }
    8083             : 
    8084           0 :         zend_throw_exception_object(exception TSRMLS_CC);
    8085           0 :         zend_exception_restore(TSRMLS_C);
    8086             : 
    8087           0 :         HANDLE_EXCEPTION();
    8088             : }
    8089             : 
    8090     1924601 : static int ZEND_FASTCALL  ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8091             : {
    8092     1924601 :         USE_OPLINE
    8093             : 
    8094             :         SAVE_OPLINE();
    8095     1924601 :         if (opline->extended_value == ZEND_DO_FCALL_BY_NAME) {
    8096       33184 :                 if (ARG_MUST_BE_SENT_BY_REF(EX(call)->fbc, opline->op2.num)) {
    8097           0 :                         zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.num);
    8098             :                 }
    8099             :         }
    8100             : 
    8101             :         {
    8102             :                 zval *valptr;
    8103             :                 zval *value;
    8104             :                 zend_free_op free_op1;
    8105             : 
    8106     3849202 :                 value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8107             : 
    8108     1924601 :                 ALLOC_ZVAL(valptr);
    8109     1924601 :                 INIT_PZVAL_COPY(valptr, value);
    8110     1924601 :                 if (!1) {
    8111             :                         zval_copy_ctor(valptr);
    8112             :                 }
    8113             :                 zend_vm_stack_push(valptr TSRMLS_CC);
    8114             : 
    8115             :         }
    8116             :         CHECK_EXCEPTION();
    8117     1924601 :         ZEND_VM_NEXT_OPCODE();
    8118             : }
    8119             : 
    8120     1343854 : static int ZEND_FASTCALL  ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8121             : {
    8122     1343854 :         USE_OPLINE
    8123             :         zend_free_op free_op1;
    8124     1343854 :         zval *retval = &EX_T(opline->result.var).tmp_var;
    8125             : 
    8126             :         SAVE_OPLINE();
    8127             :         /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
    8128     2687708 :         ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC));
    8129     1343854 :         zval_dtor(free_op1.var);
    8130             : 
    8131             :         CHECK_EXCEPTION();
    8132     1343854 :         ZEND_VM_NEXT_OPCODE();
    8133             : }
    8134             : 
    8135           2 : static int ZEND_FASTCALL  ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8136             : {
    8137           2 :         USE_OPLINE
    8138             :         zend_free_op free_op1;
    8139             :         zval *obj;
    8140             :         zend_class_entry *ce;
    8141             :         zend_function *clone;
    8142             :         zend_object_clone_obj_t clone_call;
    8143             : 
    8144             :         SAVE_OPLINE();
    8145           4 :         obj = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8146             : 
    8147           2 :         if (IS_TMP_VAR == IS_CONST ||
    8148             :             UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
    8149           2 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    8150           0 :                         HANDLE_EXCEPTION();
    8151             :                 }
    8152           2 :                 zend_error_noreturn(E_ERROR, "__clone method called on non-object");
    8153             :         }
    8154             : 
    8155           0 :         ce = Z_OBJCE_P(obj);
    8156           0 :         clone = ce ? ce->clone : NULL;
    8157           0 :         clone_call =  Z_OBJ_HT_P(obj)->clone_obj;
    8158           0 :         if (UNEXPECTED(clone_call == NULL)) {
    8159           0 :                 if (ce) {
    8160           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
    8161             :                 } else {
    8162           0 :                         zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object");
    8163             :                 }
    8164             :         }
    8165             : 
    8166           0 :         if (ce && clone) {
    8167           0 :                 if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
    8168             :                         /* Ensure that if we're calling a private function, we're allowed to do so.
    8169             :                          */
    8170           0 :                         if (UNEXPECTED(ce != EG(scope))) {
    8171           0 :                                 zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
    8172             :                         }
    8173           0 :                 } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
    8174             :                         /* Ensure that if we're calling a protected function, we're allowed to do so.
    8175             :                          */
    8176           0 :                         if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
    8177           0 :                                 zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
    8178             :                         }
    8179             :                 }
    8180             :         }
    8181             : 
    8182           0 :         if (EXPECTED(EG(exception) == NULL)) {
    8183             :                 zval *retval;
    8184             : 
    8185           0 :                 ALLOC_ZVAL(retval);
    8186           0 :                 Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
    8187           0 :                 Z_TYPE_P(retval) = IS_OBJECT;
    8188           0 :                 Z_SET_REFCOUNT_P(retval, 1);
    8189           0 :                 Z_SET_ISREF_P(retval);
    8190           0 :                 if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
    8191           0 :                         zval_ptr_dtor(&retval);
    8192             :                 } else {
    8193           0 :                         EX_T(opline->result.var).var.ptr = retval;
    8194             :                 }
    8195             :         }
    8196             : 
    8197             :         CHECK_EXCEPTION();
    8198           0 :         ZEND_VM_NEXT_OPCODE();
    8199             : }
    8200             : 
    8201         183 : static int ZEND_FASTCALL  ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8202             : {
    8203         183 :         USE_OPLINE
    8204             :         zend_free_op free_op1;
    8205             :         zval *expr;
    8206         183 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8207             : 
    8208             :         SAVE_OPLINE();
    8209         366 :         expr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8210             : 
    8211         183 :         if (opline->extended_value != IS_STRING) {
    8212         106 :                 ZVAL_COPY_VALUE(result, expr);
    8213         106 :                 if (!1) {
    8214             :                         zendi_zval_copy_ctor(*result);
    8215             :                 }
    8216             :         }
    8217         183 :         switch (opline->extended_value) {
    8218             :                 case IS_NULL:
    8219           0 :                         convert_to_null(result);
    8220           0 :                         break;
    8221             :                 case IS_BOOL:
    8222           3 :                         convert_to_boolean(result);
    8223           3 :                         break;
    8224             :                 case IS_LONG:
    8225          40 :                         convert_to_long(result);
    8226          40 :                         break;
    8227             :                 case IS_DOUBLE:
    8228           4 :                         convert_to_double(result);
    8229           4 :                         break;
    8230             :                 case IS_STRING: {
    8231             :                         zval var_copy;
    8232             :                         int use_copy;
    8233             : 
    8234          77 :                         zend_make_printable_zval(expr, &var_copy, &use_copy);
    8235          77 :                         if (use_copy) {
    8236          77 :                                 ZVAL_COPY_VALUE(result, &var_copy);
    8237             :                                 if (1) {
    8238          77 :                                         zval_dtor(free_op1.var);
    8239             :                                 }
    8240             :                         } else {
    8241           0 :                                 ZVAL_COPY_VALUE(result, expr);
    8242           0 :                                 if (!1) {
    8243             :                                         zendi_zval_copy_ctor(*result);
    8244             :                                 }
    8245             :                         }
    8246          77 :                         break;
    8247             :                 }
    8248             :                 case IS_ARRAY:
    8249           1 :                         convert_to_array(result);
    8250           1 :                         break;
    8251             :                 case IS_OBJECT:
    8252          58 :                         convert_to_object(result);
    8253             :                         break;
    8254             :         }
    8255             : 
    8256             :         CHECK_EXCEPTION();
    8257         183 :         ZEND_VM_NEXT_OPCODE();
    8258             : }
    8259             : 
    8260        3986 : static int ZEND_FASTCALL  ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8261             : {
    8262        3986 :         USE_OPLINE
    8263        3986 :         zend_op_array *new_op_array=NULL;
    8264             :         zend_free_op free_op1;
    8265             :         zval *inc_filename;
    8266        3986 :         zval *tmp_inc_filename = NULL;
    8267        3986 :         zend_bool failure_retval=0;
    8268             : 
    8269             :         SAVE_OPLINE();
    8270        7972 :         inc_filename = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8271             : 
    8272        3986 :         if (inc_filename->type!=IS_STRING) {
    8273           0 :                 MAKE_STD_ZVAL(tmp_inc_filename);
    8274           0 :                 ZVAL_COPY_VALUE(tmp_inc_filename, inc_filename);
    8275           0 :                 zval_copy_ctor(tmp_inc_filename);
    8276           0 :                 convert_to_string(tmp_inc_filename);
    8277           0 :                 inc_filename = tmp_inc_filename;
    8278             :         }
    8279             : 
    8280        3986 :         if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
    8281           0 :                 if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
    8282           0 :                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    8283             :                 } else {
    8284           0 :                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    8285             :                 }
    8286             :         } else {
    8287        3986 :                 switch (opline->extended_value) {
    8288             :                         case ZEND_INCLUDE_ONCE:
    8289             :                         case ZEND_REQUIRE_ONCE: {
    8290             :                                         zend_file_handle file_handle;
    8291             :                                         char *resolved_path;
    8292             : 
    8293        1966 :                                         resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC);
    8294        1966 :                                         if (resolved_path) {
    8295        1966 :                                                 failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1);
    8296             :                                         } else {
    8297           0 :                                                 resolved_path = Z_STRVAL_P(inc_filename);
    8298             :                                         }
    8299             : 
    8300        1966 :                                         if (failure_retval) {
    8301             :                                                 /* do nothing, file already included */
    8302        1960 :                                         } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) {
    8303             : 
    8304        1960 :                                                 if (!file_handle.opened_path) {
    8305           0 :                                                         file_handle.opened_path = estrdup(resolved_path);
    8306             :                                                 }
    8307             : 
    8308        1960 :                                                 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
    8309        1960 :                                                         new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
    8310        1960 :                                                         zend_destroy_file_handle(&file_handle TSRMLS_CC);
    8311             :                                                 } else {
    8312           0 :                                                         zend_file_handle_dtor(&file_handle TSRMLS_CC);
    8313           0 :                                                         failure_retval=1;
    8314             :                                                 }
    8315             :                                         } else {
    8316           0 :                                                 if (opline->extended_value == ZEND_INCLUDE_ONCE) {
    8317           0 :                                                         zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    8318             :                                                 } else {
    8319           0 :                                                         zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
    8320             :                                                 }
    8321             :                                         }
    8322        1966 :                                         if (resolved_path != Z_STRVAL_P(inc_filename)) {
    8323        1966 :                                                 efree(resolved_path);
    8324             :                                         }
    8325             :                                 }
    8326        1966 :                                 break;
    8327             :                         case ZEND_INCLUDE:
    8328             :                         case ZEND_REQUIRE:
    8329        1544 :                                 new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
    8330        1543 :                                 break;
    8331             :                         case ZEND_EVAL: {
    8332         476 :                                         char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
    8333             : 
    8334         476 :                                         new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
    8335         476 :                                         efree(eval_desc);
    8336             :                                 }
    8337             :                                 break;
    8338             :                         EMPTY_SWITCH_DEFAULT_CASE()
    8339             :                 }
    8340             :         }
    8341        3985 :         if (tmp_inc_filename) {
    8342           0 :                 zval_ptr_dtor(&tmp_inc_filename);
    8343             :         }
    8344        3985 :         zval_dtor(free_op1.var);
    8345        3985 :         if (UNEXPECTED(EG(exception) != NULL)) {
    8346           0 :                 HANDLE_EXCEPTION();
    8347        3985 :         } else if (EXPECTED(new_op_array != NULL)) {
    8348        3964 :                 EX(original_return_value) = EG(return_value_ptr_ptr);
    8349        3964 :                 EG(active_op_array) = new_op_array;
    8350        3964 :                 if (RETURN_VALUE_USED(opline)) {
    8351         402 :                         EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    8352         402 :                         EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
    8353             :                 } else {
    8354        3562 :                         EG(return_value_ptr_ptr) = NULL;
    8355             :                 }
    8356             : 
    8357        3964 :                 EX(function_state).function = (zend_function *) new_op_array;
    8358        3964 :                 EX(object) = NULL;
    8359             : 
    8360        3964 :                 if (!EG(active_symbol_table)) {
    8361          57 :                         zend_rebuild_symbol_table(TSRMLS_C);
    8362             :                 }
    8363             : 
    8364        3964 :                 if (EXPECTED(zend_execute_ex == execute_ex)) {
    8365        3964 :                         ZEND_VM_ENTER();
    8366             :                 } else {
    8367           0 :                         zend_execute(new_op_array TSRMLS_CC);
    8368             :                 }
    8369             : 
    8370           0 :                 EX(function_state).function = (zend_function *) EX(op_array);
    8371             : 
    8372           0 :                 EG(opline_ptr) = &EX(opline);
    8373           0 :                 EG(active_op_array) = EX(op_array);
    8374           0 :                 EG(return_value_ptr_ptr) = EX(original_return_value);
    8375           0 :                 destroy_op_array(new_op_array TSRMLS_CC);
    8376           0 :                 efree(new_op_array);
    8377           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    8378           0 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
    8379           0 :                         HANDLE_EXCEPTION();
    8380             :                 }
    8381             : 
    8382          21 :         } else if (RETURN_VALUE_USED(opline)) {
    8383             :                 zval *retval;
    8384             : 
    8385           0 :                 ALLOC_ZVAL(retval);
    8386           0 :                 ZVAL_BOOL(retval, failure_retval);
    8387           0 :                 INIT_PZVAL(retval);
    8388           0 :                 EX_T(opline->result.var).var.ptr = retval;
    8389             :         }
    8390          21 :         ZEND_VM_NEXT_OPCODE();
    8391             : }
    8392             : 
    8393       34567 : static int ZEND_FASTCALL  ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8394             : {
    8395       34567 :         USE_OPLINE
    8396             :         zend_free_op free_op1;
    8397             :         zval *array_ptr, **array_ptr_ptr;
    8398             :         HashTable *fe_ht;
    8399       34567 :         zend_object_iterator *iter = NULL;
    8400       34567 :         zend_class_entry *ce = NULL;
    8401       34567 :         zend_bool is_empty = 0;
    8402             : 
    8403             :         SAVE_OPLINE();
    8404             : 
    8405       34567 :         if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
    8406             :             (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
    8407             :                 array_ptr_ptr = NULL;
    8408             :                 if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
    8409             :                         MAKE_STD_ZVAL(array_ptr);
    8410             :                         ZVAL_NULL(array_ptr);
    8411             :                 } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
    8412             :                         if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
    8413             :                                 zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
    8414             :                                 ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
    8415             :                         }
    8416             : 
    8417             :                         ce = Z_OBJCE_PP(array_ptr_ptr);
    8418             :                         if (!ce || ce->get_iterator == NULL) {
    8419             :                                 SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
    8420             :                                 Z_ADDREF_PP(array_ptr_ptr);
    8421             :                         }
    8422             :                         array_ptr = *array_ptr_ptr;
    8423             :                 } else {
    8424             :                         if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) {
    8425             :                                 SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr);
    8426             :                                 if (opline->extended_value & ZEND_FE_FETCH_BYREF) {
    8427             :                                         Z_SET_ISREF_PP(array_ptr_ptr);
    8428             :                                 }
    8429             :                         }
    8430             :                         array_ptr = *array_ptr_ptr;
    8431             :                         Z_ADDREF_P(array_ptr);
    8432             :                 }
    8433             :         } else {
    8434       69134 :                 array_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8435             :                 if (1) { /* IS_TMP_VAR */
    8436             :                         zval *tmp;
    8437             : 
    8438       34567 :                         ALLOC_ZVAL(tmp);
    8439       34567 :                         INIT_PZVAL_COPY(tmp, array_ptr);
    8440       34567 :                         array_ptr = tmp;
    8441       34567 :                         if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    8442           1 :                                 ce = Z_OBJCE_P(array_ptr);
    8443           1 :                                 if (ce && ce->get_iterator) {
    8444           0 :                                         Z_DELREF_P(array_ptr);
    8445             :                                 }
    8446             :                         }
    8447             :                 } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
    8448             :                         ce = Z_OBJCE_P(array_ptr);
    8449             :                         if (!ce || !ce->get_iterator) {
    8450             :                                 if (IS_TMP_VAR == IS_CV) {
    8451             :                                         Z_ADDREF_P(array_ptr);
    8452             :                                 }
    8453             :                         }
    8454             :                 } else if (IS_TMP_VAR == IS_CONST ||
    8455             :                            (IS_TMP_VAR == IS_CV &&
    8456             :                             !Z_ISREF_P(array_ptr) &&
    8457             :                             Z_REFCOUNT_P(array_ptr) > 1) ||
    8458             :                            (IS_TMP_VAR == IS_VAR &&
    8459             :                             !Z_ISREF_P(array_ptr) &&
    8460             :                             Z_REFCOUNT_P(array_ptr) > 2)) {
    8461             :                         zval *tmp;
    8462             : 
    8463             :                         if (IS_TMP_VAR == IS_VAR) {
    8464             :                                 Z_DELREF_P(array_ptr);
    8465             :                         }
    8466             :                         ALLOC_ZVAL(tmp);
    8467             :                         INIT_PZVAL_COPY(tmp, array_ptr);
    8468             :                         zval_copy_ctor(tmp);
    8469             :                         array_ptr = tmp;
    8470             :                 } else if (IS_TMP_VAR == IS_CV) {
    8471             :                         Z_ADDREF_P(array_ptr);
    8472             :                 }
    8473             :         }
    8474             : 
    8475       34567 :         if (ce && ce->get_iterator) {
    8476           0 :                 iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
    8477             : 
    8478             :                 if (IS_TMP_VAR == IS_VAR && !(opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
    8479             : 
    8480             :                 }
    8481           0 :                 if (iter && EXPECTED(EG(exception) == NULL)) {
    8482           0 :                         array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
    8483             :                 } else {
    8484             :                         if (IS_TMP_VAR == IS_VAR && opline->extended_value & ZEND_FE_RESET_VARIABLE) {
    8485             : 
    8486             :                         }
    8487           0 :                         if (!EG(exception)) {
    8488           0 :                                 zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
    8489             :                         }
    8490           0 :                         zend_throw_exception_internal(NULL TSRMLS_CC);
    8491           0 :                         HANDLE_EXCEPTION();
    8492             :                 }
    8493             :         }
    8494             : 
    8495       34567 :         EX_T(opline->result.var).fe.ptr = array_ptr;
    8496             : 
    8497       34567 :         if (iter) {
    8498           0 :                 iter->index = 0;
    8499           0 :                 if (iter->funcs->rewind) {
    8500           0 :                         iter->funcs->rewind(iter TSRMLS_CC);
    8501           0 :                         if (UNEXPECTED(EG(exception) != NULL)) {
    8502           0 :                                 zval_ptr_dtor(&array_ptr);
    8503             :                                 if (IS_TMP_VAR == IS_VAR && opline->extended_value & ZEND_FE_RESET_VARIABLE) {
    8504             : 
    8505             :                                 }
    8506           0 :                                 HANDLE_EXCEPTION();
    8507             :                         }
    8508             :                 }
    8509           0 :                 is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
    8510           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    8511           0 :                         zval_ptr_dtor(&array_ptr);
    8512             :                         if (IS_TMP_VAR == IS_VAR && opline->extended_value & ZEND_FE_RESET_VARIABLE) {
    8513             : 
    8514             :                         }
    8515           0 :                         HANDLE_EXCEPTION();
    8516             :                 }
    8517           0 :                 iter->index = -1; /* will be set to 0 before using next handler */
    8518       34567 :         } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
    8519       34567 :                 zend_hash_internal_pointer_reset(fe_ht);
    8520       34567 :                 if (ce) {
    8521           1 :                         zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC);
    8522           2 :                         while (zend_hash_has_more_elements(fe_ht) == SUCCESS) {
    8523             :                                 char *str_key;
    8524             :                                 uint str_key_len;
    8525             :                                 ulong int_key;
    8526             :                                 zend_uchar key_type;
    8527             : 
    8528           0 :                                 key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
    8529           0 :                                 if (key_type != HASH_KEY_NON_EXISTENT &&
    8530             :                                         (key_type == HASH_KEY_IS_LONG ||
    8531           0 :                                      zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
    8532             :                                         break;
    8533             :                                 }
    8534           0 :                                 zend_hash_move_forward(fe_ht);
    8535             :                         }
    8536             :                 }
    8537       34567 :                 is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
    8538       34567 :                 zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
    8539             :         } else {
    8540           0 :                 zend_error(E_WARNING, "Invalid argument supplied for foreach()");
    8541           0 :                 is_empty = 1;
    8542             :         }
    8543             : 
    8544             :         if (IS_TMP_VAR == IS_VAR && opline->extended_value & ZEND_FE_RESET_VARIABLE) {
    8545             : 
    8546             :         }
    8547       34567 :         if (is_empty) {
    8548           1 :                 ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
    8549             :         } else {
    8550             :                 CHECK_EXCEPTION();
    8551       34566 :                 ZEND_VM_NEXT_OPCODE();
    8552             :         }
    8553             : }
    8554             : 
    8555          64 : static int ZEND_FASTCALL  ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8556             : {
    8557             : #if 0 || (IS_TMP_VAR != IS_UNUSED)
    8558          64 :         USE_OPLINE
    8559             : 
    8560             :         SAVE_OPLINE();
    8561             :         if (IS_TMP_VAR != IS_UNUSED) {
    8562             :                 zend_free_op free_op1;
    8563         128 :                 zval *ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8564             : 
    8565          64 :                 if (Z_TYPE_P(ptr) == IS_LONG) {
    8566           0 :                         EG(exit_status) = Z_LVAL_P(ptr);
    8567             :                 } else {
    8568          64 :                         zend_print_variable(ptr);
    8569             :                 }
    8570          64 :                 zval_dtor(free_op1.var);
    8571             :         }
    8572             : #endif
    8573          64 :         zend_bailout();
    8574           0 :         ZEND_VM_NEXT_OPCODE(); /* Never reached */
    8575             : }
    8576             : 
    8577     1528796 : static int ZEND_FASTCALL  ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8578             : {
    8579     1528796 :         USE_OPLINE
    8580             :         zval restored_error_reporting;
    8581             : 
    8582             :         SAVE_OPLINE();
    8583     1528796 :         if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.var).tmp_var) != 0) {
    8584     1262196 :                 Z_TYPE(restored_error_reporting) = IS_LONG;
    8585     1262196 :                 Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.var).tmp_var);
    8586     1262196 :                 EG(error_reporting) = Z_LVAL(restored_error_reporting);
    8587     1262196 :                 convert_to_string(&restored_error_reporting);
    8588     1262196 :                 if (EXPECTED(EG(error_reporting_ini_entry) != NULL)) {
    8589     1262196 :                         if (EXPECTED(EG(error_reporting_ini_entry)->modified &&
    8590             :                             EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value)) {
    8591     1262196 :                                 efree(EG(error_reporting_ini_entry)->value);
    8592             :                         }
    8593     1262196 :                         EG(error_reporting_ini_entry)->value = Z_STRVAL(restored_error_reporting);
    8594     1262196 :                         EG(error_reporting_ini_entry)->value_length = Z_STRLEN(restored_error_reporting);
    8595             :                 } else {
    8596             :                         zendi_zval_dtor(restored_error_reporting);
    8597             :                 }
    8598             :         }
    8599     1528796 :         if (EX(old_error_reporting) == &EX_T(opline->op1.var).tmp_var) {
    8600     1528793 :                 EX(old_error_reporting) = NULL;
    8601             :         }
    8602             :         CHECK_EXCEPTION();
    8603     1528796 :         ZEND_VM_NEXT_OPCODE();
    8604             : }
    8605             : 
    8606           0 : static int ZEND_FASTCALL  ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8607             : {
    8608           0 :         USE_OPLINE
    8609             :         zend_free_op free_op1;
    8610             :         zval *value;
    8611             : 
    8612             :         SAVE_OPLINE();
    8613           0 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8614             : 
    8615           0 :         if (i_zend_is_true(value TSRMLS_CC)) {
    8616           0 :                 ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
    8617           0 :                 if (!1) {
    8618             :                         zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
    8619             :                 }
    8620             : 
    8621             : #if DEBUG_ZEND>=2
    8622             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    8623             : #endif
    8624           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    8625             :         }
    8626             : 
    8627           0 :         zval_dtor(free_op1.var);
    8628             :         CHECK_EXCEPTION();
    8629           0 :         ZEND_VM_NEXT_OPCODE();
    8630             : }
    8631             : 
    8632           0 : static int ZEND_FASTCALL  ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8633             : {
    8634           0 :         USE_OPLINE
    8635             :         zend_free_op free_op1;
    8636             :         zval *value, *ret;
    8637             : 
    8638             :         SAVE_OPLINE();
    8639           0 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8640             : 
    8641           0 :         if (i_zend_is_true(value TSRMLS_CC)) {
    8642           0 :                 if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    8643             :                         Z_ADDREF_P(value);
    8644             :                         EX_T(opline->result.var).var.ptr = value;
    8645             :                         EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    8646             :                 } else {
    8647           0 :                         ALLOC_ZVAL(ret);
    8648           0 :                         INIT_PZVAL_COPY(ret, value);
    8649           0 :                         EX_T(opline->result.var).var.ptr = ret;
    8650           0 :                         EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    8651           0 :                         if (!1) {
    8652             :                                 zval_copy_ctor(EX_T(opline->result.var).var.ptr);
    8653             :                         }
    8654             :                 }
    8655             : 
    8656             : #if DEBUG_ZEND>=2
    8657             :                 printf("Conditional jmp to %d\n", opline->op2.opline_num);
    8658             : #endif
    8659           0 :                 ZEND_VM_JMP(opline->op2.jmp_addr);
    8660             :         }
    8661             : 
    8662           0 :         zval_dtor(free_op1.var);
    8663             :         CHECK_EXCEPTION();
    8664           0 :         ZEND_VM_NEXT_OPCODE();
    8665             : }
    8666             : 
    8667       26417 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8668             : {
    8669       26417 :         USE_OPLINE
    8670             :         zend_free_op free_op1;
    8671             :         zval *value;
    8672             : 
    8673             :         SAVE_OPLINE();
    8674       52834 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8675             : 
    8676       26417 :         ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
    8677       26417 :         if (!1) {
    8678             :                 zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
    8679             :         }
    8680             : 
    8681             :         CHECK_EXCEPTION();
    8682       26417 :         ZEND_VM_NEXT_OPCODE();
    8683             : }
    8684             : 
    8685          93 : static int ZEND_FASTCALL  ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8686             : {
    8687          93 :         USE_OPLINE
    8688             :         zend_free_op free_op1;
    8689             :         zval *value, *ret;
    8690             : 
    8691             :         SAVE_OPLINE();
    8692         186 :         value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8693             : 
    8694          93 :         if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    8695             :                 Z_ADDREF_P(value);
    8696             :                 EX_T(opline->result.var).var.ptr = value;
    8697             :                 EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    8698             :         } else {
    8699          93 :                 ALLOC_ZVAL(ret);
    8700          93 :                 INIT_PZVAL_COPY(ret, value);
    8701          93 :                 EX_T(opline->result.var).var.ptr = ret;
    8702          93 :                 EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
    8703          93 :                 if (!1) {
    8704             :                         zval_copy_ctor(EX_T(opline->result.var).var.ptr);
    8705             :                 }
    8706             :         }
    8707             : 
    8708             :         CHECK_EXCEPTION();
    8709          93 :         ZEND_VM_NEXT_OPCODE();
    8710             : }
    8711             : 
    8712           5 : static int ZEND_FASTCALL  ZEND_INSTANCEOF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8713             : {
    8714           5 :         USE_OPLINE
    8715             :         zend_free_op free_op1;
    8716             :         zval *expr;
    8717             :         zend_bool result;
    8718             : 
    8719             :         SAVE_OPLINE();
    8720          10 :         expr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    8721             : 
    8722          10 :         if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
    8723           5 :                 result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.var).class_entry TSRMLS_CC);
    8724             :         } else {
    8725           0 :                 result = 0;
    8726             :         }
    8727           5 :         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, result);
    8728           5 :         zval_dtor(free_op1.var);
    8729             :         CHECK_EXCEPTION();
    8730           5 :         ZEND_VM_NEXT_OPCODE();
    8731             : }
    8732             : 
    8733      164799 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8734             : {
    8735      164799 :         USE_OPLINE
    8736             :         zend_free_op free_op1;
    8737             : 
    8738             :         SAVE_OPLINE();
    8739      329598 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    8740             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8741             :                 opline->op2.zv TSRMLS_CC);
    8742      164799 :         zval_dtor(free_op1.var);
    8743             : 
    8744             :         CHECK_EXCEPTION();
    8745      164799 :         ZEND_VM_NEXT_OPCODE();
    8746             : }
    8747             : 
    8748         429 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8749             : {
    8750         429 :         USE_OPLINE
    8751             :         zend_free_op free_op1;
    8752             : 
    8753             :         SAVE_OPLINE();
    8754         858 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    8755             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8756             :                 opline->op2.zv TSRMLS_CC);
    8757         429 :         zval_dtor(free_op1.var);
    8758             : 
    8759             :         CHECK_EXCEPTION();
    8760         429 :         ZEND_VM_NEXT_OPCODE();
    8761             : }
    8762             : 
    8763      176357 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8764             : {
    8765      176357 :         USE_OPLINE
    8766             :         zend_free_op free_op1;
    8767             : 
    8768             :         SAVE_OPLINE();
    8769      352714 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    8770             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8771             :                 opline->op2.zv TSRMLS_CC);
    8772      176357 :         zval_dtor(free_op1.var);
    8773             : 
    8774             :         CHECK_EXCEPTION();
    8775      176357 :         ZEND_VM_NEXT_OPCODE();
    8776             : }
    8777             : 
    8778          37 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8779             : {
    8780          37 :         USE_OPLINE
    8781             :         zend_free_op free_op1;
    8782             : 
    8783             :         SAVE_OPLINE();
    8784          74 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    8785             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8786             :                 opline->op2.zv TSRMLS_CC);
    8787          37 :         zval_dtor(free_op1.var);
    8788             : 
    8789             :         CHECK_EXCEPTION();
    8790          37 :         ZEND_VM_NEXT_OPCODE();
    8791             : }
    8792             : 
    8793           6 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8794             : {
    8795           6 :         USE_OPLINE
    8796             :         zend_free_op free_op1;
    8797             : 
    8798             :         SAVE_OPLINE();
    8799          12 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    8800             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8801             :                 opline->op2.zv TSRMLS_CC);
    8802           6 :         zval_dtor(free_op1.var);
    8803             : 
    8804             :         CHECK_EXCEPTION();
    8805           6 :         ZEND_VM_NEXT_OPCODE();
    8806             : }
    8807             : 
    8808          39 : static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8809             : {
    8810          39 :         USE_OPLINE
    8811             :         zend_free_op free_op1;
    8812             : 
    8813             :         SAVE_OPLINE();
    8814          78 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    8815             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8816             :                 opline->op2.zv TSRMLS_CC);
    8817          39 :         zval_dtor(free_op1.var);
    8818             : 
    8819             :         CHECK_EXCEPTION();
    8820          39 :         ZEND_VM_NEXT_OPCODE();
    8821             : }
    8822             : 
    8823           1 : static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8824             : {
    8825           1 :         USE_OPLINE
    8826             :         zend_free_op free_op1;
    8827             : 
    8828             :         SAVE_OPLINE();
    8829           2 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    8830             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8831             :                 opline->op2.zv TSRMLS_CC);
    8832           1 :         zval_dtor(free_op1.var);
    8833             : 
    8834             :         CHECK_EXCEPTION();
    8835           1 :         ZEND_VM_NEXT_OPCODE();
    8836             : }
    8837             : 
    8838      357748 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8839             : {
    8840      357748 :         USE_OPLINE
    8841             :         zend_free_op free_op1;
    8842             : 
    8843             :         SAVE_OPLINE();
    8844      715496 :         concat_function(&EX_T(opline->result.var).tmp_var,
    8845             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8846             :                 opline->op2.zv TSRMLS_CC);
    8847      357748 :         zval_dtor(free_op1.var);
    8848             : 
    8849             :         CHECK_EXCEPTION();
    8850      357748 :         ZEND_VM_NEXT_OPCODE();
    8851             : }
    8852             : 
    8853        2999 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8854             : {
    8855        2999 :         USE_OPLINE
    8856             :         zend_free_op free_op1;
    8857             : 
    8858             :         SAVE_OPLINE();
    8859        5998 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    8860             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8861             :                 opline->op2.zv TSRMLS_CC);
    8862        2999 :         zval_dtor(free_op1.var);
    8863             : 
    8864             :         CHECK_EXCEPTION();
    8865        2999 :         ZEND_VM_NEXT_OPCODE();
    8866             : }
    8867             : 
    8868           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8869             : {
    8870           0 :         USE_OPLINE
    8871             :         zend_free_op free_op1;
    8872           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8873             : 
    8874             :         SAVE_OPLINE();
    8875           0 :         is_identical_function(result,
    8876             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8877             :                 opline->op2.zv TSRMLS_CC);
    8878           0 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    8879           0 :         zval_dtor(free_op1.var);
    8880             : 
    8881             :         CHECK_EXCEPTION();
    8882           0 :         ZEND_VM_NEXT_OPCODE();
    8883             : }
    8884             : 
    8885        1049 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8886             : {
    8887        1049 :         USE_OPLINE
    8888             :         zend_free_op free_op1;
    8889        1049 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8890             : 
    8891             :         SAVE_OPLINE();
    8892        2098 :         ZVAL_BOOL(result, fast_equal_function(result,
    8893             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8894             :                 opline->op2.zv TSRMLS_CC));
    8895        1049 :         zval_dtor(free_op1.var);
    8896             : 
    8897             :         CHECK_EXCEPTION();
    8898        1049 :         ZEND_VM_NEXT_OPCODE();
    8899             : }
    8900             : 
    8901       26930 : static int ZEND_FASTCALL  ZEND_IS_NOT_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8902             : {
    8903       26930 :         USE_OPLINE
    8904             :         zend_free_op free_op1;
    8905       26930 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8906             : 
    8907             :         SAVE_OPLINE();
    8908       53860 :         ZVAL_BOOL(result, fast_not_equal_function(result,
    8909             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8910             :                 opline->op2.zv TSRMLS_CC));
    8911       26930 :         zval_dtor(free_op1.var);
    8912             : 
    8913             :         CHECK_EXCEPTION();
    8914       26930 :         ZEND_VM_NEXT_OPCODE();
    8915             : }
    8916             : 
    8917      217264 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8918             : {
    8919      217264 :         USE_OPLINE
    8920             :         zend_free_op free_op1;
    8921      217264 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8922             : 
    8923             :         SAVE_OPLINE();
    8924      434528 :         ZVAL_BOOL(result, fast_is_smaller_function(result,
    8925             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8926             :                 opline->op2.zv TSRMLS_CC));
    8927      217264 :         zval_dtor(free_op1.var);
    8928             : 
    8929             :         CHECK_EXCEPTION();
    8930      217264 :         ZEND_VM_NEXT_OPCODE();
    8931             : }
    8932             : 
    8933           0 : static int ZEND_FASTCALL  ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8934             : {
    8935           0 :         USE_OPLINE
    8936             :         zend_free_op free_op1;
    8937           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    8938             : 
    8939             :         SAVE_OPLINE();
    8940           0 :         ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
    8941             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8942             :                 opline->op2.zv TSRMLS_CC));
    8943           0 :         zval_dtor(free_op1.var);
    8944             : 
    8945             :         CHECK_EXCEPTION();
    8946           0 :         ZEND_VM_NEXT_OPCODE();
    8947             : }
    8948             : 
    8949          22 : static int ZEND_FASTCALL  ZEND_BW_OR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8950             : {
    8951          22 :         USE_OPLINE
    8952             :         zend_free_op free_op1;
    8953             : 
    8954             :         SAVE_OPLINE();
    8955          44 :         bitwise_or_function(&EX_T(opline->result.var).tmp_var,
    8956             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8957             :                 opline->op2.zv TSRMLS_CC);
    8958          22 :         zval_dtor(free_op1.var);
    8959             : 
    8960             :         CHECK_EXCEPTION();
    8961          22 :         ZEND_VM_NEXT_OPCODE();
    8962             : }
    8963             : 
    8964      210839 : static int ZEND_FASTCALL  ZEND_BW_AND_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8965             : {
    8966      210839 :         USE_OPLINE
    8967             :         zend_free_op free_op1;
    8968             : 
    8969             :         SAVE_OPLINE();
    8970      421678 :         bitwise_and_function(&EX_T(opline->result.var).tmp_var,
    8971             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8972             :                 opline->op2.zv TSRMLS_CC);
    8973      210839 :         zval_dtor(free_op1.var);
    8974             : 
    8975             :         CHECK_EXCEPTION();
    8976      210839 :         ZEND_VM_NEXT_OPCODE();
    8977             : }
    8978             : 
    8979           0 : static int ZEND_FASTCALL  ZEND_BW_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8980             : {
    8981           0 :         USE_OPLINE
    8982             :         zend_free_op free_op1;
    8983             : 
    8984             :         SAVE_OPLINE();
    8985           0 :         bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
    8986             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    8987             :                 opline->op2.zv TSRMLS_CC);
    8988           0 :         zval_dtor(free_op1.var);
    8989             : 
    8990             :         CHECK_EXCEPTION();
    8991           0 :         ZEND_VM_NEXT_OPCODE();
    8992             : }
    8993             : 
    8994           0 : static int ZEND_FASTCALL  ZEND_BOOL_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    8995             : {
    8996           0 :         USE_OPLINE
    8997             :         zend_free_op free_op1;
    8998             : 
    8999             :         SAVE_OPLINE();
    9000           0 :         boolean_xor_function(&EX_T(opline->result.var).tmp_var,
    9001             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9002             :                 opline->op2.zv TSRMLS_CC);
    9003           0 :         zval_dtor(free_op1.var);
    9004             : 
    9005             :         CHECK_EXCEPTION();
    9006           0 :         ZEND_VM_NEXT_OPCODE();
    9007             : }
    9008             : 
    9009           0 : static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
    9010             : {
    9011           0 :         USE_OPLINE
    9012             :         zend_free_op free_op1;
    9013             :         zval *varname;
    9014             :         zval **retval;
    9015             :         zval tmp_varname;
    9016             :         HashTable *target_symbol_table;
    9017             :         ulong hash_value;
    9018             : 
    9019             :         SAVE_OPLINE();
    9020           0 :         varname = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9021             : 
    9022           0 :         if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
    9023           0 :                 ZVAL_COPY_VALUE(&tmp_varname, varname);
    9024             :                 zval_copy_ctor(&tmp_varname);
    9025             :                 Z_SET_REFCOUNT(tmp_varname, 1);
    9026             :                 Z_UNSET_ISREF(tmp_varname);
    9027           0 :                 convert_to_string(&tmp_varname);
    9028           0 :                 varname = &tmp_varname;
    9029             :         }
    9030             : 
    9031             :         if (IS_CONST != IS_UNUSED) {
    9032             :                 zend_class_entry *ce;
    9033             : 
    9034             :                 if (IS_CONST == IS_CONST) {
    9035           0 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9036           0 :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9037             :                         } else {
    9038           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);
    9039           0 :                                 if (UNEXPECTED(ce == NULL)) {
    9040           0 :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    9041             :                                                 zval_dtor(&tmp_varname);
    9042             :                                         }
    9043           0 :                                         zval_dtor(free_op1.var);
    9044             :                                         CHECK_EXCEPTION();
    9045           0 :                                         ZEND_VM_NEXT_OPCODE();
    9046             :                                 }
    9047           0 :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9048             :                         }
    9049             :                 } else {
    9050             :                         ce = EX_T(opline->op2.var).class_entry;
    9051             :                 }
    9052           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);
    9053           0 :                 zval_dtor(free_op1.var);
    9054             :         } else {
    9055             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9056             : /*
    9057             :                 if (!target_symbol_table) {
    9058             :                         CHECK_EXCEPTION();
    9059             :                         ZEND_VM_NEXT_OPCODE();
    9060             :                 }
    9061             : */
    9062             :                 if (IS_TMP_VAR == IS_CONST) {
    9063             :                         hash_value = Z_HASH_P(varname);
    9064             :                 } else {
    9065             :                         hash_value = str_hash(Z_STRVAL_P(varname), Z_STRLEN_P(varname));
    9066             :                 }
    9067             : 
    9068             :                 if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
    9069             :                         switch (type) {
    9070             :                                 case BP_VAR_R:
    9071             :                                 case BP_VAR_UNSET:
    9072             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    9073             :                                         /* break missing intentionally */
    9074             :                                 case BP_VAR_IS:
    9075             :                                         retval = &EG(uninitialized_zval_ptr);
    9076             :                                         break;
    9077             :                                 case BP_VAR_RW:
    9078             :                                         zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
    9079             :                                         /* break missing intentionally */
    9080             :                                 case BP_VAR_W:
    9081             :                                         Z_ADDREF_P(&EG(uninitialized_zval));
    9082             :                                         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);
    9083             :                                         break;
    9084             :                                 EMPTY_SWITCH_DEFAULT_CASE()
    9085             :                         }
    9086             :                 }
    9087             :                 switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
    9088             :                         case ZEND_FETCH_GLOBAL:
    9089             :                                 if (IS_TMP_VAR != IS_TMP_VAR) {
    9090             :                                         zval_dtor(free_op1.var);
    9091             :                                 }
    9092             :                                 break;
    9093             :                         case ZEND_FETCH_LOCAL:
    9094             :                                 zval_dtor(free_op1.var);
    9095             :                                 break;
    9096             :                         case ZEND_FETCH_STATIC:
    9097             :                                 zval_update_constant(retval, (void*) 1 TSRMLS_CC);
    9098             :                                 break;
    9099             :                         case ZEND_FETCH_GLOBAL_LOCK:
    9100             :                                 if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
    9101             :                                         PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
    9102             :                                 }
    9103             :                                 break;
    9104             :                 }
    9105             :         }
    9106             : 
    9107             : 
    9108           0 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
    9109             :                 zval_dtor(&tmp_varname);
    9110             :         }
    9111           0 :         if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
    9112           0 :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
    9113             :         }
    9114           0 :         PZVAL_LOCK(*retval);
    9115           0 :         switch (type) {
    9116             :                 case BP_VAR_R:
    9117             :                 case BP_VAR_IS:
    9118           0 :                         EX_T(opline->result.var).var.ptr = *retval;
    9119           0 :                         break;
    9120             :                 case BP_VAR_UNSET: {
    9121             :                         zend_free_op free_res;
    9122             : 
    9123           0 :                         PZVAL_UNLOCK(*retval, &free_res);
    9124           0 :                         if (retval != &EG(uninitialized_zval_ptr)) {
    9125           0 :                                 SEPARATE_ZVAL_IF_NOT_REF(retval);
    9126             :                         }
    9127           0 :                         PZVAL_LOCK(*retval);
    9128           0 :                         FREE_OP_VAR_PTR(free_res);
    9129             :                 }
    9130             :                 /* break missing intentionally */
    9131             :                 default:
    9132           0 :                         EX_T(opline->result.var).var.ptr_ptr = retval;
    9133             :                         break;
    9134             :         }
    9135             :         CHECK_EXCEPTION();
    9136           0 :         ZEND_VM_NEXT_OPCODE();
    9137             : }
    9138             : 
    9139           0 : static int ZEND_FASTCALL  ZEND_FETCH_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9140             : {
    9141           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9142             : }
    9143             : 
    9144           0 : static int ZEND_FASTCALL  ZEND_FETCH_W_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9145             : {
    9146           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9147             : }
    9148             : 
    9149           0 : static int ZEND_FASTCALL  ZEND_FETCH_RW_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9150             : {
    9151           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9152             : }
    9153             : 
    9154           0 : static int ZEND_FASTCALL  ZEND_FETCH_FUNC_ARG_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9155             : {
    9156           0 :         USE_OPLINE
    9157             : 
    9158           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);
    9159             : }
    9160             : 
    9161           0 : static int ZEND_FASTCALL  ZEND_FETCH_UNSET_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9162             : {
    9163           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9164             : }
    9165             : 
    9166           0 : static int ZEND_FASTCALL  ZEND_FETCH_IS_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9167             : {
    9168           0 :         return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9169             : }
    9170             : 
    9171           8 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9172             : {
    9173           8 :         USE_OPLINE
    9174             :         zend_free_op free_op1;
    9175             :         zval *container;
    9176             : 
    9177             :         SAVE_OPLINE();
    9178          16 :         container = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9179           8 :         zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
    9180             : 
    9181             :         if (IS_TMP_VAR != IS_VAR || !(opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
    9182           8 :                 zval_dtor(free_op1.var);
    9183             :         }
    9184             :         CHECK_EXCEPTION();
    9185           8 :         ZEND_VM_NEXT_OPCODE();
    9186             : }
    9187             : 
    9188          56 : static int ZEND_FASTCALL  ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9189             : {
    9190          56 :         USE_OPLINE
    9191             :         zend_free_op free_op1;
    9192             :         zval *container;
    9193             : 
    9194             :         SAVE_OPLINE();
    9195         112 :         container = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9196             : 
    9197          56 :         if (UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
    9198             :                 PZVAL_LOCK(&EG(uninitialized_zval));
    9199           3 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    9200             :         } else {
    9201             : 
    9202          53 :                 zval *value = *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
    9203             : 
    9204             :                 PZVAL_LOCK(value);
    9205          53 :                 EX_T(opline->result.var).var.ptr = value;
    9206             : 
    9207             :         }
    9208             :         CHECK_EXCEPTION();
    9209          56 :         ZEND_VM_NEXT_OPCODE();
    9210             : }
    9211             : 
    9212     1107487 : static int ZEND_FASTCALL  ZEND_ADD_CHAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9213             : {
    9214     1107487 :         USE_OPLINE
    9215     1107487 :         zval *str = &EX_T(opline->result.var).tmp_var;
    9216             : 
    9217             :         SAVE_OPLINE();
    9218             : 
    9219     1107487 :         if (IS_TMP_VAR == IS_UNUSED) {
    9220             :                 /* Initialize for erealloc in add_char_to_string */
    9221             :                 Z_STRVAL_P(str) = NULL;
    9222             :                 Z_STRLEN_P(str) = 0;
    9223             :                 Z_TYPE_P(str) = IS_STRING;
    9224             : 
    9225             :                 INIT_PZVAL(str);
    9226             :         }
    9227             : 
    9228     1107487 :         add_char_to_string(str, str, opline->op2.zv);
    9229             : 
    9230             :         /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
    9231             :         /*CHECK_EXCEPTION();*/
    9232     1107487 :         ZEND_VM_NEXT_OPCODE();
    9233             : }
    9234             : 
    9235      650347 : static int ZEND_FASTCALL  ZEND_ADD_STRING_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9236             : {
    9237      650347 :         USE_OPLINE
    9238      650347 :         zval *str = &EX_T(opline->result.var).tmp_var;
    9239             : 
    9240             :         SAVE_OPLINE();
    9241             : 
    9242      650347 :         if (IS_TMP_VAR == IS_UNUSED) {
    9243             :                 /* Initialize for erealloc in add_string_to_string */
    9244             :                 Z_STRVAL_P(str) = NULL;
    9245             :                 Z_STRLEN_P(str) = 0;
    9246             :                 Z_TYPE_P(str) = IS_STRING;
    9247             : 
    9248             :                 INIT_PZVAL(str);
    9249             :         }
    9250             : 
    9251      650347 :         add_string_to_string(str, str, opline->op2.zv);
    9252             : 
    9253             :         /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
    9254             :         /*CHECK_EXCEPTION();*/
    9255      650347 :         ZEND_VM_NEXT_OPCODE();
    9256             : }
    9257             : 
    9258           0 : static int ZEND_FASTCALL  ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9259             : {
    9260           0 :         USE_OPLINE
    9261             :         zval *function_name;
    9262             :         char *function_name_strval;
    9263             :         int function_name_strlen;
    9264             :         zend_free_op free_op1;
    9265           0 :         call_slot *call = EX(call_slots) + opline->result.num;
    9266             : 
    9267             :         SAVE_OPLINE();
    9268             : 
    9269           0 :         function_name = opline->op2.zv;
    9270             : 
    9271           0 :         if (IS_CONST != IS_CONST &&
    9272             :             UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
    9273             :                 if (UNEXPECTED(EG(exception) != NULL)) {
    9274             :                         HANDLE_EXCEPTION();
    9275             :                 }
    9276             :                 zend_error_noreturn(E_ERROR, "Method name must be a string");
    9277             :         }
    9278             : 
    9279           0 :         function_name_strval = Z_STRVAL_P(function_name);
    9280           0 :         function_name_strlen = Z_STRLEN_P(function_name);
    9281             : 
    9282           0 :         call->object = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9283             : 
    9284           0 :         if (EXPECTED(call->object != NULL) &&
    9285           0 :             EXPECTED(Z_TYPE_P(call->object) == IS_OBJECT)) {
    9286           0 :                 call->called_scope = Z_OBJCE_P(call->object);
    9287             : 
    9288           0 :                 if (IS_CONST != IS_CONST ||
    9289           0 :                     (call->fbc = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, call->called_scope)) == NULL) {
    9290           0 :                     zval *object = call->object;
    9291             : 
    9292           0 :                         if (UNEXPECTED(Z_OBJ_HT_P(call->object)->get_method == NULL)) {
    9293           0 :                                 zend_error_noreturn(E_ERROR, "Object does not support method calls");
    9294             :                         }
    9295             : 
    9296             :                         /* First, locate the function. */
    9297           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);
    9298           0 :                         if (UNEXPECTED(call->fbc == NULL)) {
    9299           0 :                                 zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(call->object), function_name_strval);
    9300             :                         }
    9301           0 :                         if (IS_CONST == IS_CONST &&
    9302           0 :                             EXPECTED(call->fbc->type <= ZEND_USER_FUNCTION) &&
    9303           0 :                             EXPECTED((call->fbc->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
    9304           0 :                             EXPECTED(call->object == object)) {
    9305           0 :                                 CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, call->called_scope, call->fbc);
    9306             :                         }
    9307             :                 }
    9308             :         } else {
    9309           0 :                 if (UNEXPECTED(EG(exception) != NULL)) {
    9310             : 
    9311           0 :                         HANDLE_EXCEPTION();
    9312             :                 }
    9313           0 :                 zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
    9314             :         }
    9315             : 
    9316           0 :         if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) {
    9317           0 :                 call->object = NULL;
    9318             :         } else {
    9319           0 :                 if (!PZVAL_IS_REF(call->object)) {
    9320           0 :                         Z_ADDREF_P(call->object); /* For $this pointer */
    9321             :                 } else {
    9322             :                         zval *this_ptr;
    9323           0 :                         ALLOC_ZVAL(this_ptr);
    9324           0 :                         INIT_PZVAL_COPY(this_ptr, call->object);
    9325             :                         zval_copy_ctor(this_ptr);
    9326           0 :                         call->object = this_ptr;
    9327             :                 }
    9328             :         }
    9329             : 
    9330           0 :         call->num_additional_args = 0;
    9331           0 :         call->is_ctor_call = 0;
    9332           0 :         EX(call) = call;
    9333             : 
    9334             : 
    9335             :         CHECK_EXCEPTION();
    9336           0 :         ZEND_VM_NEXT_OPCODE();
    9337             : }
    9338             : 
    9339           0 : static int ZEND_FASTCALL  ZEND_CASE_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9340             : {
    9341           0 :         USE_OPLINE
    9342             :         zend_free_op free_op1;
    9343             : 
    9344             :         SAVE_OPLINE();
    9345           0 :         is_equal_function(&EX_T(opline->result.var).tmp_var,
    9346             :                                  _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9347             :                                  opline->op2.zv TSRMLS_CC);
    9348             : 
    9349             :         CHECK_EXCEPTION();
    9350           0 :         ZEND_VM_NEXT_OPCODE();
    9351             : }
    9352             : 
    9353       66155 : static int ZEND_FASTCALL  ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9354             : {
    9355       66155 :         USE_OPLINE
    9356             :         zend_free_op free_op1;
    9357             :         zval *expr_ptr;
    9358             : 
    9359             :         SAVE_OPLINE();
    9360       66155 :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    9361             :                 zval **expr_ptr_ptr = NULL;
    9362             : 
    9363             :                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
    9364             :                         zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
    9365             :                 }
    9366             :                 SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
    9367             :                 expr_ptr = *expr_ptr_ptr;
    9368             :                 Z_ADDREF_P(expr_ptr);
    9369             :         } else {
    9370      132310 :                 expr_ptr=_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9371             :                 if (1) { /* temporary variable */
    9372             :                         zval *new_expr;
    9373             : 
    9374       66155 :                         ALLOC_ZVAL(new_expr);
    9375       66155 :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    9376       66155 :                         expr_ptr = new_expr;
    9377             :                 } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
    9378             :                         zval *new_expr;
    9379             : 
    9380             :                         ALLOC_ZVAL(new_expr);
    9381             :                         INIT_PZVAL_COPY(new_expr, expr_ptr);
    9382             :                         expr_ptr = new_expr;
    9383             :                         zendi_zval_copy_ctor(*expr_ptr);
    9384             : 
    9385             :                 } else if (IS_TMP_VAR == IS_CV) {
    9386             :                         Z_ADDREF_P(expr_ptr);
    9387             :                 }
    9388             :         }
    9389             : 
    9390             :         if (IS_CONST != IS_UNUSED) {
    9391             : 
    9392       66155 :                 zval *offset = opline->op2.zv;
    9393             :                 ulong hval;
    9394             : 
    9395       66155 :                 switch (Z_TYPE_P(offset)) {
    9396             :                         case IS_DOUBLE:
    9397           4 :                                 hval = zend_dval_to_lval(Z_DVAL_P(offset));
    9398           2 :                                 goto num_index;
    9399             :                         case IS_LONG:
    9400             :                         case IS_BOOL:
    9401       63905 :                                 hval = Z_LVAL_P(offset);
    9402             : num_index:
    9403       63907 :                                 zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
    9404       63907 :                                 break;
    9405             :                         case IS_STRING:
    9406             :                                 if (IS_CONST == IS_CONST) {
    9407        2248 :                                         hval = Z_HASH_P(offset);
    9408             :                                 } else {
    9409             :                                         ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
    9410             :                                         hval = str_hash(Z_STRVAL_P(offset), Z_STRLEN_P(offset));
    9411             :                                 }
    9412        2248 :                                 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);
    9413        2248 :                                 break;
    9414             :                         case IS_NULL:
    9415           0 :                                 zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
    9416           0 :                                 break;
    9417             :                         default:
    9418           0 :                                 zend_error(E_WARNING, "Illegal offset type");
    9419           0 :                                 zval_ptr_dtor(&expr_ptr);
    9420             :                                 /* do nothing */
    9421             :                                 break;
    9422             :                 }
    9423             : 
    9424             :         } else {
    9425             :                 zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
    9426             :         }
    9427             :         if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
    9428             : 
    9429             :         }
    9430             :         CHECK_EXCEPTION();
    9431       66155 :         ZEND_VM_NEXT_OPCODE();
    9432             : }
    9433             : 
    9434       22011 : static int ZEND_FASTCALL  ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9435             : {
    9436       22011 :         USE_OPLINE
    9437             : 
    9438       22011 :         array_init(&EX_T(opline->result.var).tmp_var);
    9439       22011 :         if (IS_TMP_VAR == IS_UNUSED) {
    9440             :                 ZEND_VM_NEXT_OPCODE();
    9441             : #if 0 || IS_TMP_VAR != IS_UNUSED
    9442             :         } else {
    9443       22011 :                 return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
    9444             : #endif
    9445             :         }
    9446             : }
    9447             : 
    9448           0 : static int ZEND_FASTCALL  ZEND_UNSET_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9449             : {
    9450           0 :         USE_OPLINE
    9451             :         zval tmp, *varname;
    9452             :         HashTable *target_symbol_table;
    9453             :         zend_free_op free_op1;
    9454             : 
    9455             :         SAVE_OPLINE();
    9456           0 :         if (IS_TMP_VAR == IS_CV &&
    9457             :             IS_CONST == IS_UNUSED &&
    9458             :             (opline->extended_value & ZEND_QUICK_SET)) {
    9459             :                 if (EG(active_symbol_table)) {
    9460             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    9461             : 
    9462             :                         zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table),  cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
    9463             :                         EX_CV(opline->op1.var) = NULL;
    9464             :                 } else if (EX_CV(opline->op1.var)) {
    9465             :                         zval_ptr_dtor(EX_CV(opline->op1.var));
    9466             :                         EX_CV(opline->op1.var) = NULL;
    9467             :                 }
    9468             :                 CHECK_EXCEPTION();
    9469             :                 ZEND_VM_NEXT_OPCODE();
    9470             :         }
    9471             : 
    9472           0 :         varname = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9473             : 
    9474           0 :         if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    9475           0 :                 ZVAL_COPY_VALUE(&tmp, varname);
    9476             :                 zval_copy_ctor(&tmp);
    9477           0 :                 convert_to_string(&tmp);
    9478           0 :                 varname = &tmp;
    9479           0 :         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    9480             :                 Z_ADDREF_P(varname);
    9481             :         }
    9482             : 
    9483             :         if (IS_CONST != IS_UNUSED) {
    9484             :                 zend_class_entry *ce;
    9485             : 
    9486             :                 if (IS_CONST == IS_CONST) {
    9487           0 :                         if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9488           0 :                                 ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9489             :                         } else {
    9490           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);
    9491           0 :                                 if (UNEXPECTED(EG(exception) != NULL)) {
    9492           0 :                                         if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    9493             :                                                 zval_dtor(&tmp);
    9494           0 :                                         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    9495             :                                                 zval_ptr_dtor(&varname);
    9496             :                                         }
    9497           0 :                                         zval_dtor(free_op1.var);
    9498           0 :                                         HANDLE_EXCEPTION();
    9499             :                                 }
    9500           0 :                                 if (UNEXPECTED(ce == NULL)) {
    9501           0 :                                         zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op2.zv));
    9502             :                                 }
    9503           0 :                                 CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9504             :                         }
    9505             :                 } else {
    9506             :                         ce = EX_T(opline->op2.var).class_entry;
    9507             :                 }
    9508           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);
    9509             :         } else {
    9510             :                 ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
    9511             : 
    9512             :                 target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9513             :                 zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
    9514             :         }
    9515             : 
    9516           0 :         if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    9517             :                 zval_dtor(&tmp);
    9518           0 :         } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
    9519             :                 zval_ptr_dtor(&varname);
    9520             :         }
    9521           0 :         zval_dtor(free_op1.var);
    9522             :         CHECK_EXCEPTION();
    9523           0 :         ZEND_VM_NEXT_OPCODE();
    9524             : }
    9525             : 
    9526           0 : static int ZEND_FASTCALL  ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9527             : {
    9528           0 :         USE_OPLINE
    9529             :         zval **value;
    9530           0 :         zend_bool isset = 1;
    9531             : 
    9532             :         SAVE_OPLINE();
    9533           0 :         if (IS_TMP_VAR == IS_CV &&
    9534             :             IS_CONST == IS_UNUSED &&
    9535             :             (opline->extended_value & ZEND_QUICK_SET)) {
    9536             :                 if (EX_CV(opline->op1.var)) {
    9537             :                         value = EX_CV(opline->op1.var);
    9538             :                 } else if (EG(active_symbol_table)) {
    9539             :                         zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
    9540             : 
    9541             :                         if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
    9542             :                                 isset = 0;
    9543             :                         }
    9544             :                 } else {
    9545             :                         isset = 0;
    9546             :                 }
    9547             :         } else {
    9548             :                 HashTable *target_symbol_table;
    9549             :                 zend_free_op free_op1;
    9550           0 :                 zval tmp, *varname = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9551             : 
    9552           0 :                 if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
    9553           0 :                         ZVAL_COPY_VALUE(&tmp, varname);
    9554             :                         zval_copy_ctor(&tmp);
    9555           0 :                         convert_to_string(&tmp);
    9556           0 :                         varname = &tmp;
    9557             :                 }
    9558             : 
    9559             :                 if (IS_CONST != IS_UNUSED) {
    9560             :                         zend_class_entry *ce;
    9561             : 
    9562             :                         if (IS_CONST == IS_CONST) {
    9563           0 :                                 if (CACHED_PTR(opline->op2.literal->cache_slot)) {
    9564           0 :                                         ce = CACHED_PTR(opline->op2.literal->cache_slot);
    9565             :                                 } else {
    9566           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);
    9567           0 :                                         if (UNEXPECTED(ce == NULL)) {
    9568             :                                                 CHECK_EXCEPTION();
    9569           0 :                                                 ZEND_VM_NEXT_OPCODE();
    9570             :                                         }
    9571           0 :                                         CACHE_PTR(opline->op2.literal->cache_slot, ce);
    9572             :                                 }
    9573             :                         } else {
    9574             :                                 ce = EX_T(opline->op2.var).class_entry;
    9575             :                         }
    9576           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);
    9577           0 :                         if (!value) {
    9578           0 :                                 isset = 0;
    9579             :                         }
    9580             :                 } else {
    9581             :                         target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
    9582             :                         if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
    9583             :                                 isset = 0;
    9584             :                         }
    9585             :                 }
    9586             : 
    9587           0 :                 if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
    9588             :                         zval_dtor(&tmp);
    9589             :                 }
    9590           0 :                 zval_dtor(free_op1.var);
    9591             :         }
    9592             : 
    9593           0 :         if (opline->extended_value & ZEND_ISSET) {
    9594           0 :                 if (isset && Z_TYPE_PP(value) != IS_NULL) {
    9595           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    9596             :                 } else {
    9597           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    9598             :                 }
    9599             :         } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
    9600           0 :                 if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
    9601           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
    9602             :                 } else {
    9603           0 :                         ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
    9604             :                 }
    9605             :         }
    9606             : 
    9607             :         CHECK_EXCEPTION();
    9608           0 :         ZEND_VM_NEXT_OPCODE();
    9609             : }
    9610             : 
    9611           0 : static int ZEND_FASTCALL  ZEND_YIELD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9612             : {
    9613           0 :         USE_OPLINE
    9614             : 
    9615             :         /* The generator object is stored in return_value_ptr_ptr */
    9616           0 :         zend_generator *generator = (zend_generator *) EG(return_value_ptr_ptr);
    9617             : 
    9618           0 :         if (generator->flags & ZEND_GENERATOR_FORCED_CLOSE) {
    9619           0 :                 zend_error_noreturn(E_ERROR, "Cannot yield from finally in a force-closed generator");
    9620             :         }
    9621             : 
    9622             :         /* Destroy the previously yielded value */
    9623           0 :         if (generator->value) {
    9624           0 :                 zval_ptr_dtor(&generator->value);
    9625             :         }
    9626             : 
    9627             :         /* Destroy the previously yielded key */
    9628           0 :         if (generator->key) {
    9629           0 :                 zval_ptr_dtor(&generator->key);
    9630             :         }
    9631             : 
    9632             :         /* Set the new yielded value */
    9633             :         if (IS_TMP_VAR != IS_UNUSED) {
    9634             :                 zend_free_op free_op1;
    9635             : 
    9636           0 :                 if (EX(op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) {
    9637             :                         /* Constants and temporary variables aren't yieldable by reference,
    9638             :                          * but we still allow them with a notice. */
    9639             :                         if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
    9640             :                                 zval *value, *copy;
    9641             : 
    9642           0 :                                 zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    9643             : 
    9644           0 :                                 value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9645           0 :                                 ALLOC_ZVAL(copy);
    9646           0 :                                 INIT_PZVAL_COPY(copy, value);
    9647             : 
    9648             :                                 /* Temporary variables don't need ctor copying */
    9649           0 :                                 if (!1) {
    9650             :                                         zval_copy_ctor(copy);
    9651             :                                 }
    9652             : 
    9653           0 :                                 generator->value = copy;
    9654             :                         } else {
    9655             :                                 zval **value_ptr = NULL;
    9656             : 
    9657             :                                 if (IS_TMP_VAR == IS_VAR && UNEXPECTED(value_ptr == NULL)) {
    9658             :                                         zend_error_noreturn(E_ERROR, "Cannot yield string offsets by reference");
    9659             :                                 }
    9660             : 
    9661             :                                 /* If a function call result is yielded and the function did
    9662             :                                  * not return by reference we throw a notice. */
    9663             :                                 if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(value_ptr)
    9664             :                                     && !(opline->extended_value == ZEND_RETURNS_FUNCTION
    9665             :                                          && EX_T(opline->op1.var).var.fcall_returned_reference)
    9666             :                                     && EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
    9667             :                                         zend_error(E_NOTICE, "Only variable references should be yielded by reference");
    9668             : 
    9669             :                                         Z_ADDREF_PP(value_ptr);
    9670             :                                         generator->value = *value_ptr;
    9671             :                                 } else {
    9672             :                                         SEPARATE_ZVAL_TO_MAKE_IS_REF(value_ptr);
    9673             :                                         Z_ADDREF_PP(value_ptr);
    9674             :                                         generator->value = *value_ptr;
    9675             :                                 }
    9676             : 
    9677             :                         }
    9678             :                 } else {
    9679           0 :                         zval *value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
    9680             : 
    9681             :                         /* Consts, temporary variables and references need copying */
    9682             :                         if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR
    9683             :                                 || PZVAL_IS_REF(value)
    9684             :                         ) {
    9685             :                                 zval *copy;
    9686             : 
    9687           0 :                                 ALLOC_ZVAL(copy);
    9688           0 :                                 INIT_PZVAL_COPY(copy, value);
    9689             : 
    9690             :                                 /* Temporary variables don't need ctor copying */
    9691           0 :                                 if (!1) {
    9692             :                                         zval_copy_ctor(copy);
    9693             :                                 }
    9694             : 
    9695           0 :                                 generator->value = copy;
    9696             : 
    9697             :                         } else {
    9698             :                                 if (IS_TMP_VAR == IS_CV) {
    9699             :                                         Z_ADDREF_P(value);
    9700             :                                 }
    9701             :                                 generator->value = value;
    9702             :                         }
    9703             :                 }
    9704             :         } else {
    9705             :                 /* If no value was specified yield null */
    9706             :                 Z_ADDREF(EG(uninitialized_zval));
    9707             :                 generator->value = &EG(uninitialized_zval);
    9708             :         }
    9709             : 
    9710             :         /* Set the new yielded key */
    9711             :         if (IS_CONST != IS_UNUSED) {
    9712             : 
    9713           0 :                 zval *key = opline->op2.zv;
    9714             : 
    9715             :                 /* Consts, temporary variables and references need copying */
    9716             :                 if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR
    9717             :                         || (PZVAL_IS_REF(key) && Z_REFCOUNT_P(key) > 0)
    9718             :                 ) {
    9719             :                         zval *copy;
    9720             : 
    9721           0 :                         ALLOC_ZVAL(copy);
    9722           0 :                         INIT_PZVAL_COPY(copy, key);
    9723             : 
    9724             :                         /* Temporary variables don't need ctor copying */
    9725             :                         if (!0) {
    9726             :                                 zval_copy_ctor(copy);
    9727             :                         }
    9728             : 
    9729           0 :                         generator->key = copy;
    9730             :                 } else {
    9731             :                         Z_ADDREF_P(key);
    9732             :                         generator->key = key;
    9733             :                 }
    9734             : 
    9735           0 :                 if (Z_TYPE_P(generator->key) == IS_LONG
    9736           0 :                     && Z_LVAL_P(generator->key) > generator->largest_used_integer_key
    9737             :                 ) {
    9738           0 :                         generator->largest_used_integer_key = Z_LVAL_P(generator->key);
    9739             :                 }
    9740             : 
    9741             :         } else {
    9742             :                 /* If no key was specified we use auto-increment keys */
    9743             :                 generator->largest_used_integer_key++;
    9744             : 
    9745             :                 ALLOC_INIT_ZVAL(generator->key);
    9746             :                 ZVAL_LONG(generator->key, generator->largest_used_integer_key);
    9747             :         }
    9748             : 
    9749           0 :         if (RETURN_VALUE_USED(opline)) {
    9750             :                 /* If the return value of yield is used set the send
    9751             :                  * target and initialize it to NULL */
    9752           0 :                 generator->send_target = &EX_T(opline->result.var).var.ptr;
    9753             :                 Z_ADDREF(EG(uninitialized_zval));
    9754           0 :                 EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
    9755             :         } else {
    9756           0 :                 generator->send_target = NULL;
    9757             :         }
    9758             : 
    9759             :         /* We increment to the next op, so we are at the correct position when the
    9760             :          * generator is resumed. */
    9761           0 :         ZEND_VM_INC_OPCODE();
    9762             : 
    9763             :         /* The GOTO VM uses a local opline variable. We need to set the opline
    9764             :          * variable in execute_data so we don't resume at an old position. */
    9765             :         SAVE_OPLINE();
    9766             : 
    9767           0 :         ZEND_VM_RETURN();
    9768             : }
    9769             : 
    9770           1 : static int ZEND_FASTCALL  ZEND_POW_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9771             : {
    9772           1 :         USE_OPLINE
    9773             :         zend_free_op free_op1;
    9774             : 
    9775             :         SAVE_OPLINE();
    9776           2 :         pow_function(&EX_T(opline->result.var).tmp_var,
    9777             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9778             :                 opline->op2.zv TSRMLS_CC);
    9779           1 :         zval_dtor(free_op1.var);
    9780             : 
    9781             :         CHECK_EXCEPTION();
    9782           1 :         ZEND_VM_NEXT_OPCODE();
    9783             : }
    9784             : 
    9785        3270 : static int ZEND_FASTCALL  ZEND_ADD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9786             : {
    9787        3270 :         USE_OPLINE
    9788             :         zend_free_op free_op1, free_op2;
    9789             : 
    9790             :         SAVE_OPLINE();
    9791        9810 :         fast_add_function(&EX_T(opline->result.var).tmp_var,
    9792             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9793             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9794        3270 :         zval_dtor(free_op1.var);
    9795        3270 :         zval_dtor(free_op2.var);
    9796             :         CHECK_EXCEPTION();
    9797        3270 :         ZEND_VM_NEXT_OPCODE();
    9798             : }
    9799             : 
    9800         137 : static int ZEND_FASTCALL  ZEND_SUB_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9801             : {
    9802         137 :         USE_OPLINE
    9803             :         zend_free_op free_op1, free_op2;
    9804             : 
    9805             :         SAVE_OPLINE();
    9806         411 :         fast_sub_function(&EX_T(opline->result.var).tmp_var,
    9807             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9808             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9809         137 :         zval_dtor(free_op1.var);
    9810         137 :         zval_dtor(free_op2.var);
    9811             :         CHECK_EXCEPTION();
    9812         137 :         ZEND_VM_NEXT_OPCODE();
    9813             : }
    9814             : 
    9815           8 : static int ZEND_FASTCALL  ZEND_MUL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9816             : {
    9817           8 :         USE_OPLINE
    9818             :         zend_free_op free_op1, free_op2;
    9819             : 
    9820             :         SAVE_OPLINE();
    9821          24 :         fast_mul_function(&EX_T(opline->result.var).tmp_var,
    9822             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9823             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9824           8 :         zval_dtor(free_op1.var);
    9825           8 :         zval_dtor(free_op2.var);
    9826             :         CHECK_EXCEPTION();
    9827           8 :         ZEND_VM_NEXT_OPCODE();
    9828             : }
    9829             : 
    9830          10 : static int ZEND_FASTCALL  ZEND_DIV_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9831             : {
    9832          10 :         USE_OPLINE
    9833             :         zend_free_op free_op1, free_op2;
    9834             : 
    9835             :         SAVE_OPLINE();
    9836          30 :         fast_div_function(&EX_T(opline->result.var).tmp_var,
    9837             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9838             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9839          10 :         zval_dtor(free_op1.var);
    9840          10 :         zval_dtor(free_op2.var);
    9841             :         CHECK_EXCEPTION();
    9842          10 :         ZEND_VM_NEXT_OPCODE();
    9843             : }
    9844             : 
    9845           0 : static int ZEND_FASTCALL  ZEND_MOD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9846             : {
    9847           0 :         USE_OPLINE
    9848             :         zend_free_op free_op1, free_op2;
    9849             : 
    9850             :         SAVE_OPLINE();
    9851           0 :         fast_mod_function(&EX_T(opline->result.var).tmp_var,
    9852             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9853             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9854           0 :         zval_dtor(free_op1.var);
    9855           0 :         zval_dtor(free_op2.var);
    9856             :         CHECK_EXCEPTION();
    9857           0 :         ZEND_VM_NEXT_OPCODE();
    9858             : }
    9859             : 
    9860           0 : static int ZEND_FASTCALL  ZEND_SL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9861             : {
    9862           0 :         USE_OPLINE
    9863             :         zend_free_op free_op1, free_op2;
    9864             : 
    9865             :         SAVE_OPLINE();
    9866           0 :         shift_left_function(&EX_T(opline->result.var).tmp_var,
    9867             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9868             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9869           0 :         zval_dtor(free_op1.var);
    9870           0 :         zval_dtor(free_op2.var);
    9871             :         CHECK_EXCEPTION();
    9872           0 :         ZEND_VM_NEXT_OPCODE();
    9873             : }
    9874             : 
    9875           0 : static int ZEND_FASTCALL  ZEND_SR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9876             : {
    9877           0 :         USE_OPLINE
    9878             :         zend_free_op free_op1, free_op2;
    9879             : 
    9880             :         SAVE_OPLINE();
    9881           0 :         shift_right_function(&EX_T(opline->result.var).tmp_var,
    9882             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9883             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9884           0 :         zval_dtor(free_op1.var);
    9885           0 :         zval_dtor(free_op2.var);
    9886             :         CHECK_EXCEPTION();
    9887           0 :         ZEND_VM_NEXT_OPCODE();
    9888             : }
    9889             : 
    9890       35531 : static int ZEND_FASTCALL  ZEND_CONCAT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9891             : {
    9892       35531 :         USE_OPLINE
    9893             :         zend_free_op free_op1, free_op2;
    9894             : 
    9895             :         SAVE_OPLINE();
    9896      106593 :         concat_function(&EX_T(opline->result.var).tmp_var,
    9897             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9898             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9899       35531 :         zval_dtor(free_op1.var);
    9900       35531 :         zval_dtor(free_op2.var);
    9901             :         CHECK_EXCEPTION();
    9902       35531 :         ZEND_VM_NEXT_OPCODE();
    9903             : }
    9904             : 
    9905           5 : static int ZEND_FASTCALL  ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9906             : {
    9907           5 :         USE_OPLINE
    9908             :         zend_free_op free_op1, free_op2;
    9909             : 
    9910             :         SAVE_OPLINE();
    9911          15 :         is_identical_function(&EX_T(opline->result.var).tmp_var,
    9912             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9913             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9914           5 :         zval_dtor(free_op1.var);
    9915           5 :         zval_dtor(free_op2.var);
    9916             :         CHECK_EXCEPTION();
    9917           5 :         ZEND_VM_NEXT_OPCODE();
    9918             : }
    9919             : 
    9920           0 : static int ZEND_FASTCALL  ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9921             : {
    9922           0 :         USE_OPLINE
    9923             :         zend_free_op free_op1, free_op2;
    9924           0 :         zval *result = &EX_T(opline->result.var).tmp_var;
    9925             : 
    9926             :         SAVE_OPLINE();
    9927           0 :         is_identical_function(result,
    9928             :                 _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC),
    9929             :                 _get_zval_ptr_tmp(opline->op2.var, execute_data, &free_op2 TSRMLS_CC) TSRMLS_CC);
    9930           0 :         Z_LVAL_P(result) = !Z_LVAL_P(result);
    9931           0 :         zval_dtor(free_op1.var);
    9932           0 :         zval_dtor(free_op2.var);
    9933             :         CHECK_EXCEPTION();
    9934           0 :         ZEND_VM_NEXT_OPCODE();
    9935             : }
    9936             : 
    9937        4923 : static int ZEND_FASTCALL  ZEND_IS_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
    9938             : {
    9939        4923 :         USE_OPLINE
    9940             :         zend_free_op free_op1, free_op2;
    9941        4923 :         zval *result = &EX_T(opline->result.var).tmp_var;