3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class AbstractEvent { protected $id; private $hidden; } class Event extends AbstractEvent implements JsonSerializable { private $value; public function jsonSerialize() { return get_object_vars($this); } } $e = new Event(); echo json_encode($e);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sr6cn
function name:  (null)
number of ops:  9
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'event', 'abstractevent'
   20     1        NEW                                              $1      'Event'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4        INIT_FCALL                                               'json_encode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

Class AbstractEvent: [no user functions]
Class Event:
Function jsonserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sr6cn
function name:  jsonSerialize
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'get_object_vars'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   17     5*     > RETURN                                                   null

End of function jsonserialize

End of class Event.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.68 ms | 1395 KiB | 17 Q