3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example implements JsonSerializable { public function jsonSerialize() { return range('a', 'z'); } } echo json_encode(new Example);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8BJY3
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'example'
   11     1        INIT_FCALL                                               'json_encode'
          2        NEW                                              $0      'Example'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Class Example:
Function jsonserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8BJY3
function name:  jsonSerialize
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 'z'
          3        DO_ICALL                                         $0      
          4      > RETURN                                                   $0
    8     5*     > RETURN                                                   null

End of function jsonserialize

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.12 ms | 1399 KiB | 17 Q