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=$C , this is arithmetic operation\n"; echo "$b-$a=$c , this is subtraction operation\n"; echo "$b/$a=$c , this is division operation\n"; echo "$b%$a=$c, this is modulus and returns reminder\n"; echo "$a*$b=$c, 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/cYTVs
function name:  (null)
number of ops:  70
compiled vars:  !0 = $int_var, !1 = $double, !2 = $r, !3 = $a, !4 = $b, !5 = $C, !6 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 256
    3     1        ASSIGN                                                   !1, 2.54
    4     2        ADD                                              ~9      !0, !1
          3        ASSIGN                                                   !2, ~9
    5     4        CAST                                          6  ~11     !2
          5        ECHO                                                     ~11
    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                                         $13     
         17        ECHO                                                     $13
   16    18        ASSIGN                                                   !3, 10
   17    19        ASSIGN                                                   !4, 200
   19    20        ROPE_INIT                                     6  ~17     !3
         21        ROPE_ADD                                      1  ~17     ~17, '%2B'
         22        ROPE_ADD                                      2  ~17     ~17, !4
         23        ROPE_ADD                                      3  ~17     ~17, '%3D'
         24        ROPE_ADD                                      4  ~17     ~17, !5
         25        ROPE_END                                      5  ~16     ~17, '+%2C+this+is+arithmetic+operation%0A'
         26        ECHO                                                     ~16
   20    27        ROPE_INIT                                     6  ~21     !4
         28        ROPE_ADD                                      1  ~21     ~21, '-'
         29        ROPE_ADD                                      2  ~21     ~21, !3
         30        ROPE_ADD                                      3  ~21     ~21, '%3D'
         31        ROPE_ADD                                      4  ~21     ~21, !6
         32        ROPE_END                                      5  ~20     ~21, '+%2C+this+is+subtraction+operation%0A'
         33        ECHO                                                     ~20
   21    34        ROPE_INIT                                     6  ~25     !4
         35        ROPE_ADD                                      1  ~25     ~25, '%2F'
         36        ROPE_ADD                                      2  ~25     ~25, !3
         37        ROPE_ADD                                      3  ~25     ~25, '%3D'
         38        ROPE_ADD                                      4  ~25     ~25, !6
         39        ROPE_END                                      5  ~24     ~25, '+%2C+this+is+division+operation%0A'
         40        ECHO                                                     ~24
   22    41        ROPE_INIT                                     6  ~29     !4
         42        ROPE_ADD                                      1  ~29     ~29, '%25'
         43        ROPE_ADD                                      2  ~29     ~29, !3
         44        ROPE_ADD                                      3  ~29     ~29, '%3D'
         45        ROPE_ADD                                      4  ~29     ~29, !6
         46        ROPE_END                                      5  ~28     ~29, '%2C+this+is+modulus+and+returns+reminder%0A'
         47        ECHO                                                     ~28
   23    48        ROPE_INIT                                     6  ~33     !3
         49        ROPE_ADD                                      1  ~33     ~33, '%2A'
         50        ROPE_ADD                                      2  ~33     ~33, !4
         51        ROPE_ADD                                      3  ~33     ~33, '%3D'
         52        ROPE_ADD                                      4  ~33     ~33, !6
         53        ROPE_END                                      5  ~32     ~33, '%2C+this+is+multipication%0A'
         54        ECHO                                                     ~32
   24    55        ROPE_INIT                                     3  ~37     '%2B%2B'
         56        ROPE_ADD                                      1  ~37     ~37, !3
         57        ROPE_END                                      2  ~36     ~37, '%2C+this+will+increment+a+value+and+return+a+value%0A'
         58        ECHO                                                     ~36
   25    59        NOP                                                      
         60        FAST_CONCAT                                      ~39     !3, '%2B%2B%2C+this+will+first+print+a+value+then+it+increment%0A'
         61        ECHO                                                     ~39
   26    62        ROPE_INIT                                     3  ~41     '%24--'
         63        ROPE_ADD                                      1  ~41     ~41, !4
         64        ROPE_END                                      2  ~40     ~41, '%2C+this+will+decrement++b+value+and+return+b+%0A'
         65        ECHO                                                     ~40
   27    66        NOP                                                      
         67        FAST_CONCAT                                      ~43     !4, '--%2C+this+will+return+b+value+and+then+decrement%0A'
         68        ECHO                                                     ~43
         69      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.45 ms | 1400 KiB | 17 Q