3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new SplPriorityQueue(); $a->insert(new stdClass, 3); $a->insert(array(), 2); var_dump((array) $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/TliSq
function name:  (null)
number of ops:  33
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        CAST                                          7  ~8      !0
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'var_dump'
         18        COUNT                                            ~10     !0
         19        SEND_VAL                                                 ~10
         20        DO_ICALL                                                 
    9    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'iterator_to_array'
         23        CLONE                                            ~12     !0
         24        SEND_VAL                                                 ~12
         25        DO_ICALL                                         $13     
         26        SEND_VAR                                                 $13
         27        DO_ICALL                                                 
   10    28        INIT_FCALL                                               'var_dump'
         29        COUNT                                            ~15     !0
         30        SEND_VAL                                                 ~15
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.85 ms | 1396 KiB | 17 Q