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:4:"test";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'))); if(is_string($x['ccc']) && in_array($x['ccc'], array('test'))) { $a = 'hahahaha'; $b = 'b'; var_dump($x['ccc']); echo 'haha'; } else { echo 'fuck'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/4L8SX
function name:  (null)
number of ops:  32
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%3A4%3A%22test%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                                                 
   11    15        FETCH_DIM_R                                      ~13     !1, 'ccc'
         16        TYPE_CHECK                                   64  ~14     ~13
         17      > JMPZ_EX                                          ~14     ~14, ->21
         18    >   FETCH_DIM_R                                      ~15     !1, 'ccc'
         19        IN_ARRAY                                         ~16     ~15, <array>
         20        BOOL                                             ~14     ~16
         21    > > JMPZ                                                     ~14, ->30
   12    22    >   ASSIGN                                                   !2, 'hahahaha'
   13    23        ASSIGN                                                   !3, 'b'
   14    24        INIT_FCALL                                               'var_dump'
         25        FETCH_DIM_R                                      ~19     !1, 'ccc'
         26        SEND_VAL                                                 ~19
         27        DO_ICALL                                                 
   15    28        ECHO                                                     'haha'
         29      > JMP                                                      ->31
   17    30    >   ECHO                                                     'fuck'
   18    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.81 ms | 1396 KiB | 17 Q