3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ab implements \Serializable{ /** * @var ElementDataTypeImpl */ protected $x; function __construct() { $this->x = 'val'; } public function serialize() { throw new \Exception('Can\' serialize '); } } var_dump(serialize(new Ab())); die;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/poieV
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'ab'
   21     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'serialize'
          3        NEW                                              $0      'Ab'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
   23     9      > EXIT                                                     
         10*     > RETURN                                                   1

Class Ab:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/poieV
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN_OBJ                                               'x'
          1        OP_DATA                                                  'val'
   12     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/poieV
function name:  serialize
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'Can%27+serialize+'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   17     4*     > RETURN                                                   null

End of function serialize

End of class Ab.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.14 ms | 1395 KiB | 17 Q