3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Some extends ArrayObject { function __construct(){ parent::__construct(array("key"=>"storged value"),ArrayObject::ARRAY_AS_PROPS); } function offsetGet($index){ return "offsetGet called"; } } $obj=new Some(); print $obj->key."<br>"; foreach($obj as $key=>$val){ print $val."<br>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/G6VW0
function name:  (null)
number of ops:  14
compiled vars:  !0 = $obj, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $3      'Some'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   14     3        FETCH_OBJ_R                                      ~6      !0, 'key'
          4        CONCAT                                           ~7      ~6, '%3Cbr%3E'
          5        ECHO                                                     ~7
   15     6      > FE_RESET_R                                       $8      !0, ->12
          7    > > FE_FETCH_R                                       ~9      $8, !1, ->12
          8    >   ASSIGN                                                   !2, ~9
   16     9        CONCAT                                           ~11     !1, '%3Cbr%3E'
         10        ECHO                                                     ~11
   15    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $8
   17    13      > RETURN                                                   1

Class Some:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G6VW0
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        SEND_VAL_EX                                              <array>
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
    6     4      > RETURN                                                   null

End of function __construct

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G6VW0
function name:  offsetGet
number of ops:  3
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   'offsetGet+called'
   10     2*     > RETURN                                                   null

End of function offsetget

End of class Some.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
196.84 ms | 1399 KiB | 13 Q