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 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dvbZ1
function name:  (null)
number of ops:  26
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_option'
          1        SEND_VAL                                                 'foo_cache_plugin'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   10     4        BOOL_NOT                                         ~3      !0
          5      > JMPZ                                                     ~3, ->12
   12     6    >   INIT_FCALL                                               'add_option'
          7        FETCH_CONSTANT                                   ~4      'foo_cache_plugin'
          8        SEND_VAL                                                 ~4
   13     9        SEND_VAL                                                 <array>
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->25
   19    12    >   FETCH_CONSTANT                                   ~6      'foo_should_cache'
         13        ASSIGN_DIM                                               !0, ~6
         14        OP_DATA                                                  'true'
   20    15        FETCH_CONSTANT                                   ~8      'foo_should_display_notice'
         16        ASSIGN_DIM                                               !0, ~8
         17        OP_DATA                                                  'false'
   21    18        FETCH_CONSTANT                                   ~10     'foo_should_cache_logged_in_users'
         19        ASSIGN_DIM                                               !0, ~10
         20        OP_DATA                                                  'false'
   22    21        INIT_FCALL                                               'update_option'
         22        SEND_VAL                                                 'foo_cache_plugin'
         23        SEND_VAR                                                 !0
         24        DO_FCALL                                      0          
   23    25    > > RETURN                                                   1

Function get_option:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dvbZ1
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/dvbZ1
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/dvbZ1
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:
170.81 ms | 1407 KiB | 16 Q