3v4l.org

run code in 300+ PHP versions simultaneously
<?php $node = (object) array( 'nid' => 5, ); $data = array( 'subject' => 'subject', 'content' => 'Some string', ); // For some cases rewrite the content if ($node->nid > 5) { $content = $data['content'] . '<ul><li>List</li><li>with</li><li>some</li><li>items</li>'; $data['content'] = array( '#markupt' => $content, '#attached' => array( 'js' => array( 'some_file.js', ), ), ); } if (!isset($data['content']['#markup'])) { $data['content'] = array( '#markup' => $data['content'], ); } print_r($data); // Really? var_dump($data['content']['#markup']);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 13
filename:       /in/eiiid
function name:  (null)
number of ops:  30
compiled vars:  !0 = $node, !1 = $data, !2 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   CAST                                          8  ~3      <array>
    3     1        ASSIGN                                                   !0, ~3
    7     2        ASSIGN                                                   !1, <array>
   13     3        FETCH_OBJ_R                                      ~6      !0, 'nid'
          4        IS_SMALLER                                               5, ~6
          5      > JMPZ                                                     ~7, ->13
   14     6    >   FETCH_DIM_R                                      ~8      !1, 'content'
          7        CONCAT                                           ~9      ~8, '%3Cul%3E%3Cli%3EList%3C%2Fli%3E%3Cli%3Ewith%3C%2Fli%3E%3Cli%3Esome%3C%2Fli%3E%3Cli%3Eitems%3C%2Fli%3E'
          8        ASSIGN                                                   !2, ~9
   17     9        INIT_ARRAY                                       ~12     !2, '%23markupt'
         10        ADD_ARRAY_ELEMENT                                ~12     <array>, '%23attached'
   16    11        ASSIGN_DIM                                               !1, 'content'
   17    12        OP_DATA                                                  ~12
   26    13    >   FETCH_DIM_IS                                     ~13     !1, 'content'
         14        ISSET_ISEMPTY_DIM_OBJ                         0  ~14     ~13, '%23markup'
         15        BOOL_NOT                                         ~15     ~14
         16      > JMPZ                                                     ~15, ->21
   28    17    >   FETCH_DIM_R                                      ~17     !1, 'content'
         18        INIT_ARRAY                                       ~18     ~17, '%23markup'
   27    19        ASSIGN_DIM                                               !1, 'content'
   28    20        OP_DATA                                                  ~18
   32    21    >   INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   35    24        INIT_FCALL                                               'var_dump'
         25        FETCH_DIM_R                                      ~20     !1, 'content'
         26        FETCH_DIM_R                                      ~21     ~20, '%23markup'
         27        SEND_VAL                                                 ~21
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.91 ms | 1396 KiB | 17 Q