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\n"); $a=10; $b=200; $c=$a=$b; $d=$b-$a; $e=$b%$a; $f=$a*$b; $g=$b/$a; $a++; echo "$a + $b=$c, this is arithmetic operation\n"; echo "$b - $a =$d, this is subtraction operation\n"; echo "$b / $a =$g, this is division operation\n"; echo "$b % $a=$e, this is modulus and returns reminder\n"; echo "$a * $b=$f, 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"; $d=date("D"); if($d=="sun") { echo "have nice day\n"; echo "have a gr8 day\n"; } elseif($d=="sat") { echo "wait for sunday and come back and read msg\n"; } else { echo "have a nice week\n"; } switch($d) { case "sun": echo "this is sunday\n"; break; case "sat": echo "this is sat\n"; break; default: echo "have a nice week\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
2 jumps found. (Code = 43) Position 1 = 86, Position 2 = 89
Branch analysis from position: 86
1 jumps found. (Code = 42) Position 1 = 94
Branch analysis from position: 94
4 jumps found. (Code = 188) Position 1 = 100, Position 2 = 102, Position 3 = 104, Position 4 = 95
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 102
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
Branch analysis from position: 104
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 95
2 jumps found. (Code = 44) Position 1 = 97, Position 2 = 100
Branch analysis from position: 97
2 jumps found. (Code = 44) Position 1 = 99, Position 2 = 102
Branch analysis from position: 99
1 jumps found. (Code = 42) Position 1 = 104
Branch analysis from position: 104
Branch analysis from position: 102
Branch analysis from position: 100
Branch analysis from position: 89
2 jumps found. (Code = 43) Position 1 = 91, Position 2 = 93
Branch analysis from position: 91
1 jumps found. (Code = 42) Position 1 = 94
Branch analysis from position: 94
Branch analysis from position: 93
4 jumps found. (Code = 188) Position 1 = 100, Position 2 = 102, Position 3 = 104, Position 4 = 95
Branch analysis from position: 100
Branch analysis from position: 102
Branch analysis from position: 104
Branch analysis from position: 95
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 86, Position 2 = 89
Branch analysis from position: 86
Branch analysis from position: 89
filename:       /in/EvbHK
function name:  (null)
number of ops:  106
compiled vars:  !0 = $int_var, !1 = $double, !2 = $r, !3 = $a, !4 = $b, !5 = $c, !6 = $d, !7 = $e, !8 = $f, !9 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 256
    3     1        ASSIGN                                                   !1, 2.54
    4     2        ADD                                              ~12     !0, !1
          3        ASSIGN                                                   !2, ~12
    5     4        CAST                                          6  ~14     !2
          5        ECHO                                                     ~14
    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%0A'
         16        DO_ICALL                                         $16     
         17        ECHO                                                     $16
   16    18        ASSIGN                                                   !3, 10
   17    19        ASSIGN                                                   !4, 200
   18    20        ASSIGN                                           ~19     !3, !4
         21        ASSIGN                                                   !5, ~19
   19    22        SUB                                              ~21     !4, !3
         23        ASSIGN                                                   !6, ~21
   20    24        MOD                                              ~23     !4, !3
         25        ASSIGN                                                   !7, ~23
   21    26        MUL                                              ~25     !3, !4
         27        ASSIGN                                                   !8, ~25
   22    28        DIV                                              ~27     !4, !3
         29        ASSIGN                                                   !9, ~27
   23    30        PRE_INC                                                  !3
   25    31        ROPE_INIT                                     6  ~31     !3
         32        ROPE_ADD                                      1  ~31     ~31, '+%2B+'
         33        ROPE_ADD                                      2  ~31     ~31, !4
         34        ROPE_ADD                                      3  ~31     ~31, '%3D'
         35        ROPE_ADD                                      4  ~31     ~31, !5
         36        ROPE_END                                      5  ~30     ~31, '%2C+this+is+arithmetic+operation%0A'
         37        ECHO                                                     ~30
   26    38        ROPE_INIT                                     6  ~35     !4
         39        ROPE_ADD                                      1  ~35     ~35, '+-+'
         40        ROPE_ADD                                      2  ~35     ~35, !3
         41        ROPE_ADD                                      3  ~35     ~35, '+%3D'
         42        ROPE_ADD                                      4  ~35     ~35, !6
         43        ROPE_END                                      5  ~34     ~35, '%2C+this+is+subtraction+operation%0A'
         44        ECHO                                                     ~34
   27    45        ROPE_INIT                                     6  ~39     !4
         46        ROPE_ADD                                      1  ~39     ~39, '+%2F+'
         47        ROPE_ADD                                      2  ~39     ~39, !3
         48        ROPE_ADD                                      3  ~39     ~39, '+%3D'
         49        ROPE_ADD                                      4  ~39     ~39, !9
         50        ROPE_END                                      5  ~38     ~39, '%2C+this+is+division+operation%0A'
         51        ECHO                                                     ~38
   28    52        ROPE_INIT                                     6  ~43     !4
         53        ROPE_ADD                                      1  ~43     ~43, '+%25+'
         54        ROPE_ADD                                      2  ~43     ~43, !3
         55        ROPE_ADD                                      3  ~43     ~43, '%3D'
         56        ROPE_ADD                                      4  ~43     ~43, !7
         57        ROPE_END                                      5  ~42     ~43, '%2C+this+is+modulus+and+returns+reminder%0A'
         58        ECHO                                                     ~42
   29    59        ROPE_INIT                                     6  ~47     !3
         60        ROPE_ADD                                      1  ~47     ~47, '+%2A+'
         61        ROPE_ADD                                      2  ~47     ~47, !4
         62        ROPE_ADD                                      3  ~47     ~47, '%3D'
         63        ROPE_ADD                                      4  ~47     ~47, !8
         64        ROPE_END                                      5  ~46     ~47, '%2C+this+is+multipication%0A'
         65        ECHO                                                     ~46
   30    66        ROPE_INIT                                     3  ~51     '%2B%2B'
         67        ROPE_ADD                                      1  ~51     ~51, !3
         68        ROPE_END                                      2  ~50     ~51, '%2C+this+will+increment+a+value+and+return+a+value%0A'
         69        ECHO                                                     ~50
   31    70        NOP                                                      
         71        FAST_CONCAT                                      ~53     !3, '%2B%2B%2C+this+will+first+print+a+value+then+it+increment%0A'
         72        ECHO                                                     ~53
   32    73        ROPE_INIT                                     3  ~55     '%24--'
         74        ROPE_ADD                                      1  ~55     ~55, !4
         75        ROPE_END                                      2  ~54     ~55, '%2C+this+will+decrement++b+value+and+return+b+%0A'
         76        ECHO                                                     ~54
   33    77        NOP                                                      
         78        FAST_CONCAT                                      ~57     !4, '--%2C+this+will+return+b+value+and+then+decrement%0A'
         79        ECHO                                                     ~57
   34    80        INIT_FCALL                                               'date'
         81        SEND_VAL                                                 'D'
         82        DO_ICALL                                         $58     
         83        ASSIGN                                                   !6, $58
   35    84        IS_EQUAL                                                 !6, 'sun'
         85      > JMPZ                                                     ~60, ->89
   37    86    >   ECHO                                                     'have+nice+day%0A'
   38    87        ECHO                                                     'have+a+gr8+day%0A'
         88      > JMP                                                      ->94
   40    89    >   IS_EQUAL                                                 !6, 'sat'
         90      > JMPZ                                                     ~61, ->93
   42    91    >   ECHO                                                     'wait+for+sunday+and+come+back+and+read+msg%0A'
         92      > JMP                                                      ->94
   46    93    >   ECHO                                                     'have+a+nice+week%0A'
   49    94    > > SWITCH_STRING                                            !6, [ 'sun':->100, 'sat':->102, ], ->104
   51    95    >   IS_EQUAL                                                 !6, 'sun'
         96      > JMPNZ                                                    ~62, ->100
   54    97    >   IS_EQUAL                                                 !6, 'sat'
         98      > JMPNZ                                                    ~62, ->102
         99    > > JMP                                                      ->104
   52   100    >   ECHO                                                     'this+is+sunday%0A'
   53   101      > JMP                                                      ->105
   55   102    >   ECHO                                                     'this+is+sat%0A'
   56   103      > JMP                                                      ->105
   58   104    >   ECHO                                                     'have+a+nice+week%0A'
   59   105    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.88 ms | 1404 KiB | 19 Q