3v4l.org

run code in 300+ PHP versions simultaneously
<?php class UserData{ public $user; public $userid; const NAME = "abdullah al mamun"; public static $age = "30"; public function __construct($username, $userid){ $this->user = $username; $this->userid = $userid; echo "Username is {$this->user} and user id is{$this->userid}"; } public function display(){ echo "Full name is :".UserData::NAME."<br/>"; echo "Age is :".self::$age; } public function __destruct(){ unset($this->user); unset($this->userid); } } $user = "mamun"; $id = "25"; $ur = new UserData($user, $id); echo "<br/>"; $ur->dipplay(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9jq2o
function name:  (null)
number of ops:  11
compiled vars:  !0 = $user, !1 = $id, !2 = $ur
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   ASSIGN                                                   !0, 'mamun'
   26     1        ASSIGN                                                   !1, '25'
   27     2        NEW                                              $5      'UserData'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $5
   28     7        ECHO                                                     '%3Cbr%2F%3E'
   29     8        INIT_METHOD_CALL                                         !2, 'dipplay'
          9        DO_FCALL                                      0          
   36    10      > RETURN                                                   1

Class UserData:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9jq2o
function name:  __construct
number of ops:  14
compiled vars:  !0 = $username, !1 = $userid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        ASSIGN_OBJ                                               'user'
          3        OP_DATA                                                  !0
   10     4        ASSIGN_OBJ                                               'userid'
          5        OP_DATA                                                  !1
   11     6        ROPE_INIT                                     4  ~7      'Username+is+'
          7        FETCH_OBJ_R                                      ~4      'user'
          8        ROPE_ADD                                      1  ~7      ~7, ~4
          9        ROPE_ADD                                      2  ~7      ~7, '+and+user+id+is'
         10        FETCH_OBJ_R                                      ~5      'userid'
         11        ROPE_END                                      3  ~6      ~7, ~5
         12        ECHO                                                     ~6
   12    13      > RETURN                                                   null

End of function __construct

Function display:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9jq2o
function name:  display
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Full+name+is+%3Aabdullah+al+mamun%3Cbr%2F%3E'
   16     1        FETCH_STATIC_PROP_R          unknown             ~0      'age'
          2        CONCAT                                           ~1      'Age+is+%3A', ~0
          3        ECHO                                                     ~1
   17     4      > RETURN                                                   null

End of function display

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9jq2o
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   UNSET_OBJ                                                'user'
   20     1        UNSET_OBJ                                                'userid'
   21     2      > RETURN                                                   null

End of function __destruct

End of class UserData.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.39 ms | 1399 KiB | 13 Q