3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X extends ArrayObject { public function first() { return 'ok'; } } $array = new X(); $array[] = 'ciao'; $array[] = 'hello'; print_r($array); echo "\n\n"; echo $array->first();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m2R10
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  'ciao'
   13     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  'hello'
   15     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   17    10        ECHO                                                     '%0A%0A'
   19    11        INIT_METHOD_CALL                                         !0, 'first'
         12        DO_FCALL                                      0  $7      
         13        ECHO                                                     $7
         14      > RETURN                                                   1

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

End of function first

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.23 ms | 1386 KiB | 15 Q