3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bla = serialize(['a', 'b', 'c']); function isSerialized($string) { return @unserialize($string) !== 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/X2K1C
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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X2K1C
function name:  isSerialized
number of ops:  9
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  ~3      $2
          7      > RETURN                                                   ~3
    8     8*     > RETURN                                                   null

End of function isserialized

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.94 ms | 1398 KiB | 21 Q