3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myFunction(){ return Array(new A,new A); } class A { public $foo = 1; function Data(){ return 5; } } $five = myFunction()[0]->Data(); var_dump($five);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/baMcl
function name:  (null)
number of ops:  10
compiled vars:  !0 = $five
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'myfunction'
          1        DO_FCALL                                      0  $1      
          2        FETCH_DIM_R                                      ~2      $1, 0
          3        INIT_METHOD_CALL                                         ~2, 'Data'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !0, $3
   15     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/baMcl
function name:  myFunction
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'A'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~2      $0
          3        NEW                                              $3      'A'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~2      $3
          6      > RETURN                                                   ~2
    5     7*     > RETURN                                                   null

End of function myfunction

Class A:
Function data:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/baMcl
function name:  Data
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   5
   10     1*     > RETURN                                                   null

End of function data

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.2 ms | 1000 KiB | 15 Q