3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(): ?callable { return function() {}; } function bar(): ?callable { return 'strpos'; } function baz(): ?callable { return 'baz'; } function qux(): ?callable { return array(new SplFixedArray(), 'fromArray'); } function quux(): ?callable { return array('SplFixedArray', 'fromArray'); } function corge(): ?callable { return 'SplFixedArray::fromArray'; } function grault(): ?callable { return null; } foo(); bar(); baz(); qux(); quux(); corge(); grault();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
   39     2        INIT_FCALL                                               'bar'
          3        DO_FCALL                                      0          
   40     4        INIT_FCALL                                               'baz'
          5        DO_FCALL                                      0          
   41     6        INIT_FCALL                                               'qux'
          7        DO_FCALL                                      0          
   42     8        INIT_FCALL                                               'quux'
          9        DO_FCALL                                      0          
   43    10        INIT_FCALL                                               'corge'
         11        DO_FCALL                                      0          
   44    12        INIT_FCALL                                               'grault'
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                          ~0      [0]
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
    6     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of Dynamic Function 0

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  bar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   VERIFY_RETURN_TYPE                               ~0      'strpos'
          1      > RETURN                                                   ~0
   11     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function bar

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

End of function baz

Function qux:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  qux
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $0      'SplFixedArray'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~2      $0
          3        ADD_ARRAY_ELEMENT                                ~2      'fromArray'
          4        VERIFY_RETURN_TYPE                                       ~2
          5      > RETURN                                                   ~2
   21     6*       VERIFY_RETURN_TYPE                                       
          7*     > RETURN                                                   null

End of function qux

Function quux:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  quux
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   VERIFY_RETURN_TYPE                               ~0      <array>
          1      > RETURN                                                   ~0
   26     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function quux

Function corge:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  corge
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   VERIFY_RETURN_TYPE                               ~0      'SplFixedArray%3A%3AfromArray'
          1      > RETURN                                                   ~0
   31     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function corge

Function grault:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CfQeY
function name:  grault
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E > > RETURN                                                   null
   36     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function grault

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.95 ms | 1449 KiB | 20 Q