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/6kKkd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $class, !1 = $
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    7     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'a'
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                           ~7      !1, $6
          8        BOOL_NOT                                         ~8      ~7
          9        FETCH_R                      local               ~9      ~8
         10        FETCH_CLASS                                   0  $10     ~9
         11        NEW                                              $11     $10
         12        DO_FCALL                                      0          
         13        SEND_VAR                                                 $11
         14        DO_ICALL                                                 
    8    15      > 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/6kKkd
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:
161.14 ms | 1395 KiB | 15 Q