3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xyz="a"; var_dump($xyz); if($xyz != '') { echo "xyz is not empty! good to go!\n"; $pw1 = 'my cool password keep it secrete please'; $pw2 = 'some other password'; $abc = strcmp($xyz, $pw1); if ($abc == 0) { echo "LOLPHP: yes '$pw1' is the same as '$xyz'\n"; } $def = strcmp($xyz, $pw2); if ($def == 0) { echo "LOLPHP: yep '$pw2' is the same as '$xyz'\n"; } $ghi = strcmp($pw1, $pw2); if ($ghi != 0) { echo "'$pw1' isn't the same as '$pw2'\n"; } else {echo "i am strcmp, and i declare that '$pw1' is the same as '$pw2'!!\n"; } $jkl = strcmp($xyz, $xyz); echo "jkl = $jkl\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 64
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 35
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 49
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 22
Branch analysis from position: 64
filename:       /in/r4W9O
function name:  (null)
number of ops:  65
compiled vars:  !0 = $xyz, !1 = $pw1, !2 = $pw2, !3 = $abc, !4 = $def, !5 = $ghi, !6 = $jkl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a'
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        IS_NOT_EQUAL                                             !0, ''
          5      > JMPZ                                                     ~9, ->64
    8     6    >   ECHO                                                     'xyz+is+not+empty%21+good+to+go%21%0A'
    9     7        ASSIGN                                                   !1, 'my+cool+password+keep+it+secrete+please'
   10     8        ASSIGN                                                   !2, 'some+other+password'
   11     9        INIT_FCALL                                               'strcmp'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $12     
         13        ASSIGN                                                   !3, $12
   12    14        IS_EQUAL                                                 !3, 0
         15      > JMPZ                                                     ~14, ->22
         16    >   ROPE_INIT                                     5  ~16     'LOLPHP%3A+yes+%27'
         17        ROPE_ADD                                      1  ~16     ~16, !1
         18        ROPE_ADD                                      2  ~16     ~16, '%27+is+the+same+as+%27'
         19        ROPE_ADD                                      3  ~16     ~16, !0
         20        ROPE_END                                      4  ~15     ~16, '%27%0A'
         21        ECHO                                                     ~15
   13    22    >   INIT_FCALL                                               'strcmp'
         23        SEND_VAR                                                 !0
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $19     
         26        ASSIGN                                                   !4, $19
   14    27        IS_EQUAL                                                 !4, 0
         28      > JMPZ                                                     ~21, ->35
         29    >   ROPE_INIT                                     5  ~23     'LOLPHP%3A+yep+%27'
         30        ROPE_ADD                                      1  ~23     ~23, !2
         31        ROPE_ADD                                      2  ~23     ~23, '%27+is+the+same+as+%27'
         32        ROPE_ADD                                      3  ~23     ~23, !0
         33        ROPE_END                                      4  ~22     ~23, '%27%0A'
         34        ECHO                                                     ~22
   15    35    >   INIT_FCALL                                               'strcmp'
         36        SEND_VAR                                                 !1
         37        SEND_VAR                                                 !2
         38        DO_ICALL                                         $26     
         39        ASSIGN                                                   !5, $26
   16    40        IS_NOT_EQUAL                                             !5, 0
         41      > JMPZ                                                     ~28, ->49
         42    >   ROPE_INIT                                     5  ~30     '%27'
         43        ROPE_ADD                                      1  ~30     ~30, !1
         44        ROPE_ADD                                      2  ~30     ~30, '%27+isn%27t+the+same+as+%27'
         45        ROPE_ADD                                      3  ~30     ~30, !2
         46        ROPE_END                                      4  ~29     ~30, '%27%0A'
         47        ECHO                                                     ~29
         48      > JMP                                                      ->55
   17    49    >   ROPE_INIT                                     5  ~34     'i+am+strcmp%2C+and+i+declare+that+%27'
         50        ROPE_ADD                                      1  ~34     ~34, !1
         51        ROPE_ADD                                      2  ~34     ~34, '%27+is+the+same+as+%27'
         52        ROPE_ADD                                      3  ~34     ~34, !2
         53        ROPE_END                                      4  ~33     ~34, '%27%21%21%0A'
         54        ECHO                                                     ~33
   19    55    >   INIT_FCALL                                               'strcmp'
         56        SEND_VAR                                                 !0
         57        SEND_VAR                                                 !0
         58        DO_ICALL                                         $37     
         59        ASSIGN                                                   !6, $37
   20    60        ROPE_INIT                                     3  ~40     'jkl+%3D+'
         61        ROPE_ADD                                      1  ~40     ~40, !6
         62        ROPE_END                                      2  ~39     ~40, '%0A'
         63        ECHO                                                     ~39
   21    64    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1400 KiB | 17 Q