3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Pony { public $tail; } $fluttershy = new Pony(); $fluttershy->tail = new Pony(); $fluttershy->tail->tail = new Pony(); echo json_encode($fluttershy);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3mrEt
function name:  (null)
number of ops:  17
compiled vars:  !0 = $fluttershy
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'Pony'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    8     3        NEW                                              $5      'Pony'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'tail'
          6        OP_DATA                                                  $5
    9     7        NEW                                              $9      'Pony'
          8        DO_FCALL                                      0          
          9        FETCH_OBJ_W                                      $7      !0, 'tail'
         10        ASSIGN_OBJ                                               $7, 'tail'
         11        OP_DATA                                                  $9
   11    12        INIT_FCALL                                               'json_encode'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $11     
         15        ECHO                                                     $11
         16      > RETURN                                                   1

Class Pony: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.7 ms | 1394 KiB | 15 Q