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: 7263 15494 46.9 %
Date: 2014-08-04 Functions: 644 1234 52.2 %
Legend: Lines: hit not hit

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