3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.32 ms | 1400 KiB | 17 Q