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(); } } $e = new Event(); echo json_serialize($event);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9FgAO
function name:  (null)
number of ops:  9
compiled vars:  !0 = $e, !1 = $event
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'event', 'abstractevent'
   20     1        NEW                                              $2      'Event'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   21     4        INIT_FCALL_BY_NAME                                       'json_serialize'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
          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/9FgAO
function name:  jsonSerialize
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'get_object_vars'
          1        DO_ICALL                                         $0      
          2      > RETURN                                                   $0
   17     3*     > RETURN                                                   null

End of function jsonserialize

End of class Event.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.25 ms | 1394 KiB | 15 Q