3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public $derp = 'fucking dumb'; } class Foo { public function __sleep() { $name = 'this'; $$name = new Bar; } } $d = new Foo; print_r(unserialize(serialize($d)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/soTg0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'unserialize'
          5        INIT_FCALL                                               'serialize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Bar: [no user functions]
Class Foo:
Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/soTg0
function name:  __sleep
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'this'
   10     1        NEW                                              $3      'Bar'
          2        DO_FCALL                                      0          
          3        FETCH_W                      local               $2      !0
          4        ASSIGN                                                   $2, $3
   11     5      > RETURN                                                   null

End of function __sleep

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.02 ms | 1386 KiB | 19 Q