3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myObject { protected $objects = array(); public function add(myObject $object) { $this->objects[] = $object; } } $foo = new myObject; while (true) $foo->addObject($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
Branch analysis from position: 4
filename:       /in/WtoEA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'myObject'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3      > JMP                                                      ->7
   15     4    >   INIT_METHOD_CALL                                         !0, 'addObject'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   14     7    > > JMPNZ                                                    <true>, ->4
   15     8    > > RETURN                                                   1

Class myObject:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WtoEA
function name:  add
number of ops:  5
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_W                                      $1      'objects'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   10     4      > RETURN                                                   null

End of function add

End of class myObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.57 ms | 1394 KiB | 13 Q