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 = 7, Position 2 = 65
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 36
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 50
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 23
Branch analysis from position: 65
filename:       /in/8hqDT
function name:  (null)
number of ops:  66
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_DIM                                               !0
          1        OP_DATA                                                  'a'
    4     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5        IS_EQUAL                                                 !0, ''
          6      > JMPZ                                                     ~9, ->65
    8     7    >   ECHO                                                     'xyz+is+not+empty%21+good+to+go%21%0A'
    9     8        ASSIGN                                                   !1, 'my+cool+password+keep+it+secrete+please'
   10     9        ASSIGN                                                   !2, 'some+other+password'
   11    10        INIT_FCALL                                               'strcmp'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
   12    15        IS_EQUAL                                                 !3, 0
         16      > JMPZ                                                     ~14, ->23
         17    >   ROPE_INIT                                     5  ~16     'LOLPHP%3A+yes+%27'
         18        ROPE_ADD                                      1  ~16     ~16, !1
         19        ROPE_ADD                                      2  ~16     ~16, '%27+is+the+same+as+%27'
         20        ROPE_ADD                                      3  ~16     ~16, !0
         21        ROPE_END                                      4  ~15     ~16, '%27%0A'
         22        ECHO                                                     ~15
   13    23    >   INIT_FCALL                                               'strcmp'
         24        SEND_VAR                                                 !0
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $19     
         27        ASSIGN                                                   !4, $19
   14    28        IS_EQUAL                                                 !4, 0
         29      > JMPZ                                                     ~21, ->36
         30    >   ROPE_INIT                                     5  ~23     'LOLPHP%3A+yep+%27'
         31        ROPE_ADD                                      1  ~23     ~23, !2
         32        ROPE_ADD                                      2  ~23     ~23, '%27+is+the+same+as+%27'
         33        ROPE_ADD                                      3  ~23     ~23, !0
         34        ROPE_END                                      4  ~22     ~23, '%27%0A'
         35        ECHO                                                     ~22
   15    36    >   INIT_FCALL                                               'strcmp'
         37        SEND_VAR                                                 !1
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                         $26     
         40        ASSIGN                                                   !5, $26
   16    41        IS_NOT_EQUAL                                             !5, 0
         42      > JMPZ                                                     ~28, ->50
         43    >   ROPE_INIT                                     5  ~30     '%27'
         44        ROPE_ADD                                      1  ~30     ~30, !1
         45        ROPE_ADD                                      2  ~30     ~30, '%27+isn%27t+the+same+as+%27'
         46        ROPE_ADD                                      3  ~30     ~30, !2
         47        ROPE_END                                      4  ~29     ~30, '%27%0A'
         48        ECHO                                                     ~29
         49      > JMP                                                      ->56
   17    50    >   ROPE_INIT                                     5  ~34     'i+am+strcmp%2C+and+i+declare+that+%27'
         51        ROPE_ADD                                      1  ~34     ~34, !1
         52        ROPE_ADD                                      2  ~34     ~34, '%27+is+the+same+as+%27'
         53        ROPE_ADD                                      3  ~34     ~34, !2
         54        ROPE_END                                      4  ~33     ~34, '%27%21%21%0A'
         55        ECHO                                                     ~33
   19    56    >   INIT_FCALL                                               'strcmp'
         57        SEND_VAR                                                 !0
         58        SEND_VAR                                                 !0
         59        DO_ICALL                                         $37     
         60        ASSIGN                                                   !6, $37
   20    61        ROPE_INIT                                     3  ~40     'jkl+%3D+'
         62        ROPE_ADD                                      1  ~40     ~40, !6
         63        ROPE_END                                      2  ~39     ~40, '%0A'
         64        ECHO                                                     ~39
   21    65    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.91 ms | 1400 KiB | 17 Q