3v4l.org

run code in 300+ PHP versions simultaneously
<?php class WP_Term { public $data = array(); } $wp_term = new WP_Term( new stdClass() ); echo 'Testing if the $data dynamic property is accessible when iterating the WP_Term\'s object properties.' . PHP_EOL; foreach ( $wp_term as $property => $value ) { echo "Key: $property" . PHP_EOL; } echo PHP_EOL; echo 'Testing if the $data dynamic property is accessible when calling WP_Term::get_object_vars()' . PHP_EOL; var_dump( get_object_vars( $wp_term ) );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/a4NBe
function name:  (null)
number of ops:  25
compiled vars:  !0 = $wp_term, !1 = $value, !2 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'WP_Term'
          1        NEW                                              $4      'stdClass'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   10     6        ECHO                                                     'Testing+if+the+%24data+dynamic+property+is+accessible+when+iterating+the+WP_Term%27s+object+properties.%0A'
   12     7      > FE_RESET_R                                       $8      !0, ->15
          8    > > FE_FETCH_R                                       ~9      $8, !1, ->15
          9    >   ASSIGN                                                   !2, ~9
   13    10        NOP                                                      
         11        FAST_CONCAT                                      ~11     'Key%3A+', !2
         12        CONCAT                                           ~12     ~11, '%0A'
         13        ECHO                                                     ~12
   12    14      > JMP                                                      ->8
         15    >   FE_FREE                                                  $8
   16    16        ECHO                                                     '%0A'
   18    17        ECHO                                                     'Testing+if+the+%24data+dynamic+property+is+accessible+when+calling+WP_Term%3A%3Aget_object_vars%28%29%0A'
   20    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'get_object_vars'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class WP_Term: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.09 ms | 1460 KiB | 15 Q