3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass(); $obj->a = 65; $stack = array("orange", "banana"); $stack2 = array(array("11", "22",array("77", "99")), "orange2", "banana2", array("33", "44"), new DateTime,$obj); var_dump($stack2); $a='gggg'; array_push($stack, $stack2, 'ff','tt','ii',$stack); print_r($stack); print_r($stack2); /*$stack = array("orange", "banana"); $stack2 = array("orange2", "banana2"); $stack2 = array(array("11", "22"), "orange2", "banana2", array("33", "44")); $result = array_merge($stack,'ff','tt','ii', $stack2); print_r($result);*/
based on r1h8R
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3OK6P
function name:  (null)
number of ops:  34
compiled vars:  !0 = $obj, !1 = $stack, !2 = $stack2, !3 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $4      :-5
         1        DO_FCALL                                      0          
         2        ASSIGN                                                   !0, $4
   4     3        ASSIGN_OBJ                                               !0, 'a'
         4        OP_DATA                                                  65
   5     5        ASSIGN                                                   !1, <array>
   6     6        INIT_ARRAY                                       ~9      <array>
         7        ADD_ARRAY_ELEMENT                                ~9      'orange2'
         8        ADD_ARRAY_ELEMENT                                ~9      'banana2'
         9        ADD_ARRAY_ELEMENT                                ~9      <array>
        10        NEW                                              $10     :4
        11        DO_FCALL                                      0          
        12        ADD_ARRAY_ELEMENT                                ~9      $10
        13        ADD_ARRAY_ELEMENT                                ~9      !0
        14        ASSIGN                                                   !2, ~9
   8    15        INIT_FCALL                                               'var_dump'
        16        SEND_VAR                                                 !2
        17        DO_ICALL                                                 
  10    18        ASSIGN                                                   !3, 'gggg'
  12    19        INIT_FCALL                                               'array_push'
        20        SEND_REF                                                 !1
        21        SEND_VAR                                                 !2
        22        SEND_VAL                                                 'ff'
        23        SEND_VAL                                                 'tt'
        24        SEND_VAL                                                 'ii'
        25        SEND_VAR                                                 !1
        26        DO_ICALL                                                 
  13    27        INIT_FCALL                                               'print_r'
        28        SEND_VAR                                                 !1
        29        DO_ICALL                                                 
  14    30        INIT_FCALL                                               'print_r'
        31        SEND_VAR                                                 !2
        32        DO_ICALL                                                 
  20    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0