3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objects = []; for ($i=0; $i<10; $i++) { $foo = new stdClass(); $foo->id = $i; $objectHash = spl_object_hash($foo); echo $objectHash; $objects[$objectHash] = $objectHash; } echo count($objects);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 3
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 3
Branch analysis from position: 18
Branch analysis from position: 3
filename:       /in/iNqGf
function name:  (null)
number of ops:  21
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                                                      ->16
    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        ECHO                                                     !3
    9    13        ASSIGN_DIM                                               !0, !3
         14        OP_DATA                                                  !3
    4    15        PRE_INC                                                  !1
         16    >   IS_SMALLER                                               !1, 10
         17      > JMPNZ                                                    ~14, ->3
   12    18    >   COUNT                                            ~15     !0
         19        ECHO                                                     ~15
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1395 KiB | 15 Q