3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(); $i = 10000; while ($i--) { $test[] = mt_rand(0,99999); } class Foo { public function __construct ($input) { echo $input[array_rand($input)] + 1; } } $i = 10000; while ($i--) { new Foo($test); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 13
Branch analysis from position: 19
Branch analysis from position: 13
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/pnulS
function name:  (null)
number of ops:  20
compiled vars:  !0 = $test, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 10000
    6     2      > JMP                                                      ->9
    7     3    >   INIT_FCALL                                               'mt_rand'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 99999
          6        DO_ICALL                                         $5      
          7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  $5
    6     9    >   POST_DEC                                         ~6      !1
         10      > JMPNZ                                                    ~6, ->3
   16    11    >   ASSIGN                                                   !1, 10000
   18    12      > JMP                                                      ->17
   19    13    >   NEW                                              $8      'Foo'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
         16        FREE                                                     $8
   18    17    >   POST_DEC                                         ~10     !1
         18      > JMPNZ                                                    ~10, ->13
   20    19    > > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pnulS
function name:  __construct
number of ops:  8
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'array_rand'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        FETCH_DIM_R                                      ~2      !0, $1
          5        ADD                                              ~3      ~2, 1
          6        ECHO                                                     ~3
   13     7      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.62 ms | 1396 KiB | 17 Q