3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MemoryLeak { public function __construct() { $this->things[] = $this; } public function __destruct() { $fusion->things[] = null; } } for ($i = 0; $i < 100000; ++$i) { $obj = new MemoryLeak(); }

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/9eRM1
function name:  (null)
number of ops:  9
compiled vars:  !0 = $i, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->6
   14     2    >   NEW                                              $3      'MemoryLeak'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   13     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 100000
          7      > JMPNZ                                                    ~7, ->2
   15     8    > > RETURN                                                   1

Class MemoryLeak:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9eRM1
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_THIS                                       ~2      
          1        FETCH_OBJ_W                                      $0      'things'
          2        ASSIGN_DIM                                               $0
          3        OP_DATA                                                  ~2
    7     4      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9eRM1
function name:  __destruct
number of ops:  4
compiled vars:  !0 = $fusion
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_W                                      $1      !0, 'things'
          1        ASSIGN_DIM                                               $1
          2        OP_DATA                                                  null
   11     3      > RETURN                                                   null

End of function __destruct

End of class MemoryLeak.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.34 ms | 999 KiB | 13 Q