3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Api{ public $użytkownicy = []; public function użytkownicy(){ return new Class ($this){ protected $rodzic = null; public function __construct($rodzic){ $this->rodzic = $rodzic; } public function stwórz(array $dane){ $this->rodzic->użytkownicy []= $dane; return $this->rodzic; } public function weź($id){ return $this->rodzic->użytkownicy[$id]; } }; } } $api = new Api(); $api->użytkownicy()->stwórz(['poczta_elektroniczna' => 'jankowalski@gmail.com']); echo $api->użytkownicy()->weź(0)['poczta_elektroniczna'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXrg3
function name:  (null)
number of ops:  16
compiled vars:  !0 = $api
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Api'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'u%C5%BCytkownicy'
          4        DO_FCALL                                      0  $4      
          5        INIT_METHOD_CALL                                         $4, 'stw%C3%B3rz'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0          
   25     8        INIT_METHOD_CALL                                         !0, 'u%C5%BCytkownicy'
          9        DO_FCALL                                      0  $6      
         10        INIT_METHOD_CALL                                         $6, 'we%C5%BA'
         11        SEND_VAL_EX                                              0
         12        DO_FCALL                                      0  $7      
         13        FETCH_DIM_R                                      ~8      $7, 'poczta_elektroniczna'
         14        ECHO                                                     ~8
         15      > RETURN                                                   1

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXrg3
function name:  __construct
number of ops:  4
compiled vars:  !0 = $rodzic
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               'rodzic'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   null

End of function __construct

Function stw%C3%B3rz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXrg3
function name:  stwórz
number of ops:  8
compiled vars:  !0 = $dane
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        FETCH_OBJ_W                                      $1      'rodzic'
          2        FETCH_OBJ_W                                      $2      $1, 'u%C5%BCytkownicy'
          3        ASSIGN_DIM                                               $2
          4        OP_DATA                                                  !0
   14     5        FETCH_OBJ_R                                      ~4      'rodzic'
          6      > RETURN                                                   ~4
   15     7*     > RETURN                                                   null

End of function stw%C3%B3rz

Function we%C5%BA:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXrg3
function name:  weź
number of ops:  6
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      'rodzic'
          2        FETCH_OBJ_R                                      ~2      ~1, 'u%C5%BCytkownicy'
          3        FETCH_DIM_R                                      ~3      ~2, !0
          4      > RETURN                                                   ~3
   19     5*     > RETURN                                                   null

End of function we%C5%BA

End of class class@anonymous.

Class Api:
Function u%C5%BCytkownicy:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OXrg3
function name:  użytkownicy
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_ANON_CLASS                               <array> 
          1        NEW                                              $1      $0
          2        FETCH_THIS                                       $2      
          3        SEND_VAR_EX                                              $2
          4        DO_FCALL                                      0          
          5      > RETURN                                                   $1
   21     6*     > RETURN                                                   null

End of function u%C5%BCytkownicy

End of class Api.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.13 ms | 1399 KiB | 13 Q