3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $bar = 'foo'; } class Qux { public $foo; public function render(): string { $this->foo = Foo::class; return $this->foo::$bar; } } $qux = new Qux; var_dump($qux->render());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cXDLX
function name:  (null)
number of ops:  9
compiled vars:  !0 = $qux
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Qux'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'render'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Foo: [no user functions]
Class Qux:
Function render:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cXDLX
function name:  render
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN_OBJ                                               'foo'
          1        OP_DATA                                                  'Foo'
   15     2        FETCH_OBJ_R                                      ~1      'foo'
          3        FETCH_CLASS                                   0  $2      ~1
          4        FETCH_STATIC_PROP_R          unknown             ~3      'bar'
          5        VERIFY_RETURN_TYPE                                       ~3
          6      > RETURN                                                   ~3
   16     7*       VERIFY_RETURN_TYPE                                       
          8*     > RETURN                                                   null

End of function render

End of class Qux.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.19 ms | 1399 KiB | 15 Q