3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doSth($c) { $c(); } class foo { private static function bar() { echo 'OK'; } public static function go() { doSth(function() { self::bar(); }); } } foo::go();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F4kg1
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  'foo', 'go'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function dosth:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F4kg1
function name:  doSth
number of ops:  4
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0          
    6     3      > RETURN                                                   null

End of function dosth

Function %00%7Bclosure%7D%2Fin%2FF4kg1%3A17%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F4kg1
function name:  {closure}
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'bar'
          1        DO_FCALL                                      0          
   20     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FF4kg1%3A17%240

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

End of function bar

Function go:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F4kg1
function name:  go
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'dosth'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FF4kg1%3A17%240'
   20     2        SEND_VAL                                                 ~0
          3        DO_FCALL                                      0          
   21     4      > RETURN                                                   null

End of function go

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.86 ms | 1399 KiB | 14 Q