3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ public $name; public $age; public function __construct($name,$age){ $this->name = $name; $this->age = $age; } public function personDetails(){ echo "Person nam is {$this->name} and person age is {$this->age}"; } } $personOne = new person("akbar","28"); $personOne->personDetails(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i4qdj
function name:  (null)
number of ops:  8
compiled vars:  !0 = $personOne
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'person'
          1        SEND_VAL_EX                                              'akbar'
          2        SEND_VAL_EX                                              '28'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   18     5        INIT_METHOD_CALL                                         !0, 'personDetails'
          6        DO_FCALL                                      0          
   25     7      > RETURN                                                   1

Class Person:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i4qdj
function name:  __construct
number of ops:  7
compiled vars:  !0 = $name, !1 = $age
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        ASSIGN_OBJ                                               'name'
          3        OP_DATA                                                  !0
    8     4        ASSIGN_OBJ                                               'age'
          5        OP_DATA                                                  !1
   10     6      > RETURN                                                   null

End of function __construct

Function persondetails:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i4qdj
function name:  personDetails
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ROPE_INIT                                     4  ~3      'Person+nam+is+'
          1        FETCH_OBJ_R                                      ~0      'name'
          2        ROPE_ADD                                      1  ~3      ~3, ~0
          3        ROPE_ADD                                      2  ~3      ~3, '+and+person+age+is+'
          4        FETCH_OBJ_R                                      ~1      'age'
          5        ROPE_END                                      3  ~2      ~3, ~1
          6        ECHO                                                     ~2
   13     7      > RETURN                                                   null

End of function persondetails

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.28 ms | 1395 KiB | 13 Q