3v4l.org

run code in 300+ PHP versions simultaneously
<?php $post = new stdclass; $post->topic_id = 1; $post->forum_id = 2; $locked = ForumData::is_topic_locked($post->topic_id); if ($locked->topic_locked == 1) { echo '<td align="right"><font color="#FF0000">Topic Locked</font><td>'; } else { echo '<td align="left"><a href="' . url('Forum/create_new_post?topic_id=' . $post->topic_id . '&forum_id=' . $post->forum_id . '') . '"><img src="<?php echo SITE_URL?>/lib/skins/flyeuro/images/forums/t_reply.gif"/></a></td>'; } class ForumData { static function is_topic_locked() { $locked = new stdclass; $locked->topic_locked = false; return $locked; } } function url($url) { return "http://example.com/$url"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KHMAv
function name:  (null)
number of ops:  31
compiled vars:  !0 = $post, !1 = $locked
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'stdclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        ASSIGN_OBJ                                               !0, 'topic_id'
          4        OP_DATA                                                  1
    4     5        ASSIGN_OBJ                                               !0, 'forum_id'
          6        OP_DATA                                                  2
    6     7        INIT_STATIC_METHOD_CALL                                  'ForumData', 'is_topic_locked'
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $7      !0, 'topic_id'
         10        SEND_FUNC_ARG                                            $7
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                                   !1, $8
    8    13        FETCH_OBJ_R                                      ~10     !1, 'topic_locked'
         14        IS_EQUAL                                                 ~10, 1
         15      > JMPZ                                                     ~11, ->18
    9    16    >   ECHO                                                     '%3Ctd+align%3D%22right%22%3E%3Cfont+color%3D%22%23FF0000%22%3ETopic+Locked%3C%2Ffont%3E%3Ctd%3E'
         17      > JMP                                                      ->30
   11    18    >   INIT_FCALL_BY_NAME                                       'url'
         19        FETCH_OBJ_R                                      ~12     !0, 'topic_id'
         20        CONCAT                                           ~13     'Forum%2Fcreate_new_post%3Ftopic_id%3D', ~12
         21        CONCAT                                           ~14     ~13, '%26forum_id%3D'
         22        FETCH_OBJ_R                                      ~15     !0, 'forum_id'
         23        CONCAT                                           ~16     ~14, ~15
         24        CONCAT                                           ~17     ~16, ''
         25        SEND_VAL_EX                                              ~17
         26        DO_FCALL                                      0  $18     
         27        CONCAT                                           ~19     '%3Ctd+align%3D%22left%22%3E%3Ca+href%3D%22', $18
         28        CONCAT                                           ~20     ~19, '%22%3E%3Cimg+src%3D%22%3C%3Fphp+echo+SITE_URL%3F%3E%2Flib%2Fskins%2Fflyeuro%2Fimages%2Fforums%2Ft_reply.gif%22%2F%3E%3C%2Fa%3E%3C%2Ftd%3E'
         29        ECHO                                                     ~20
   26    30    > > RETURN                                                   1

Function url:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KHMAv
function name:  url
number of ops:  5
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   25     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      'http%3A%2F%2Fexample.com%2F', !0
          3      > RETURN                                                   ~1
   26     4*     > RETURN                                                   null

End of function url

Class ForumData:
Function is_topic_locked:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KHMAv
function name:  is_topic_locked
number of ops:  7
compiled vars:  !0 = $locked
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'stdclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        ASSIGN_OBJ                                               !0, 'topic_locked'
          4        OP_DATA                                                  <false>
   20     5      > RETURN                                                   !0
   21     6*     > RETURN                                                   null

End of function is_topic_locked

End of class ForumData.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.94 ms | 1399 KiB | 13 Q