3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $res; public function __construct() { $this->res = fopen('/tmp/a','w'); } } var_dump( $test = new Test(), $a = serialize($test), unserialize($a) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BHtAh
function name:  (null)
number of ops:  16
compiled vars:  !0 = $test, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
   11     1        NEW                                              $2      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                           ~4      !0, $2
          4        SEND_VAL                                                 ~4
   12     5        INIT_FCALL                                               'serialize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                           ~6      !1, $5
          9        SEND_VAL                                                 ~6
   13    10        INIT_FCALL                                               'unserialize'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
   14    15      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BHtAh
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 '%2Ftmp%2Fa'
          2        SEND_VAL                                                 'w'
          3        DO_ICALL                                         $1      
          4        ASSIGN_OBJ                                               'res'
          5        OP_DATA                                                  $1
    8     6      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.26 ms | 1400 KiB | 21 Q