3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new SplPriorityQueue(); $a->insert(new stdClass, 3); $a->insert(array(), 2); $b = clone($a); var_dump(count($b), count($a)); var_dump(iterator_to_array($b)); var_dump(count($a), count($b));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lvu8M
function name:  (null)
number of ops:  34
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SplPriorityQueue'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'insert'
          4        NEW                                              $5      'stdClass'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $5
          7        SEND_VAL_EX                                              3
          8        DO_FCALL                                      0          
    5     9        INIT_METHOD_CALL                                         !0, 'insert'
         10        SEND_VAL_EX                                              <array>
         11        SEND_VAL_EX                                              2
         12        DO_FCALL                                      0          
    7    13        CLONE                                            ~9      !0
         14        ASSIGN                                                   !1, ~9
    9    15        INIT_FCALL                                               'var_dump'
         16        COUNT                                            ~11     !1
         17        SEND_VAL                                                 ~11
         18        COUNT                                            ~12     !0
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'iterator_to_array'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $14     
         25        SEND_VAR                                                 $14
         26        DO_ICALL                                                 
   11    27        INIT_FCALL                                               'var_dump'
         28        COUNT                                            ~16     !0
         29        SEND_VAL                                                 ~16
         30        COUNT                                            ~17     !1
         31        SEND_VAL                                                 ~17
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.03 ms | 1396 KiB | 17 Q