3v4l.org

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

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

End of function __sleep

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.97 ms | 1395 KiB | 19 Q