3v4l.org

run code in 300+ PHP versions simultaneously
<?php class derp { protected $d = "hurrdurr"; } class test { protected $val = "test"; protected $derp; public function __construct() { $this->derp = new derp; } public function __get($var) { return $this->$var; } } $test = new test; echo json_encode($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rruXn
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class derp: [no user functions]
Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rruXn
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'derp'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'derp'
          3        OP_DATA                                                  $1
   13     4      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rruXn
function name:  __get
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
   17     3*     > RETURN                                                   null

End of function __get

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.69 ms | 1395 KiB | 15 Q