3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements ArrayAccess { public function offsetSet($offset, $value) { var_dump($offset); } public function offsetGet($offset){} public function offsetUnset($offset){} public function offsetExists($offset){} } $test = new Test(); $test[7.3982] = true; $test[new \stdClass()] = true; $x[7.3982] = true; var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dTUK7
function name:  (null)
number of ops:  16
compiled vars:  !0 = $test, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'test'
   15     1        NEW                                              $2      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   17     4        ASSIGN_DIM                                               !0, 7.3982
          5        OP_DATA                                                  <true>
   18     6        NEW                                              $6      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN_DIM                                               !0, $6
          9        OP_DATA                                                  <true>
   20    10        ASSIGN_DIM                                               !1, 7.3982
         11        OP_DATA                                                  <true>
   21    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Test:
Function offsetset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dTUK7
function name:  offsetSet
number of ops:  6
compiled vars:  !0 = $offset, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    8     5      > RETURN                                                   null

End of function offsetset

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

End of function offsetget

Function offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dTUK7
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetunset

Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dTUK7
function name:  offsetExists
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetexists

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.18 ms | 1411 KiB | 15 Q