3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $x = array(); public function __construct() { $this->x = range(1,10000); } } $a = array(); for ($i = 0; $i < 2000; $i++) { $a []= new A(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/La7AC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->8
   10     3    >   NEW                                              $5      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  $5
    9     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 2000
          9      > JMPNZ                                                    ~8, ->3
   11    10    > > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/La7AC
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $1      
          4        ASSIGN_OBJ                                               'x'
          5        OP_DATA                                                  $1
    6     6      > RETURN                                                   null

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.59 ms | 1395 KiB | 15 Q