3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class X { /** @var string $string */ private $string; public function setString(string $string) : X { $this->string = $string; } public function getString() : string { return $this->string; } } $x = new X(); echo $x->getString();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vuruT
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_METHOD_CALL                                         !0, 'getString'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class X:
Function setstring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vuruT
function name:  setString
number of ops:  5
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'string'
          2        OP_DATA                                                  !0
   13     3        VERIFY_RETURN_TYPE                                       
          4      > RETURN                                                   null

End of function setstring

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

End of function getstring

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.34 ms | 1398 KiB | 13 Q