3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objects = array(); for ($i=0; $i<10; $i++) { $foo = new stdClass(); $foo->id = $i; $objectHash = spl_object_hash($foo); echo $objectHash . "\n"; $objects[$objectHash] = $foo; } echo count($objects);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
Branch analysis from position: 3
filename:       /in/RASaO
function name:  (null)
number of ops:  22
compiled vars:  !0 = $objects, !1 = $i, !2 = $foo, !3 = $objectHash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->17
    5     3    >   NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $6
    6     6        ASSIGN_OBJ                                               !2, 'id'
          7        OP_DATA                                                  !1
    7     8        INIT_FCALL                                               'spl_object_hash'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !3, $10
    8    12        CONCAT                                           ~12     !3, '%0A'
         13        ECHO                                                     ~12
    9    14        ASSIGN_DIM                                               !0, !3
         15        OP_DATA                                                  !2
    4    16        PRE_INC                                                  !1
         17    >   IS_SMALLER                                               !1, 10
         18      > JMPNZ                                                    ~15, ->3
   12    19    >   COUNT                                            ~16     !0
         20        ECHO                                                     ~16
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.92 ms | 1395 KiB | 15 Q