3v4l.org

run code in 300+ PHP versions simultaneously
<?php $os = new SplObjectStorage; $obj = new StdClass; $obj2 = new StdClass; $os[$obj] = new SplObjectStorage; $os[$obj]->attach($obj2); var_dump($os->count());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pbPvp
function name:  (null)
number of ops:  23
compiled vars:  !0 = $os, !1 = $obj, !2 = $obj2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'SplObjectStorage'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        NEW                                              $6      'StdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
    6     6        NEW                                              $9      'StdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
    8     9        NEW                                              $13     'SplObjectStorage'
         10        DO_FCALL                                      0          
         11        ASSIGN_DIM                                               !0, !1
         12        OP_DATA                                                  $13
    9    13        FETCH_DIM_R                                      ~15     !0, !1
         14        INIT_METHOD_CALL                                         ~15, 'attach'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0          
   11    17        INIT_FCALL                                               'var_dump'
         18        INIT_METHOD_CALL                                         !0, 'count'
         19        DO_FCALL                                      0  $17     
         20        SEND_VAR                                                 $17
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.89 ms | 1386 KiB | 15 Q