3v4l.org

run code in 300+ PHP versions simultaneously
<?php // gc_disable(); // <-- if this comment is removed, everything works as expected $a = array(); $b = new SplObjectStorage(); for ($i = 10000; $i > 0; $i--) { $object = new StdClass(); $a[] = $object; $b->attach($object); } $c = serialize(array($a, $b)); $d = unserialize($c); echo "ok";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 6
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 6
Branch analysis from position: 17
Branch analysis from position: 6
filename:       /in/tUoUf
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $b, !2 = $i, !3 = $object, !4 = $c, !5 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        NEW                                              $7      'SplObjectStorage'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $7
    6     4        ASSIGN                                                   !2, 10000
          5      > JMP                                                      ->15
    7     6    >   NEW                                              $11     'StdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !3, $11
    8     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  !3
    9    11        INIT_METHOD_CALL                                         !1, 'attach'
         12        SEND_VAR_EX                                              !3
         13        DO_FCALL                                      0          
    6    14        PRE_DEC                                                  !2
         15    >   IS_SMALLER                                               0, !2
         16      > JMPNZ                                                    ~17, ->6
   12    17    >   INIT_FCALL                                               'serialize'
         18        INIT_ARRAY                                       ~18     !0
         19        ADD_ARRAY_ELEMENT                                ~18     !1
         20        SEND_VAL                                                 ~18
         21        DO_ICALL                                         $19     
         22        ASSIGN                                                   !4, $19
   13    23        INIT_FCALL                                               'unserialize'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                         $21     
         26        ASSIGN                                                   !5, $21
   15    27        ECHO                                                     'ok'
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.93 ms | 1388 KiB | 17 Q