3v4l.org

run code in 300+ PHP versions simultaneously
<?php $isUserAuthorized = true; $siteAddress = 'sute.ru/'; class a { function getSources(){ return array('1'); } function getLink(){ return 'link'; } function getTitle(){ return 'title'; } } $art = new a; if ($isUserAuthorized && $art->getSources()|count > 0){ $color = "#999999"; } else { $color = ""; } $link = "<a href='{$siteAddress}{$art->getLink()}' style='color: $color'>{$art->getTitle()}</a>"; echo $link;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/se50g
function name:  (null)
number of ops:  31
compiled vars:  !0 = $isUserAuthorized, !1 = $siteAddress, !2 = $art, !3 = $color, !4 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <true>
    4     1        ASSIGN                                                   !1, 'sute.ru%2F'
   16     2        NEW                                              $7      'a'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $7
   17     5      > JMPZ_EX                                          ~10     !0, ->12
          6    >   INIT_METHOD_CALL                                         !2, 'getSources'
          7        DO_FCALL                                      0  $11     
          8        FETCH_CONSTANT                                   ~12     'count'
          9        IS_SMALLER                                       ~13     0, ~12
         10        BW_OR                                            ~14     $11, ~13
         11        BOOL                                             ~10     ~14
         12    > > JMPZ                                                     ~10, ->15
   18    13    >   ASSIGN                                                   !3, '%23999999'
   17    14      > JMP                                                      ->16
   20    15    >   ASSIGN                                                   !3, ''
   23    16    >   ROPE_INIT                                     8  ~20     '%3Ca+href%3D%27'
         17        ROPE_ADD                                      1  ~20     ~20, !1
         18        INIT_METHOD_CALL                                         !2, 'getLink'
         19        DO_FCALL                                      0  $17     
         20        ROPE_ADD                                      2  ~20     ~20, $17
         21        ROPE_ADD                                      3  ~20     ~20, '%27+style%3D%27color%3A+'
         22        ROPE_ADD                                      4  ~20     ~20, !3
         23        ROPE_ADD                                      5  ~20     ~20, '%27%3E'
         24        INIT_METHOD_CALL                                         !2, 'getTitle'
         25        DO_FCALL                                      0  $18     
         26        ROPE_ADD                                      6  ~20     ~20, $18
         27        ROPE_END                                      7  ~19     ~20, '%3C%2Fa%3E'
         28        ASSIGN                                                   !4, ~19
   24    29        ECHO                                                     !4
         30      > RETURN                                                   1

Class a:
Function getsources:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/se50g
function name:  getSources
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   <array>
    8     1*     > RETURN                                                   null

End of function getsources

Function getlink:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/se50g
function name:  getLink
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'link'
   11     1*     > RETURN                                                   null

End of function getlink

Function gettitle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/se50g
function name:  getTitle
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   'title'
   14     1*     > RETURN                                                   null

End of function gettitle

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.1 ms | 1453 KiB | 13 Q