3v4l.org

run code in 300+ PHP versions simultaneously
<?php $spl = new SplMinHeap(); $spl->insert(10); $spl->insert(7); $spl->insert(5); $spl->insert(2); echo 'Size object: ' . $spl->count(); // result 4 echo PHP_EOL; foreach ($spl as $number) echo 'Number: ' . $number . PHP_EOL; echo 'New size object: ' . $spl->count(); // result 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/pHeW0
function name:  (null)
number of ops:  32
compiled vars:  !0 = $spl, !1 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SplMinHeap'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        INIT_METHOD_CALL                                         !0, 'insert'
          4        SEND_VAL_EX                                              10
          5        DO_FCALL                                      0          
    6     6        INIT_METHOD_CALL                                         !0, 'insert'
          7        SEND_VAL_EX                                              7
          8        DO_FCALL                                      0          
    7     9        INIT_METHOD_CALL                                         !0, 'insert'
         10        SEND_VAL_EX                                              5
         11        DO_FCALL                                      0          
    8    12        INIT_METHOD_CALL                                         !0, 'insert'
         13        SEND_VAL_EX                                              2
         14        DO_FCALL                                      0          
   10    15        INIT_METHOD_CALL                                         !0, 'count'
         16        DO_FCALL                                      0  $9      
         17        CONCAT                                           ~10     'Size+object%3A+', $9
         18        ECHO                                                     ~10
   12    19        ECHO                                                     '%0A'
   14    20      > FE_RESET_R                                       $11     !0, ->26
         21    > > FE_FETCH_R                                               $11, !1, ->26
   15    22    >   CONCAT                                           ~12     'Number%3A+', !1
         23        CONCAT                                           ~13     ~12, '%0A'
         24        ECHO                                                     ~13
   14    25      > JMP                                                      ->21
         26    >   FE_FREE                                                  $11
   17    27        INIT_METHOD_CALL                                         !0, 'count'
         28        DO_FCALL                                      0  $14     
         29        CONCAT                                           ~15     'New+size+object%3A+', $14
         30        ECHO                                                     ~15
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.17 ms | 1386 KiB | 13 Q