3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; } class FooBar extends Foo { public function __sleep() { return array('bar'); } } class FooBarBaz extends Foo { public function __sleep() { return array("\0Foo\0bar"); } } serialize(new Foo()); serialize(new FooBar()); serialize(new FooBarBaz());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdBtd
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'serialize'
          1        NEW                                              $0      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   19     5        INIT_FCALL                                               'serialize'
          6        NEW                                              $3      'FooBar'
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   20    10        INIT_FCALL                                               'serialize'
         11        NEW                                              $6      'FooBarBaz'
         12        DO_FCALL                                      0          
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Foo: [no user functions]
Class FooBar:
Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdBtd
function name:  __sleep
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   <array>
          1*     > RETURN                                                   null

End of function __sleep

End of class FooBar.

Class FooBarBaz:
Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdBtd
function name:  __sleep
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   <array>
          1*     > RETURN                                                   null

End of function __sleep

End of class FooBarBaz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.92 ms | 1395 KiB | 15 Q