3v4l.org

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

End of function name

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.73 ms | 1396 KiB | 15 Q