3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = 10000000; class A { protected $number; public function __construct() { $this->number = mt_rand(1, 10000); } } for ($i = 0; $i <= $iterations; ++$i) { $someVariable = new A; }
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 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/WAouf
function name:  (null)
number of ops:  10
compiled vars:  !0 = $iterations, !1 = $i, !2 = $someVariable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10000000
   13     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
   14     3    >   NEW                                              $5      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $5
   13     6        PRE_INC                                                  !1
          7    >   IS_SMALLER_OR_EQUAL                                      !1, !0
          8      > JMPNZ                                                    ~9, ->3
   15     9    > > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.31 ms | 1395 KiB | 15 Q