3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $name; public function __construct($name) { $this->name = $name; } public function name() { return $this>name(); } } $user = new Person('chris'); var_dump($person->name());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mjeSI
function name:  (null)
number of ops:  10
compiled vars:  !0 = $user, !1 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'Person'
          1        SEND_VAL_EX                                              'chris'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   22     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !1, 'name'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
          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/mjeSI
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function __construct

Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mjeSI
function name:  name
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_THIS                                       ~0      
          1        INIT_FCALL_BY_NAME                                       'name'
          2        DO_FCALL                                      0  $1      
          3        IS_SMALLER                                       ~2      $1, ~0
          4      > RETURN                                                   ~2
   16     5*     > RETURN                                                   null

End of function name

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.31 ms | 1395 KiB | 15 Q