3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function editbutton() { return 'editbutton'; } function sendbutton() { return 'sendbutton'; } function sellbutton() { return 'sellbutton'; } function cancelbutton() { return 'cancelbutton'; } function set_buttons() { $s = 0; $buttons = "<tr><td colspan=2><table><tr>"; if ($s == 0) { $buttons .= $this->editbutton().$this->sendbutton().$this->sellbutton(); } if ($s == 1) { $buttons .= $this->cancelbutton(); } $buttons .= "</tr></table></td></tr>"; echo $buttons; } } $a = new A(); $a->set_buttons();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n2Cc3
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'set_buttons'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function editbutton

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

End of function sendbutton

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

End of function sellbutton

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

End of function cancelbutton

Function set_buttons:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 13
filename:       /in/n2Cc3
function name:  set_buttons
number of ops:  21
compiled vars:  !0 = $s, !1 = $buttons
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 0
   17     1        ASSIGN                                                   !1, '%3Ctr%3E%3Ctd+colspan%3D2%3E%3Ctable%3E%3Ctr%3E'
   18     2        IS_EQUAL                                                 !0, 0
          3      > JMPZ                                                     ~4, ->13
          4    >   INIT_METHOD_CALL                                         'editbutton'
          5        DO_FCALL                                      0  $5      
          6        INIT_METHOD_CALL                                         'sendbutton'
          7        DO_FCALL                                      0  $6      
          8        CONCAT                                           ~7      $5, $6
          9        INIT_METHOD_CALL                                         'sellbutton'
         10        DO_FCALL                                      0  $8      
         11        CONCAT                                           ~9      ~7, $8
         12        ASSIGN_OP                                     8          !1, ~9
   19    13    >   IS_EQUAL                                                 !0, 1
         14      > JMPZ                                                     ~11, ->18
         15    >   INIT_METHOD_CALL                                         'cancelbutton'
         16        DO_FCALL                                      0  $12     
         17        ASSIGN_OP                                     8          !1, $12
   20    18    >   ASSIGN_OP                                     8          !1, '%3C%2Ftr%3E%3C%2Ftable%3E%3C%2Ftd%3E%3C%2Ftr%3E'
   21    19        ECHO                                                     !1
   22    20      > RETURN                                                   null

End of function set_buttons

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.71 ms | 1399 KiB | 13 Q