3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new SplPriorityQueue(); $a->insert(new stdClass, 3); $a->insert(array(), 2); var_dump(count($a)); var_dump(iterator_to_array($a)); var_dump(count($a)); var_dump(iterator_to_array($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WUYVQ
function name:  (null)
number of ops:  34
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        COUNT                                            ~8      !0
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'iterator_to_array'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $10     
         21        SEND_VAR                                                 $10
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'var_dump'
         24        COUNT                                            ~12     !0
         25        SEND_VAL                                                 ~12
         26        DO_ICALL                                                 
   10    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'iterator_to_array'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $14     
         31        SEND_VAR                                                 $14
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.84 ms | 1396 KiB | 17 Q