3v4l.org

run code in 300+ PHP versions simultaneously
<?php $postarr = array('_parent_id' => null, '_year' => 2013); $data['post_type'] = "easy-photo-album"; if(!isset($postarr)){ print_r($data); } if($data['post_type'] == 'easy-photo-album') { $title = 'Undefined album'; if(isset($postarr['_parent_id']) && !empty($postarr['_parent_id'])){ $event = get_post($postarr['_parent_id']); $title = $event->post_title; } $title .= ' ['.$postarr['_year'].']'; $data['post_title'] = $title; } print_r($data);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 33
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 27
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
Branch analysis from position: 18
Branch analysis from position: 33
Branch analysis from position: 9
filename:       /in/cTnqX
function name:  (null)
number of ops:  37
compiled vars:  !0 = $postarr, !1 = $data, !2 = $title, !3 = $event
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !1, 'post_type'
          2        OP_DATA                                                  'easy-photo-album'
    6     3        ISSET_ISEMPTY_CV                                 ~6      !0
          4        BOOL_NOT                                         ~7      ~6
          5      > JMPZ                                                     ~7, ->9
    7     6    >   INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   10     9    >   FETCH_DIM_R                                      ~9      !1, 'post_type'
         10        IS_EQUAL                                                 ~9, 'easy-photo-album'
         11      > JMPZ                                                     ~10, ->33
   11    12    >   ASSIGN                                                   !2, 'Undefined+album'
   13    13        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !0, '_parent_id'
         14      > JMPZ_EX                                          ~12     ~12, ->18
         15    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~13     !0, '_parent_id'
         16        BOOL_NOT                                         ~14     ~13
         17        BOOL                                             ~12     ~14
         18    > > JMPZ                                                     ~12, ->27
   14    19    >   INIT_FCALL_BY_NAME                                       'get_post'
         20        CHECK_FUNC_ARG                                           
         21        FETCH_DIM_FUNC_ARG                               $15     !0, '_parent_id'
         22        SEND_FUNC_ARG                                            $15
         23        DO_FCALL                                      0  $16     
         24        ASSIGN                                                   !3, $16
   15    25        FETCH_OBJ_R                                      ~18     !3, 'post_title'
         26        ASSIGN                                                   !2, ~18
   18    27    >   FETCH_DIM_R                                      ~20     !0, '_year'
         28        CONCAT                                           ~21     '+%5B', ~20
         29        CONCAT                                           ~22     ~21, '%5D'
         30        ASSIGN_OP                                     8          !2, ~22
   20    31        ASSIGN_DIM                                               !1, 'post_title'
         32        OP_DATA                                                  !2
   23    33    >   INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !1
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.1 ms | 1405 KiB | 15 Q