3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function main() { $x = array('hakunamatata' => 12); $s = 0; for ($i = 0; $i < 1000000; $i++) { $s += $x['hakunamatata']; } var_dump($s); } main();
based on A9veO
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/KUmrK
function name:  (null)
number of ops:  4
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  11     1        INIT_FCALL                                               'main'
         2        DO_FCALL                                      0          
         3      > RETURN                                                   1

Function main:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 8
Branch analysis from position: 8
Jump found. Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Jump found. Position 1 = -2
Branch analysis from position: 4
Jump found. Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/KUmrK
function name:  main
number of ops:  14
compiled vars:  !0 = $x, !1 = $s, !2 = $i
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   ASSIGN                                                   !0, <array>
   5     1        ASSIGN                                                   !1, 0
   6     2        ASSIGN                                                   !2, 0
         3      > JMP                                                      ->8
   7     4    >   FETCH_DIM_R                                      $6      !0, 'hakunamatata'
         5        ASSIGN_ADD                                    0          !1, $6
   6     6        POST_INC                                         ~8      !2
         7        FREE                                                     ~8
         8    >   IS_SMALLER                                       ~9      !2, 1000000
         9      > JMPNZ                                                    ~9, ->4
   9    10    >   INIT_FCALL                                               'var_dump'
        11        SEND_VAR                                                 !1
        12        DO_ICALL                                                 
  10    13      > RETURN                                                   null

End of function main

Generated using Vulcan Logic Dumper, using php 7.1.0