3v4l.org

run code in 300+ PHP versions simultaneously
<?php $instance = new class('foo') { public function __construct($i) { var_dump($i); } }; var_dump($instance); var_dump(serialize($instance)); var_dump(unserialize(serialize($instance)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIEp7
function name:  (null)
number of ops:  24
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_ANON_CLASS                               <undef> 
          1        NEW                                              $2      $1
          2        SEND_VAL_EX                                              'foo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    7     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    8     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'serialize'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    9    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'unserialize'
         16        INIT_FCALL                                               'serialize'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                         $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIEp7
function name:  __construct
number of ops:  5
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null

End of function __construct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.69 ms | 1396 KiB | 19 Q