3v4l.org

run code in 300+ PHP versions simultaneously
<?php class caster implements ArrayAccess{ function offsetGet($o){ return "ehy"; } function offsetSet($a, $b){ return $b . "asdf"; } function offsetUnset($a){ } function offsetExists($a){ } } function c(){ return new caster; } c()[1] = $fac = 10 + 10; var_dump($fac);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JgdsF
function name:  (null)
number of ops:  11
compiled vars:  !0 = $fac
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'caster'
   23     1        INIT_FCALL                                               'c'
          2        DO_FCALL                                      0  $1      
          3        SEPARATE                                         $1      $1
          4        ASSIGN                                           ~3      !0, 20
          5        ASSIGN_DIM                                               $1, 1
          6        OP_DATA                                                  ~3
   25     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JgdsF
function name:  c
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $0      'caster'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function c

Class caster:
Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JgdsF
function name:  offsetGet
number of ops:  3
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   'ehy'
    6     2*     > 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/JgdsF
function name:  offsetSet
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        CONCAT                                           ~2      !1, 'asdf'
          3      > RETURN                                                   ~2
   10     4*     > 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/JgdsF
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     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/JgdsF
function name:  offsetExists
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1      > RETURN                                                   null

End of function offsetexists

End of class caster.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.17 ms | 1403 KiB | 16 Q