3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface solr_json_build { function to_json(); } class ror_service_recommend implements solr_json_build { //推荐页按产品分类和预订城市进行搜索 public $ids; public $bookCityCode; public $terminalType; public $queryFields; // 过滤价格为0线路 public $priceLimit = true; public function __construct(){} public function to_jsonnnn() { $json = array(); foreach (get_class_vars(__CLASS__) as $field => $value) { $this->{$field} && $json[$field] = $this->{$field}; } return json_encode($json); } } $o = new ror_service_recommend(); print_r($o);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3DAsR
function name:  (null)
number of ops:  8
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'ror_service_recommend'
   36     1        NEW                                              $1      'ror_service_recommend'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   37     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function to_json

End of class solr_json_build.

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

End of function __construct

Function to_jsonnnn:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/3DAsR
function name:  to_jsonnnn
number of ops:  20
compiled vars:  !0 = $json, !1 = $value, !2 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ASSIGN                                                   !0, <array>
   28     1        INIT_FCALL                                               'get_class_vars'
          2        SEND_VAL                                                 'ror_service_recommend'
          3        DO_ICALL                                         $4      
          4      > FE_RESET_R                                       $5      $4, ->14
          5    > > FE_FETCH_R                                       ~6      $5, !1, ->14
          6    >   ASSIGN                                                   !2, ~6
   29     7        FETCH_OBJ_R                                      ~8      !2
          8      > JMPZ_EX                                          ~8      ~8, ->13
          9    >   FETCH_OBJ_R                                      ~10     !2
         10        ASSIGN_DIM                                       ~9      !0, !2
         11        OP_DATA                                                  ~10
         12        BOOL                                             ~8      ~9
   28    13    > > JMP                                                      ->5
         14    >   FE_FREE                                                  $5
   32    15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $11     
         18      > RETURN                                                   $11
   33    19*     > RETURN                                                   null

End of function to_jsonnnn

End of class ror_service_recommend.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.68 ms | 1400 KiB | 19 Q