3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.+++.'; $commands = array( '>' => '$ptr++;', '<' => '$ptr--;', '+' => '$cells[$ptr]++;', '-' => '$cells[$ptr]--;', '.' => 'echo chr($cells[$ptr]);', ',' => 'throw new Exception(", not supported");', '[' => 'while($cells[$ptr]) {', ']' => '}' ); $php_code = strtr($code, $commands); $cells = array( 0, 0, 0, 0, 0, 0, 0, 0 ); $ptr = 0; eval($php_code);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dINr9
function name:  (null)
number of ops:  11
compiled vars:  !0 = $code, !1 = $commands, !2 = $php_code, !3 = $cells, !4 = $ptr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%5B%3E%2B%2B%2B%2B%2B%2B%2B%3E%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%3E%2B%2B%2B%3E%2B%3C%3C%3C%3C-%5D%3E%2B%2B.%3E%2B.%2B%2B%2B%2B%2B%2B%2B..%2B%2B%2B.%3E%2B%2B.%3C%3C%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B%2B.%3E.%2B%2B%2B.------.--------.%3E%2B.%3E.%2B%2B%2B.'
    4     1        ASSIGN                                                   !1, <array>
   14     2        INIT_FCALL                                               'strtr'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
   15     7        ASSIGN                                                   !3, <array>
   25     8        ASSIGN                                                   !4, 0
   26     9        INCLUDE_OR_EVAL                                          !2, EVAL
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.66 ms | 1398 KiB | 15 Q