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; } }
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 = 62) Position 1 = -2
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/9Lm50
function name:  (null)
number of ops:  12
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
   14    11    > > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Lm50
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:
146.17 ms | 1395 KiB | 17 Q