3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bla = serialize(['a', 'b', 'c']); function isSerialized($string) { return @unserialize($string) !== false ? true : false; } var_dump(isSerialized("abc")); var_dump(isSerialized($bla));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k4uG4
function name:  (null)
number of ops:  17
compiled vars:  !0 = $bla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'serialize'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
   10     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'isserialized'
          6        SEND_VAL                                                 'abc'
          7        DO_FCALL                                      0  $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   11    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'isserialized'
         12        SEND_VAR                                                 !0
         13        DO_FCALL                                      0  $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function isserialized

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.14 ms | 1403 KiB | 21 Q