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