3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ab implements Serializable{ protected $x; function __construct() { $this->x = 'val'; } public function serialize() { throw new Exception('Can\'t serialize '); } public function unserialize($str) { throw new Exception('Can\'t serialize '); } } try{ $tmp = serialize(new Ab()); }catch(Exception $e){ var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0bnb
function name:  (null)
number of ops:  13
compiled vars:  !0 = $tmp, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'ab'
   26     1        INIT_FCALL                                               'serialize'
          2        NEW                                              $2      'Ab'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
          7      > JMP                                                      ->12
   27     8  E > > CATCH                                       last         'Exception'
   28     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   29    12    > > RETURN                                                   1

Class Ab:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0bnb
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN_OBJ                                               'x'
          1        OP_DATA                                                  'val'
   11     2      > RETURN                                                   null

End of function __construct

Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/t0bnb
function name:  serialize
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'Can%27t+serialize+'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   16     4*     > RETURN                                                   null

End of function serialize

Function unserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/t0bnb
function name:  unserialize
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'Can%27t+serialize+'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   21     5*     > RETURN                                                   null

End of function unserialize

End of class Ab.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.42 ms | 1400 KiB | 17 Q