3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Q extends SplQueue { } $q = new Q(); $q->enqueue('first'); $q->enqueue('second'); $q->enqueue('third'); foreach($q as $index => $value){ echo $index . " , " . $value . PHP_EOL; } var_dump($q); $out = $q->dequeue(); var_dump($q); $q->enqueue($out); var_dump($q); foreach($q as $index => $value){ echo $index . " , " . $value . PHP_EOL; } echo "===================================" . PHP_EOL; class PQ extends SplPriorityQueue{} $pq = new PQ(); $pq->insert('first', 1); $pq->insert('fifth', 5); $pq->insert('third', 3); foreach($pq as $pr => $val){ echo $pr . " - " . $val . PHP_EOL; } echo PHP_EOL; echo $pq->current();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
2 jumps found. (Code = 77) Position 1 = 37, Position 2 = 44
Branch analysis from position: 37
2 jumps found. (Code = 78) Position 1 = 38, Position 2 = 44
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 44
2 jumps found. (Code = 77) Position 1 = 62, Position 2 = 69
Branch analysis from position: 62
2 jumps found. (Code = 78) Position 1 = 63, Position 2 = 69
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 69
Branch analysis from position: 44
Branch analysis from position: 20
filename:       /in/rlAol
function name:  (null)
number of ops:  75
compiled vars:  !0 = $q, !1 = $value, !2 = $index, !3 = $out, !4 = $pq, !5 = $val, !6 = $pr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $7      'Q'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $7
    9     3        INIT_METHOD_CALL                                         !0, 'enqueue'
          4        SEND_VAL_EX                                              'first'
          5        DO_FCALL                                      0          
   10     6        INIT_METHOD_CALL                                         !0, 'enqueue'
          7        SEND_VAL_EX                                              'second'
          8        DO_FCALL                                      0          
   11     9        INIT_METHOD_CALL                                         !0, 'enqueue'
         10        SEND_VAL_EX                                              'third'
         11        DO_FCALL                                      0          
   13    12      > FE_RESET_R                                       $13     !0, ->20
         13    > > FE_FETCH_R                                       ~14     $13, !1, ->20
         14    >   ASSIGN                                                   !2, ~14
   14    15        CONCAT                                           ~16     !2, '+%2C+'
         16        CONCAT                                           ~17     ~16, !1
         17        CONCAT                                           ~18     ~17, '%0A'
         18        ECHO                                                     ~18
   13    19      > JMP                                                      ->13
         20    >   FE_FREE                                                  $13
   17    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
   18    24        INIT_METHOD_CALL                                         !0, 'dequeue'
         25        DO_FCALL                                      0  $20     
         26        ASSIGN                                                   !3, $20
   19    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
   20    30        INIT_METHOD_CALL                                         !0, 'enqueue'
         31        SEND_VAR_EX                                              !3
         32        DO_FCALL                                      0          
   21    33        INIT_FCALL                                               'var_dump'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                                 
   23    36      > FE_RESET_R                                       $25     !0, ->44
         37    > > FE_FETCH_R                                       ~26     $25, !1, ->44
         38    >   ASSIGN                                                   !2, ~26
   24    39        CONCAT                                           ~28     !2, '+%2C+'
         40        CONCAT                                           ~29     ~28, !1
         41        CONCAT                                           ~30     ~29, '%0A'
         42        ECHO                                                     ~30
   23    43      > JMP                                                      ->37
         44    >   FE_FREE                                                  $25
   27    45        ECHO                                                     '%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A'
   30    46        NEW                                              $31     'PQ'
         47        DO_FCALL                                      0          
         48        ASSIGN                                                   !4, $31
   32    49        INIT_METHOD_CALL                                         !4, 'insert'
         50        SEND_VAL_EX                                              'first'
         51        SEND_VAL_EX                                              1
         52        DO_FCALL                                      0          
   33    53        INIT_METHOD_CALL                                         !4, 'insert'
         54        SEND_VAL_EX                                              'fifth'
         55        SEND_VAL_EX                                              5
         56        DO_FCALL                                      0          
   34    57        INIT_METHOD_CALL                                         !4, 'insert'
         58        SEND_VAL_EX                                              'third'
         59        SEND_VAL_EX                                              3
         60        DO_FCALL                                      0          
   36    61      > FE_RESET_R                                       $37     !4, ->69
         62    > > FE_FETCH_R                                       ~38     $37, !5, ->69
         63    >   ASSIGN                                                   !6, ~38
   37    64        CONCAT                                           ~40     !6, '+-+'
         65        CONCAT                                           ~41     ~40, !5
         66        CONCAT                                           ~42     ~41, '%0A'
         67        ECHO                                                     ~42
   36    68      > JMP                                                      ->62
         69    >   FE_FREE                                                  $37
   40    70        ECHO                                                     '%0A'
   41    71        INIT_METHOD_CALL                                         !4, 'current'
         72        DO_FCALL                                      0  $43     
         73        ECHO                                                     $43
         74      > RETURN                                                   1

Class Q: [no user functions]
Class PQ: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.14 ms | 1400 KiB | 15 Q