3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; const Bar = 'const'; class Bar { private const BAR = 'class'; public function show(): \Closure { return static function() { echo self::BAR; }; } } (new Bar)->show()();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ggF0C
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CONST                                            'Foo%5CBar', 'const'
   16     1        NEW                                              $0      'Foo%5CBar'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'show'
          4        DO_FCALL                                      0  $2      
          5        INIT_DYNAMIC_CALL                                        $2
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function %00foo%5C%7Bclosure%7D%2Fin%2FggF0C%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ggF0C
function name:  Foo\{closure}
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_CLASS_CONSTANT                             ~0      'BAR'
          1        ECHO                                                     ~0
   12     2      > RETURN                                                   null

End of function %00foo%5C%7Bclosure%7D%2Fin%2FggF0C%3A10%240

Class Foo\Bar:
Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ggF0C
function name:  show
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00foo%5C%7Bclosure%7D%2Fin%2FggF0C%3A10%240'
   12     1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   13     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function show

End of class Foo\Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.21 ms | 1394 KiB | 13 Q