3v4l.org

run code in 300+ PHP versions simultaneously
<?php $q = new SplPriorityQueue(); $q->insert('a', 1); $q->insert('b', 2); $q->insert('c', 2); foreach ($q as $e) { var_dump($e); } var_dump(count($q));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/UdVqM
function name:  (null)
number of ops:  27
compiled vars:  !0 = $q, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SplPriorityQueue'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        INIT_METHOD_CALL                                         !0, 'insert'
          4        SEND_VAL_EX                                              'a'
          5        SEND_VAL_EX                                              1
          6        DO_FCALL                                      0          
    6     7        INIT_METHOD_CALL                                         !0, 'insert'
          8        SEND_VAL_EX                                              'b'
          9        SEND_VAL_EX                                              2
         10        DO_FCALL                                      0          
    7    11        INIT_METHOD_CALL                                         !0, 'insert'
         12        SEND_VAL_EX                                              'c'
         13        SEND_VAL_EX                                              2
         14        DO_FCALL                                      0          
    9    15      > FE_RESET_R                                       $8      !0, ->21
         16    > > FE_FETCH_R                                               $8, !1, ->21
   10    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
    9    20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $8
   13    22        INIT_FCALL                                               'var_dump'
         23        COUNT                                            ~10     !0
         24        SEND_VAL                                                 ~10
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.89 ms | 1395 KiB | 15 Q