3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class SomeFixture { private readonly string $name; public function getName(): string { return $this->name; } public function setName(string $name): void { $this->name = ucfirst($name); } } $s = new SomeFixture(); $s->setName('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2g4ZM
function name:  (null)
number of ops:  7
compiled vars:  !0 = $s
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   NEW                                                  $1      'SomeFixture'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   19     3        INIT_METHOD_CALL                                             !0, 'setName'
          4        SEND_VAL_EX                                                  'test'
          5        DO_FCALL                                          0          
          6      > RETURN                                                       1

Class SomeFixture:
Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2g4ZM
function name:  getName
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                          ~0      'name'
          1        VERIFY_RETURN_TYPE                                           ~0
          2      > RETURN                                                       ~0
   10     3*       VERIFY_RETURN_TYPE                                           
          4*     > RETURN                                                       null

End of function getname

Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2g4ZM
function name:  setName
number of ops:  7
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   14     1        INIT_FCALL                                                   'ucfirst'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $2      
          4        ASSIGN_OBJ                                                   'name'
          5        OP_DATA                                                      $2
   15     6      > RETURN                                                       null

End of function setname

End of class SomeFixture.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.4 ms | 1440 KiB | 14 Q