3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; } function baz() { echo 'baz'; } $f = new Foo; $f->bar = function() { echo 'hello world!'; }; $g = 'baz'; $fn = 'g'; [$foo, 'bar']();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VoYHf
function name:  (null)
number of ops:  13
compiled vars:  !0 = $f, !1 = $g, !2 = $fn, !3 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $4      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   11     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVoYHf%3A11%240'
          4        ASSIGN_OBJ                                               !0, 'bar'
          5        OP_DATA                                                  ~8
   12     6        ASSIGN                                                   !1, 'baz'
   13     7        ASSIGN                                                   !2, 'g'
   14     8        INIT_ARRAY                                       ~11     !3
          9        ADD_ARRAY_ELEMENT                                ~11     'bar'
         10        INIT_DYNAMIC_CALL                                        ~11
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VoYHf
function name:  baz
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'baz'
          1      > RETURN                                                   null

End of function baz

Function %00%7Bclosure%7D%2Fin%2FVoYHf%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VoYHf
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'hello+world%21'
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVoYHf%3A11%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.79 ms | 1394 KiB | 13 Q