3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function method() { $arr = []; for ( $i=0;$i<10000;++$i ) { $arr[]= $i; } return $arr; } } $t = new Test; echo $t->method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MBvI4
function name:  (null)
number of ops:  7
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'method'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class Test:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/MBvI4
function name:  method
number of ops:  10
compiled vars:  !0 = $arr, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    9     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  !1
    8     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 10000
          7      > JMPNZ                                                    ~6, ->3
   12     8    > > RETURN                                                   !0
   13     9*     > RETURN                                                   null

End of function method

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.65 ms | 1385 KiB | 13 Q