3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "lol"; $var1 = "a:1:{i:0;a:1:{s:6:'Marque';s:6:'Anaïs';}}"; if(isSerialized($var1) === true){ unserialize($var1); } else { echo "KO"; } function isSerialized($str) { return ($str == serialize(false) || @unserialize($str) !== false); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZY7ad
function name:  (null)
number of ops:  13
compiled vars:  !0 = $var, !1 = $var1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'lol'
    4     1        ASSIGN                                                   !1, 'a%3A1%3A%7Bi%3A0%3Ba%3A1%3A%7Bs%3A6%3A%27Marque%27%3Bs%3A6%3A%27Ana%C3%83%C2%AFs%27%3B%7D%7D'
    6     2        INIT_FCALL_BY_NAME                                       'isSerialized'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0  $4      
          5        TYPE_CHECK                                    8          $4
          6      > JMPZ                                                     ~5, ->11
    7     7    >   INIT_FCALL                                               'unserialize'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > JMP                                                      ->12
    9    11    >   ECHO                                                     'KO'
   15    12    > > RETURN                                                   1

Function isserialized:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/ZY7ad
function name:  isSerialized
number of ops:  15
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'serialize'
          2        SEND_VAL                                                 <false>
          3        DO_ICALL                                         $1      
          4        IS_EQUAL                                         ~2      !0, $1
          5      > JMPNZ_EX                                         ~2      ~2, ->13
          6    >   BEGIN_SILENCE                                    ~3      
          7        INIT_FCALL                                               'unserialize'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        END_SILENCE                                              ~3
         11        TYPE_CHECK                                  1018  ~5      $4
         12        BOOL                                             ~2      ~5
         13    > > RETURN                                                   ~2
   15    14*     > RETURN                                                   null

End of function isserialized

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.51 ms | 1396 KiB | 17 Q