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'; $c = 'ccccc'; $d = 'ddddd'; $e = 'eeeee'; $f = 'fffff'; $g = 'ggggg'; var_dump($x['ccc']); echo 'haha'; } else { echo 'fuck'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 39
Branch analysis from position: 26
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: 25
Branch analysis from position: 17
filename:       /in/apRM0
function name:  (null)
number of ops:  41
compiled vars:  !0 = $data, !1 = $x, !2 = $a, !3 = $b, !4 = $c, !5 = $d, !6 = $e, !7 = $f, !8 = $g
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                                         $10     
          4        ASSIGN                                                   !1, $10
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_DIM_R                                      ~12     !1, 'ccc'
          7        IN_ARRAY                                         ~13     ~12, <array>
          8        SEND_VAL                                                 ~13
          9        DO_ICALL                                                 
   13    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~15     !1, 'ccc'
         12        TYPE_CHECK                                   64  ~16     ~15
         13      > JMPZ_EX                                          ~16     ~16, ->17
         14    >   FETCH_DIM_R                                      ~17     !1, 'ccc'
         15        IN_ARRAY                                         ~18     ~17, <array>
         16        BOOL                                             ~16     ~18
         17    >   SEND_VAL                                                 ~16
         18        DO_ICALL                                                 
   15    19        FETCH_DIM_R                                      ~20     !1, 'ccc'
         20        TYPE_CHECK                                   64  ~21     ~20
         21      > JMPZ_EX                                          ~21     ~21, ->25
         22    >   FETCH_DIM_R                                      ~22     !1, 'ccc'
         23        IN_ARRAY                                         ~23     ~22, <array>
         24        BOOL                                             ~21     ~23
         25    > > JMPZ                                                     ~21, ->39
   16    26    >   ASSIGN                                                   !2, 'aaaaa'
   17    27        ASSIGN                                                   !3, 'bbbbb'
   18    28        ASSIGN                                                   !4, 'ccccc'
   19    29        ASSIGN                                                   !5, 'ddddd'
   20    30        ASSIGN                                                   !6, 'eeeee'
   21    31        ASSIGN                                                   !7, 'fffff'
   22    32        ASSIGN                                                   !8, 'ggggg'
   23    33        INIT_FCALL                                               'var_dump'
         34        FETCH_DIM_R                                      ~31     !1, 'ccc'
         35        SEND_VAL                                                 ~31
         36        DO_ICALL                                                 
   24    37        ECHO                                                     'haha'
         38      > JMP                                                      ->40
   26    39    >   ECHO                                                     'fuck'
   27    40    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.66 ms | 1400 KiB | 17 Q