3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f1() { return 123; } function f2() { return 123; } $f1_body = (new ReflectionFunction('f1'))->__toString(); $f2_body = (new ReflectionFunction('f2'))->__toString(); echo $f1_body . "\n"; echo $f2_body . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NqQEF
function name:  (null)
number of ops:  17
compiled vars:  !0 = $f1_body, !1 = $f2_body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'f1'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $2, '__toString'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
   10     6        NEW                                              $6      'ReflectionFunction'
          7        SEND_VAL_EX                                              'f2'
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $6, '__toString'
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !1, $8
   11    12        CONCAT                                           ~10     !0, '%0A'
         13        ECHO                                                     ~10
   12    14        CONCAT                                           ~11     !1, '%0A'
         15        ECHO                                                     ~11
         16      > RETURN                                                   1

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

End of function f1

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

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154 ms | 1394 KiB | 13 Q