3v4l.org

run code in 300+ PHP versions simultaneously
<?php $invoked = []; function f1() { global $invoked; $invoked[] = __FUNCTION__; return true; } function f2() { global $invoked; $invoked[] = __FUNCTION__; return true; } f1() ?: f2(); var_dump($invoked);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1SQEs
function name:  (null)
number of ops:  12
compiled vars:  !0 = $invoked
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'f1'
          2        DO_FCALL                                      0  $2      
          3        JMP_SET                                          ~3      $2, ->7
          4        INIT_FCALL                                               'f2'
          5        DO_FCALL                                      0  $4      
          6        QM_ASSIGN                                        ~3      $4
          7        FREE                                                     ~3
   14     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1SQEs
function name:  f1
number of ops:  5
compiled vars:  !0 = $invoked
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'invoked'
          1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'f1'
    5     3      > RETURN                                                   <true>
    6     4*     > 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/1SQEs
function name:  f2
number of ops:  5
compiled vars:  !0 = $invoked
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   BIND_GLOBAL                                              !0, 'invoked'
          1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  'f2'
    9     3      > RETURN                                                   <true>
   10     4*     > RETURN                                                   null

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.14 ms | 1398 KiB | 17 Q