3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bob{ public $args; public $something = 2; public function _construct(){ $this->args= array(1,2,3,4); } } $b = new bob(); echo json_encode ($b); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nOOmY
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'bob'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ECHO                                                     $4
   18     7      > RETURN                                                   1

Class bob:
Function _construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nOOmY
function name:  _construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'args'
          1        OP_DATA                                                  <array>
   10     2      > RETURN                                                   null

End of function _construct

End of class bob.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.59 ms | 1394 KiB | 15 Q