3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{} $class = new class { public $b = 'A'; public function a(){return 'A';} }; var_dump(new $class->a()); // var_dump(new ${!${''}=$class->a()});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hOiMN
function name:  (null)
number of ops:  12
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    7     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~5      !0, 'a'
          6        FETCH_CLASS                                   0  $6      ~5
          7        NEW                                              $7      $6
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                                 
    8    11      > RETURN                                                   1

Class A: [no user functions]
Class class@anonymous:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hOiMN
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'A'
          1*     > RETURN                                                   null

End of function a

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.51 ms | 1394 KiB | 15 Q