3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'a:4:{i:0;O:8:"stdClass":2:{s:3:"aaa";a:2:{i:0;s:5:"AAAAA";i:1;i:2;}s:3:"aaa";i:3;}i:2;i:4;i:3;i:5;s:3:"ccc";R:4;}'; $x = unserialize($data); //var_dump($x); var_dump(is_string($x['ccc'])); var_dump(in_array($x['ccc'], array('test'))); //var_dump(is_string($x['ccc'])); var_dump(is_string($x['ccc']) && in_array($x['ccc'], array('test'))); if(is_string($x['ccc']) && in_array($x['ccc'], array('test'))) { $a = 'aaaaa'; $b = 'bbbbb'; var_dump($x['ccc']); echo 'haha'; } else { echo 'fuck'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 39
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 22
filename:       /in/JdjlC
function name:  (null)
number of ops:  41
compiled vars:  !0 = $data, !1 = $x, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a%3A4%3A%7Bi%3A0%3BO%3A8%3A%22stdClass%22%3A2%3A%7Bs%3A3%3A%22aaa%22%3Ba%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22AAAAA%22%3Bi%3A1%3Bi%3A2%3B%7Ds%3A3%3A%22aaa%22%3Bi%3A3%3B%7Di%3A2%3Bi%3A4%3Bi%3A3%3Bi%3A5%3Bs%3A3%3A%22ccc%22%3BR%3A4%3B%7D'
    4     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    7     5        INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~7      !1, 'ccc'
          7        TYPE_CHECK                                   64  ~8      ~7
          8        SEND_VAL                                                 ~8
          9        DO_ICALL                                                 
    9    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~10     !1, 'ccc'
         12        IN_ARRAY                                         ~11     ~10, <array>
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                                 
   13    15        INIT_FCALL                                               'var_dump'
         16        FETCH_DIM_R                                      ~13     !1, 'ccc'
         17        TYPE_CHECK                                   64  ~14     ~13
         18      > JMPZ_EX                                          ~14     ~14, ->22
         19    >   FETCH_DIM_R                                      ~15     !1, 'ccc'
         20        IN_ARRAY                                         ~16     ~15, <array>
         21        BOOL                                             ~14     ~16
         22    >   SEND_VAL                                                 ~14
         23        DO_ICALL                                                 
   15    24        FETCH_DIM_R                                      ~18     !1, 'ccc'
         25        TYPE_CHECK                                   64  ~19     ~18
         26      > JMPZ_EX                                          ~19     ~19, ->30
         27    >   FETCH_DIM_R                                      ~20     !1, 'ccc'
         28        IN_ARRAY                                         ~21     ~20, <array>
         29        BOOL                                             ~19     ~21
         30    > > JMPZ                                                     ~19, ->39
   16    31    >   ASSIGN                                                   !2, 'aaaaa'
   17    32        ASSIGN                                                   !3, 'bbbbb'
   18    33        INIT_FCALL                                               'var_dump'
         34        FETCH_DIM_R                                      ~24     !1, 'ccc'
         35        SEND_VAL                                                 ~24
         36        DO_ICALL                                                 
   19    37        ECHO                                                     'haha'
         38      > JMP                                                      ->40
   21    39    >   ECHO                                                     'fuck'
   22    40    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.89 ms | 1400 KiB | 17 Q