3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { Protected $name; Protected $city; Protected $country; Public function __construct() { echo "At the time of creation, this constructor is called automatically. <br />"; } Public function print_introduction($name,$city,$country) { $this->name = $name; $this->city = $city; $this->country = $country; echo "My name is $this->name and i am from $this->city, $this->country. <br />"; } Public function __destruct() { echo "At last, destructor is called automatically."; } } $object = new Person(); echo $object->print_introduction("Zayn","Lahore","Pakistan"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1uYXN
function name:  (null)
number of ops:  10
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Person'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'print_introduction'
          4        SEND_VAL_EX                                              'Zayn'
          5        SEND_VAL_EX                                              'Lahore'
          6        SEND_VAL_EX                                              'Pakistan'
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
   28     9      > RETURN                                                   1

Class Person:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1uYXN
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'At+the+time+of+creation%2C+this+constructor+is+called+automatically.+%3Cbr+%2F%3E'
   11     1      > RETURN                                                   null

End of function __construct

Function print_introduction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1uYXN
function name:  print_introduction
number of ops:  21
compiled vars:  !0 = $name, !1 = $city, !2 = $country
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   14     3        ASSIGN_OBJ                                               'name'
          4        OP_DATA                                                  !0
   15     5        ASSIGN_OBJ                                               'city'
          6        OP_DATA                                                  !1
   16     7        ASSIGN_OBJ                                               'country'
          8        OP_DATA                                                  !2
   17     9        ROPE_INIT                                     7  ~10     'My+name+is+'
         10        FETCH_OBJ_R                                      ~6      'name'
         11        ROPE_ADD                                      1  ~10     ~10, ~6
         12        ROPE_ADD                                      2  ~10     ~10, '+and+i+am+from+'
         13        FETCH_OBJ_R                                      ~7      'city'
         14        ROPE_ADD                                      3  ~10     ~10, ~7
         15        ROPE_ADD                                      4  ~10     ~10, '%2C+'
         16        FETCH_OBJ_R                                      ~8      'country'
         17        ROPE_ADD                                      5  ~10     ~10, ~8
         18        ROPE_END                                      6  ~9      ~10, '.+%3Cbr+%2F%3E'
         19        ECHO                                                     ~9
   18    20      > RETURN                                                   null

End of function print_introduction

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1uYXN
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'At+last%2C+destructor+is+called+automatically.'
   22     1      > RETURN                                                   null

End of function __destruct

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.31 ms | 1399 KiB | 13 Q