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; 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 = 85, Position 2 = 88
Branch analysis from position: 85
1 jumps found. (Code = 42) Position 1 = 93
Branch analysis from position: 93
4 jumps found. (Code = 188) Position 1 = 99, Position 2 = 101, Position 3 = 103, Position 4 = 94
Branch analysis from position: 99
1 jumps found. (Code = 42) Position 1 = 104
Branch analysis from position: 104
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 101
1 jumps found. (Code = 42) Position 1 = 104
Branch analysis from position: 104
Branch analysis from position: 103
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 94
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 99
Branch analysis from position: 96
2 jumps found. (Code = 44) Position 1 = 98, Position 2 = 101
Branch analysis from position: 98
1 jumps found. (Code = 42) Position 1 = 103
Branch analysis from position: 103
Branch analysis from position: 101
Branch analysis from position: 99
Branch analysis from position: 88
2 jumps found. (Code = 43) Position 1 = 90, Position 2 = 92
Branch analysis from position: 90
1 jumps found. (Code = 42) Position 1 = 93
Branch analysis from position: 93
Branch analysis from position: 92
4 jumps found. (Code = 188) Position 1 = 99, Position 2 = 101, Position 3 = 103, Position 4 = 94
Branch analysis from position: 99
Branch analysis from position: 101
Branch analysis from position: 103
Branch analysis from position: 94
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 88
Branch analysis from position: 85
Branch analysis from position: 88
filename:       /in/TThnc
function name:  (null)
number of ops:  105
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
   25    30        ROPE_INIT                                     6  ~30     !3
         31        ROPE_ADD                                      1  ~30     ~30, '+%2B+'
         32        ROPE_ADD                                      2  ~30     ~30, !4
         33        ROPE_ADD                                      3  ~30     ~30, '%3D'
         34        ROPE_ADD                                      4  ~30     ~30, !5
         35        ROPE_END                                      5  ~29     ~30, '%2C+this+is+arithmetic+operation%0A'
         36        ECHO                                                     ~29
   26    37        ROPE_INIT                                     6  ~34     !4
         38        ROPE_ADD                                      1  ~34     ~34, '+-+'
         39        ROPE_ADD                                      2  ~34     ~34, !3
         40        ROPE_ADD                                      3  ~34     ~34, '+%3D'
         41        ROPE_ADD                                      4  ~34     ~34, !6
         42        ROPE_END                                      5  ~33     ~34, '%2C+this+is+subtraction+operation%0A'
         43        ECHO                                                     ~33
   27    44        ROPE_INIT                                     6  ~38     !4
         45        ROPE_ADD                                      1  ~38     ~38, '+%2F+'
         46        ROPE_ADD                                      2  ~38     ~38, !3
         47        ROPE_ADD                                      3  ~38     ~38, '+%3D'
         48        ROPE_ADD                                      4  ~38     ~38, !9
         49        ROPE_END                                      5  ~37     ~38, '%2C+this+is+division+operation%0A'
         50        ECHO                                                     ~37
   28    51        ROPE_INIT                                     6  ~42     !4
         52        ROPE_ADD                                      1  ~42     ~42, '+%25+'
         53        ROPE_ADD                                      2  ~42     ~42, !3
         54        ROPE_ADD                                      3  ~42     ~42, '%3D'
         55        ROPE_ADD                                      4  ~42     ~42, !7
         56        ROPE_END                                      5  ~41     ~42, '%2C+this+is+modulus+and+returns+reminder%0A'
         57        ECHO                                                     ~41
   29    58        ROPE_INIT                                     6  ~46     !3
         59        ROPE_ADD                                      1  ~46     ~46, '+%2A+'
         60        ROPE_ADD                                      2  ~46     ~46, !4
         61        ROPE_ADD                                      3  ~46     ~46, '%3D'
         62        ROPE_ADD                                      4  ~46     ~46, !8
         63        ROPE_END                                      5  ~45     ~46, '%2C+this+is+multipication%0A'
         64        ECHO                                                     ~45
   30    65        ROPE_INIT                                     3  ~50     '%2B%2B'
         66        ROPE_ADD                                      1  ~50     ~50, !3
         67        ROPE_END                                      2  ~49     ~50, '%2C+this+will+increment+a+value+and+return+a+value%0A'
         68        ECHO                                                     ~49
   31    69        NOP                                                      
         70        FAST_CONCAT                                      ~52     !3, '%2B%2B%2C+this+will+first+print+a+value+then+it+increment%0A'
         71        ECHO                                                     ~52
   32    72        ROPE_INIT                                     3  ~54     '%24--'
         73        ROPE_ADD                                      1  ~54     ~54, !4
         74        ROPE_END                                      2  ~53     ~54, '%2C+this+will+decrement++b+value+and+return+b+%0A'
         75        ECHO                                                     ~53
   33    76        NOP                                                      
         77        FAST_CONCAT                                      ~56     !4, '--%2C+this+will+return+b+value+and+then+decrement%0A'
         78        ECHO                                                     ~56
   34    79        INIT_FCALL                                               'date'
         80        SEND_VAL                                                 'D'
         81        DO_ICALL                                         $57     
         82        ASSIGN                                                   !6, $57
   35    83        IS_EQUAL                                                 !6, 'sun'
         84      > JMPZ                                                     ~59, ->88
   37    85    >   ECHO                                                     'have+nice+day%0A'
   38    86        ECHO                                                     'have+a+gr8+day%0A'
         87      > JMP                                                      ->93
   40    88    >   IS_EQUAL                                                 !6, 'sat'
         89      > JMPZ                                                     ~60, ->92
   42    90    >   ECHO                                                     'wait+for+sunday+and+come+back+and+read+msg%0A'
         91      > JMP                                                      ->93
   46    92    >   ECHO                                                     'have+a+nice+week%0A'
   49    93    > > SWITCH_STRING                                            !6, [ 'sun':->99, 'sat':->101, ], ->103
   51    94    >   IS_EQUAL                                                 !6, 'sun'
         95      > JMPNZ                                                    ~61, ->99
   54    96    >   IS_EQUAL                                                 !6, 'sat'
         97      > JMPNZ                                                    ~61, ->101
         98    > > JMP                                                      ->103
   52    99    >   ECHO                                                     'this+is+sunday%0A'
   53   100      > JMP                                                      ->104
   55   101    >   ECHO                                                     'this+is+sat%0A'
   56   102      > JMP                                                      ->104
   58   103    >   ECHO                                                     'have+a+nice+week%0A'
   59   104    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.53 ms | 1404 KiB | 19 Q