3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test extends SplFileInfo implements Serializable { public function __construct() {} public function serialize() {} public function unserialize($string) {} } $rfc = new ReflectionClass("Test"); var_dump($rfc->implementsInterface("Serializable")); var_dump(serialize(new Test));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18Am5
function name:  (null)
number of ops:  20
compiled vars:  !0 = $rfc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'test', 'splfileinfo'
    8     1        NEW                                              $1      'ReflectionClass'
          2        SEND_VAL_EX                                              'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   10     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'implementsInterface'
          7        SEND_VAL_EX                                              'Serializable'
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
   11    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'serialize'
         13        NEW                                              $6      'Test'
         14        DO_FCALL                                      0          
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                         $8      
         17        SEND_VAR                                                 $8
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

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

End of function __construct

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

End of function serialize

Function unserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18Am5
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function unserialize

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.01 ms | 1388 KiB | 17 Q