3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass { public function __construct () { echo("constructor\n"); } public function __destruct () { echo("destructor\n"); } } $temp = array( 0 => array( 'dupa' => 'ddd', 'test' => new myclass() ) ); echo("------------1-----------\n"); foreach ($temp as $key => $ttt) { //unset($temp[$key]['test']); $temp[$key] = null; unset($temp[$key]); } echo("------------2-----------\n"); echo("------------3-----------\n");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/pBLIT
function name:  (null)
number of ops:  18
compiled vars:  !0 = $temp, !1 = $ttt, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_ARRAY                                       ~3      'ddd', 'dupa'
   19     1        NEW                                              $4      'myclass'
          2        DO_FCALL                                      0          
          3        ADD_ARRAY_ELEMENT                                ~3      $4, 'test'
          4        INIT_ARRAY                                       ~6      ~3, 0
   16     5        ASSIGN                                                   !0, ~6
   23     6        ECHO                                                     '------------1-----------%0A'
   24     7      > FE_RESET_R                                       $8      !0, ->14
          8    > > FE_FETCH_R                                       ~9      $8, !1, ->14
          9    >   ASSIGN                                                   !2, ~9
   27    10        ASSIGN_DIM                                               !0, !2
         11        OP_DATA                                                  null
   28    12        UNSET_DIM                                                !0, !2
   24    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $8
   30    15        ECHO                                                     '------------2-----------%0A'
   31    16        ECHO                                                     '------------3-----------%0A'
         17      > RETURN                                                   1

Class myclass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pBLIT
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'constructor%0A'
    8     1      > 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/pBLIT
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'destructor%0A'
   13     1      > RETURN                                                   null

End of function __destruct

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.38 ms | 1395 KiB | 13 Q