3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($cb) { return $cb(); } function baz() { echo 'this ';} $bar = function(){ echo 'weird ';}; foo('baz'); foo($bar); foo(function(){echo 'huh';});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rCN8L
function name:  (null)
number of ops:  13
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrCN8L%3A10%240'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_FCALL                                               'foo'
          3        SEND_VAL                                                 'baz'
          4        DO_FCALL                                      0          
   13     5        INIT_FCALL                                               'foo'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0          
   14     8        INIT_FCALL                                               'foo'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrCN8L%3A14%241'
         10        SEND_VAL                                                 ~5
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

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

End of function foo

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

End of function baz

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

End of function %00%7Bclosure%7D%2Fin%2FrCN8L%3A10%240

Function %00%7Bclosure%7D%2Fin%2FrCN8L%3A14%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rCN8L
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'huh'
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FrCN8L%3A14%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.85 ms | 1407 KiB | 16 Q