3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[\NoDiscard] function test(): int { return 0; } if (random_int(1,1)) { $fn = 'call_user_func'; } else { $fn = 'nope'; } $fn('test');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V8TSN
function name:  (null)
number of ops:  12
compiled vars:  !0 = $fn
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'random_int'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     1
          3        DO_ICALL                                             $1      
          4      > JMPZ                                                         $1, ->7
   10     5    >   ASSIGN                                                       !0, 'call_user_func'
    9     6      > JMP                                                          ->8
   12     7    >   ASSIGN                                                       !0, 'nope'
   15     8    >   INIT_DYNAMIC_CALL                                            !0
          9        SEND_VAL_EX                                                  'test'
         10        DO_FCALL                                          0          
         11      > RETURN                                                       1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.86 ms | 478 KiB | 8 Q