3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*function add($a, $b){ return $a + $b; } echo add(2,3); function subtract ($a, $b){ return $a - $b; } echo subtract(5,4); function concatenate($a, $b){ return $a . $b; } echo concatenate('Hello', 'Wie');*/ //$arr = ['test', 'test2']; //print_r($arr[0]); function addToArray(){ $arr = ['']; $arr[] = 'test'; } echo addToArray($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P3qFN
function name:  (null)
number of ops:  5
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   INIT_FCALL                                               'addtoarray'
          1        SEND_VAR                                                 !0
          2        DO_FCALL                                      0  $1      
          3        ECHO                                                     $1
          4      > RETURN                                                   1

Function addtoarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P3qFN
function name:  addToArray
number of ops:  4
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ASSIGN                                                   !0, <array>
   27     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'test'
   28     3      > RETURN                                                   null

End of function addtoarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.16 ms | 1396 KiB | 14 Q