3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestTable implements ArrayAccess { public function offsetExists($offset) { var_dump($offset); } public function offsetGet($offset) { var_dump($offset); } public function offsetSet($offset, $value) { var_dump($offset, $value); } public function offsetUnset($offset) { var_dump($offset); } } $testTable = new TestTable(); $testTable[] = 'foo'; $testTable[] = 'bar'; $testTable[] = 'qux';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tT9fr
function name:  (null)
number of ops:  11
compiled vars:  !0 = $testTable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'testtable'
   28     1        NEW                                              $1      'TestTable'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   29     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  'foo'
   30     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  'bar'
   31     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  'qux'
         10      > RETURN                                                   1

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

End of function offsetexists

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tT9fr
function name:  offsetGet
number of ops:  5
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function offsetget

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

End of function offsetset

Function offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tT9fr
function name:  offsetUnset
number of ops:  5
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   24     4      > RETURN                                                   null

End of function offsetunset

End of class TestTable.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.71 ms | 1400 KiB | 15 Q