3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=54367 class MyObjet implements ArrayAccess { public function __construct() { } public function offsetSet($offset, $value) { } public function offsetExists($offset) { } public function offsetUnset($offset) { } public function offsetGet ($offset) { return function () {return 'abc'; }; } } $a = new MyObjet(); echo $a['p']('foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yr237
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'myobjet'
   15     1        NEW                                              $1      'MyObjet'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        FETCH_DIM_R                                      ~4      !0, 'p'
          5        INIT_DYNAMIC_CALL                                        ~4
          6        SEND_VAL_EX                                              'foo'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FYr237%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yr237
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'abc'
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FYr237%3A11%240

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

End of function __construct

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

End of function offsetset

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

End of function offsetexists

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

End of function offsetunset

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yr237
function name:  offsetGet
number of ops:  4
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FYr237%3A11%240'
          2      > RETURN                                                   ~1
   12     3*     > RETURN                                                   null

End of function offsetget

End of class MyObjet.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.55 ms | 1399 KiB | 13 Q