3v4l.org

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

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nM56A
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/nM56A
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:
155.7 ms | 1395 KiB | 13 Q