3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { echo 'a'; } function b() { echo 'b'; } $condition = false; $f = ['a', 'b']; $f[$condition](); $f[!$condition](); $condition = true; $f = ['a', 'b']; $f[$condition](); $f[!$condition]();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6bjg8
function name:  (null)
number of ops:  19
compiled vars:  !0 = $condition, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <false>
   13     1        ASSIGN                                                   !1, <array>
   14     2        FETCH_DIM_R                                      ~4      !1, !0
          3        INIT_DYNAMIC_CALL                                        ~4
          4        DO_FCALL                                      0          
   15     5        BOOL_NOT                                         ~6      !0
          6        FETCH_DIM_R                                      ~7      !1, ~6
          7        INIT_DYNAMIC_CALL                                        ~7
          8        DO_FCALL                                      0          
   17     9        ASSIGN                                                   !0, <true>
   19    10        ASSIGN                                                   !1, <array>
   20    11        FETCH_DIM_R                                      ~11     !1, !0
         12        INIT_DYNAMIC_CALL                                        ~11
         13        DO_FCALL                                      0          
   21    14        BOOL_NOT                                         ~13     !0
         15        FETCH_DIM_R                                      ~14     !1, ~13
         16        INIT_DYNAMIC_CALL                                        ~14
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

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

End of function a

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

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.08 ms | 1394 KiB | 13 Q