3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test\Biz; class Foo { public function bar(callable $callable) { echo $callable; } } function demonstrate2(callable $callable) { } echo 'Function: '; echo demonstrate2('\Test\Biz\Foo::bar'); echo PHP_EOL . 'Method: '; (new Foo())->bar('\Test\Biz\Foo::bar');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ibt7
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'Function%3A+'
   17     1        INIT_NS_FCALL_BY_NAME                                    'Test%5CBiz%5Cdemonstrate2'
          2        SEND_VAL_EX                                              '%5CTest%5CBiz%5CFoo%3A%3Abar'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
   19     5        FETCH_CONSTANT                                   ~1      'Test%5CBiz%5CPHP_EOL'
          6        CONCAT                                           ~2      ~1, 'Method%3A+'
          7        ECHO                                                     ~2
   20     8        NEW                                              $3      'Test%5CBiz%5CFoo'
          9        DO_FCALL                                      0          
         10        INIT_METHOD_CALL                                         $3, 'bar'
         11        SEND_VAL_EX                                              '%5CTest%5CBiz%5CFoo%3A%3Abar'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Function test%5Cbiz%5Cdemonstrate2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ibt7
function name:  Test\Biz\demonstrate2
number of ops:  2
compiled vars:  !0 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1      > RETURN                                                   null

End of function test%5Cbiz%5Cdemonstrate2

Class Test\Biz\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ibt7
function name:  bar
number of ops:  3
compiled vars:  !0 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ECHO                                                     !0
   10     2      > RETURN                                                   null

End of function bar

End of class Test\Biz\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.47 ms | 1437 KiB | 14 Q