3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findFacotrs($number) { $factors = array(); for($x = 1; $x <= ($number/2); $x++) { if ($number % $x == 0) { array_push($factors, $x); } } echo $factors; } findFactors(10);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bJi4E
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL_BY_NAME                                       'findFactors'
          1        SEND_VAL_EX                                              10
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function findfacotrs:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
Branch analysis from position: 11
filename:       /in/bJi4E
function name:  findFacotrs
number of ops:  17
compiled vars:  !0 = $number, !1 = $factors, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->12
    6     4    >   MOD                                              ~5      !0, !2
          5        IS_EQUAL                                                 ~5, 0
          6      > JMPZ                                                     ~6, ->11
    7     7    >   INIT_FCALL                                               'array_push'
          8        SEND_REF                                                 !1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
    5    11    >   PRE_INC                                                  !2
         12    >   DIV                                              ~9      !0, 2
         13        IS_SMALLER_OR_EQUAL                                      !2, ~9
         14      > JMPNZ                                                    ~10, ->4
   11    15    >   ECHO                                                     !1
   13    16      > RETURN                                                   null

End of function findfacotrs

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.99 ms | 1395 KiB | 15 Q