3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Begin polyfills. function get_option(){} function add_option(){} function update_option(){} // Begin Kristine's code sample. $options = get_option (foo_cache_plugin); if ( !$options) { //add option if option doesn't exist yet add_option (foo_cache_plugin, array ( 'foo_should_cache' => 'true', 'foo_should_display_notice' => 'false', 'foo_should_cache_logged_in_users' => 'false' )); } else { //update option if it exists $options [foo_should_cache] = 'true'; $options [foo_should_display_notice] = 'false'; $options [foo_should_cache_logged_in_users] = 'false'; update_option (foo_cache_plugin, $options); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1W5Jj
function name:  (null)
number of ops:  28
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_option'
          1        FETCH_CONSTANT                                   ~1      'foo_cache_plugin'
          2        SEND_VAL                                                 ~1
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   10     5        BOOL_NOT                                         ~4      !0
          6      > JMPZ                                                     ~4, ->13
   12     7    >   INIT_FCALL                                               'add_option'
          8        FETCH_CONSTANT                                   ~5      'foo_cache_plugin'
          9        SEND_VAL                                                 ~5
   13    10        SEND_VAL                                                 <array>
         11        DO_FCALL                                      0          
         12      > JMP                                                      ->27
   19    13    >   FETCH_CONSTANT                                   ~7      'foo_should_cache'
         14        ASSIGN_DIM                                               !0, ~7
         15        OP_DATA                                                  'true'
   20    16        FETCH_CONSTANT                                   ~9      'foo_should_display_notice'
         17        ASSIGN_DIM                                               !0, ~9
         18        OP_DATA                                                  'false'
   21    19        FETCH_CONSTANT                                   ~11     'foo_should_cache_logged_in_users'
         20        ASSIGN_DIM                                               !0, ~11
         21        OP_DATA                                                  'false'
   22    22        INIT_FCALL                                               'update_option'
         23        FETCH_CONSTANT                                   ~13     'foo_cache_plugin'
         24        SEND_VAL                                                 ~13
         25        SEND_VAR                                                 !0
         26        DO_FCALL                                      0          
   23    27    > > RETURN                                                   1

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

End of function get_option

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

End of function add_option

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

End of function update_option

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.63 ms | 1403 KiB | 16 Q