3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr[] = 'test'; function addToArray($arg1, $arg2){ $arr = []; $arr[] = $arg1; $arr[] = $arg2; print_r($arr); } addToArray('test', 'nichtJulian'); var_dump($extistiertnicht); $extistiertnicht[] ='Test'; print_R($extistiertnicht); echo $gibtsnicht + 9; echo substr('test', 0, 1);
based on iVYsf
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6WDdd
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arr, !1 = $extistiertnicht, !2 = $gibtsnicht
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN_DIM                                               !0
         1        OP_DATA                                                  'test'
   4     2        NOP                                                      
  11     3        INIT_FCALL                                               'addtoarray'
         4        SEND_VAL                                                 'test'
         5        SEND_VAL                                                 'nichtJulian'
         6        DO_FCALL                                      0          
  14     7        INIT_FCALL                                               'var_dump'
         8        SEND_VAR                                                 !1
         9        DO_ICALL                                                 
  15    10        ASSIGN_DIM                                               !1
        11        OP_DATA                                                  'Test'
  16    12        INIT_FCALL                                               'print_r'
        13        SEND_VAR                                                 !1
        14        DO_ICALL                                                 
  17    15        ADD                                              ~8      !2, 9
        16        ECHO                                                     ~8
  19    17        INIT_FCALL                                               'substr'
        18        SEND_VAL                                                 'test'
        19        SEND_VAL                                                 0
        20        SEND_VAL                                                 1
        21        DO_ICALL                                         $9      
        22        ECHO                                                     $9
        23      > RETURN                                                   1

Function addtoarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6WDdd
function name:  addToArray
number of ops:  11
compiled vars:  !0 = $arg1, !1 = $arg2, !2 = $arr
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   RECV                                             !0      
         1        RECV                                             !1      
   5     2        ASSIGN                                                   !2, <array>
   6     3        ASSIGN_DIM                                               !2
         4        OP_DATA                                                  !0
   7     5        ASSIGN_DIM                                               !2
         6        OP_DATA                                                  !1
   9     7        INIT_FCALL                                               'print_r'
         8        SEND_VAR                                                 !2
         9        DO_ICALL                                                 
  10    10      > RETURN                                                   null

End of function addtoarray

Generated using Vulcan Logic Dumper, using php 7.3.0