3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar = 42; public function baz() { $bay = function() { echo $this->bar; }; $bay(); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fB6hP
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FfB6hP%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fB6hP
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'bar'
          2        ECHO                                                     ~1
   11     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FfB6hP%3A9%240

Class Foo:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fB6hP
function name:  baz
number of ops:  5
compiled vars:  !0 = $bay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FfB6hP%3A9%240'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.95 ms | 1394 KiB | 13 Q