3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int_var=256; $double=2.54; $r=$int_var+$double; echo"$r"; if(2+1==4) { echo"this value is equal"; } else { echo"this value is not equal\n"; } define("constant",80); echo constant("constant"); $a=10; $b=200; echo "$a + $b, this is arithmetic operation\n"; echo "$b - $a , this is subtraction operation\n"; echo "$b / $a , this is division operation\n"; echo "$b % $a, this is modulus and returns reminder\n"; echo "$a * $b, this is multipication\n"; echo "++$a, this will increment a value and return a value\n"; echo "$a++, this will first print a value then it increment\n"; echo "$--$b, this will decrement b value and return b \n"; echo "$b--, this will return b value and then decrement\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H3DoQ
function name:  (null)
number of ops:  60
compiled vars:  !0 = $int_var, !1 = $double, !2 = $r, !3 = $a, !4 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 256
    3     1        ASSIGN                                                   !1, 2.54
    4     2        ADD                                              ~7      !0, !1
          3        ASSIGN                                                   !2, ~7
    5     4        CAST                                          6  ~9      !2
          5        ECHO                                                     ~9
    6     6      > JMPZ                                                     <false>, ->9
    8     7    >   ECHO                                                     'this+value+is+equal'
          8      > JMP                                                      ->10
   12     9    >   ECHO                                                     'this+value+is+not+equal%0A'
   14    10    >   INIT_FCALL                                               'define'
         11        SEND_VAL                                                 'constant'
         12        SEND_VAL                                                 80
         13        DO_ICALL                                                 
   15    14        INIT_FCALL                                               'constant'
         15        SEND_VAL                                                 'constant'
         16        DO_ICALL                                         $11     
         17        ECHO                                                     $11
   16    18        ASSIGN                                                   !3, 10
   17    19        ASSIGN                                                   !4, 200
   19    20        ROPE_INIT                                     4  ~15     !3
         21        ROPE_ADD                                      1  ~15     ~15, '+%2B+'
         22        ROPE_ADD                                      2  ~15     ~15, !4
         23        ROPE_END                                      3  ~14     ~15, '%2C+this+is+arithmetic+operation%0A'
         24        ECHO                                                     ~14
   20    25        ROPE_INIT                                     4  ~18     !4
         26        ROPE_ADD                                      1  ~18     ~18, '+-+'
         27        ROPE_ADD                                      2  ~18     ~18, !3
         28        ROPE_END                                      3  ~17     ~18, '+%2C+this+is+subtraction+operation%0A'
         29        ECHO                                                     ~17
   21    30        ROPE_INIT                                     4  ~21     !4
         31        ROPE_ADD                                      1  ~21     ~21, '+%2F+'
         32        ROPE_ADD                                      2  ~21     ~21, !3
         33        ROPE_END                                      3  ~20     ~21, '+%2C+this+is+division+operation%0A'
         34        ECHO                                                     ~20
   22    35        ROPE_INIT                                     4  ~24     !4
         36        ROPE_ADD                                      1  ~24     ~24, '+%25+'
         37        ROPE_ADD                                      2  ~24     ~24, !3
         38        ROPE_END                                      3  ~23     ~24, '%2C+this+is+modulus+and+returns+reminder%0A'
         39        ECHO                                                     ~23
   23    40        ROPE_INIT                                     4  ~27     !3
         41        ROPE_ADD                                      1  ~27     ~27, '+%2A+'
         42        ROPE_ADD                                      2  ~27     ~27, !4
         43        ROPE_END                                      3  ~26     ~27, '%2C+this+is+multipication%0A'
         44        ECHO                                                     ~26
   24    45        ROPE_INIT                                     3  ~30     '%2B%2B'
         46        ROPE_ADD                                      1  ~30     ~30, !3
         47        ROPE_END                                      2  ~29     ~30, '%2C+this+will+increment+a+value+and+return+a+value%0A'
         48        ECHO                                                     ~29
   25    49        NOP                                                      
         50        FAST_CONCAT                                      ~32     !3, '%2B%2B%2C+this+will+first+print+a+value+then+it+increment%0A'
         51        ECHO                                                     ~32
   26    52        ROPE_INIT                                     3  ~34     '%24--'
         53        ROPE_ADD                                      1  ~34     ~34, !4
         54        ROPE_END                                      2  ~33     ~34, '%2C+this+will+decrement++b+value+and+return+b+%0A'
         55        ECHO                                                     ~33
   27    56        NOP                                                      
         57        FAST_CONCAT                                      ~36     !4, '--%2C+this+will+return+b+value+and+then+decrement%0A'
         58        ECHO                                                     ~36
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.37 ms | 1400 KiB | 17 Q