3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f1() { global $wp_settings_fields; if ( 'misc' == $page ) { _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) ); $page = 'general'; } if ( 'privacy' == $page ) { _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) ); $page = 'reading'; } $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args); } function f2() { global $wp_settings_fields; if ( 'misc' == $page ) { _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) ); $page = 'general'; } if ( 'privacy' == $page ) { _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) ); $page = 'reading'; } $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args); } $f1_body = (new ReflectionFunction('f1'))->__toString(); $f2_body = (new ReflectionFunction('f2'))->__toString(); echo $f1_body . "\n"; echo $f2_body . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ACiEo
function name:  (null)
number of ops:  17
compiled vars:  !0 = $f1_body, !1 = $f2_body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'f1'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $2, '__toString'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
   35     6        NEW                                              $6      'ReflectionFunction'
          7        SEND_VAL_EX                                              'f2'
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $6, '__toString'
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !1, $8
   36    12        CONCAT                                           ~10     !0, '%0A'
         13        ECHO                                                     ~10
   37    14        CONCAT                                           ~11     !1, '%0A'
         15        ECHO                                                     ~11
         16      > RETURN                                                   1

Function f1:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 12
filename:       /in/ACiEo
function name:  f1
number of ops:  32
compiled vars:  !0 = $wp_settings_fields, !1 = $page, !2 = $section, !3 = $id, !4 = $title, !5 = $callback, !6 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'wp_settings_fields'
    6     1        IS_EQUAL                                                 !1, 'misc'
          2      > JMPZ                                                     ~7, ->12
    7     3    >   INIT_FCALL_BY_NAME                                       '_deprecated_argument'
          4        SEND_VAL_EX                                              'f1'
          5        SEND_VAL_EX                                              '3.0'
          6        INIT_FCALL_BY_NAME                                       '__'
          7        SEND_VAL_EX                                              'The+miscellaneous+options+group+has+been+removed.+Use+another+settings+group.'
          8        DO_FCALL                                      0  $8      
          9        SEND_VAR_NO_REF_EX                                       $8
         10        DO_FCALL                                      0          
    8    11        ASSIGN                                                   !1, 'general'
   11    12    >   IS_EQUAL                                                 !1, 'privacy'
         13      > JMPZ                                                     ~11, ->23
   12    14    >   INIT_FCALL_BY_NAME                                       '_deprecated_argument'
         15        SEND_VAL_EX                                              'f1'
         16        SEND_VAL_EX                                              '3.5'
         17        INIT_FCALL_BY_NAME                                       '__'
         18        SEND_VAL_EX                                              'The+privacy+options+group+has+been+removed.+Use+another+settings+group.'
         19        DO_FCALL                                      0  $12     
         20        SEND_VAR_NO_REF_EX                                       $12
         21        DO_FCALL                                      0          
   13    22        ASSIGN                                                   !1, 'reading'
   16    23    >   INIT_ARRAY                                       ~18     !3, 'id'
         24        ADD_ARRAY_ELEMENT                                ~18     !4, 'title'
         25        ADD_ARRAY_ELEMENT                                ~18     !5, 'callback'
         26        ADD_ARRAY_ELEMENT                                ~18     !6, 'args'
         27        FETCH_DIM_W                                      $15     !0, !1
         28        FETCH_DIM_W                                      $16     $15, !2
         29        ASSIGN_DIM                                               $16, !3
         30        OP_DATA                                                  ~18
   17    31      > RETURN                                                   null

End of function f1

Function f2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 23
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 12
filename:       /in/ACiEo
function name:  f2
number of ops:  32
compiled vars:  !0 = $wp_settings_fields, !1 = $page, !2 = $section, !3 = $id, !4 = $title, !5 = $callback, !6 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   BIND_GLOBAL                                              !0, 'wp_settings_fields'
   21     1        IS_EQUAL                                                 !1, 'misc'
          2      > JMPZ                                                     ~7, ->12
   22     3    >   INIT_FCALL_BY_NAME                                       '_deprecated_argument'
          4        SEND_VAL_EX                                              'f2'
          5        SEND_VAL_EX                                              '3.0'
          6        INIT_FCALL_BY_NAME                                       '__'
          7        SEND_VAL_EX                                              'The+miscellaneous+options+group+has+been+removed.+Use+another+settings+group.'
          8        DO_FCALL                                      0  $8      
          9        SEND_VAR_NO_REF_EX                                       $8
         10        DO_FCALL                                      0          
   23    11        ASSIGN                                                   !1, 'general'
   26    12    >   IS_EQUAL                                                 !1, 'privacy'
         13      > JMPZ                                                     ~11, ->23
   27    14    >   INIT_FCALL_BY_NAME                                       '_deprecated_argument'
         15        SEND_VAL_EX                                              'f2'
         16        SEND_VAL_EX                                              '3.5'
         17        INIT_FCALL_BY_NAME                                       '__'
         18        SEND_VAL_EX                                              'The+privacy+options+group+has+been+removed.+Use+another+settings+group.'
         19        DO_FCALL                                      0  $12     
         20        SEND_VAR_NO_REF_EX                                       $12
         21        DO_FCALL                                      0          
   28    22        ASSIGN                                                   !1, 'reading'
   31    23    >   INIT_ARRAY                                       ~18     !3, 'id'
         24        ADD_ARRAY_ELEMENT                                ~18     !4, 'title'
         25        ADD_ARRAY_ELEMENT                                ~18     !5, 'callback'
         26        ADD_ARRAY_ELEMENT                                ~18     !6, 'args'
         27        FETCH_DIM_W                                      $15     !0, !1
         28        FETCH_DIM_W                                      $16     $15, !2
         29        ASSIGN_DIM                                               $16, !3
         30        OP_DATA                                                  ~18
   32    31      > RETURN                                                   null

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.9 ms | 1403 KiB | 13 Q