3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iter = \IntlBreakIterator::createCodePointInstance(); $iter->setText('ABC'); $keys = []; $expected = [0, 1, 2]; foreach ($iter->getPartsIterator(\IntlPartsIterator::KEY_LEFT) as $key => $value) { $keys[] = $key; } assert($keys === $expected, sprintf('Expected %d, %d, %d; Got %d, %d, %d.', ...$expected, ...$keys));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/O8374
function name:  (null)
number of ops:  32
compiled vars:  !0 = $iter, !1 = $keys, !2 = $expected, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'IntlBreakIterator', 'createCodePointInstance'
          1        DO_FCALL                                      0  $5      
          2        ASSIGN                                                   !0, $5
    4     3        INIT_METHOD_CALL                                         !0, 'setText'
          4        SEND_VAL_EX                                              'ABC'
          5        DO_FCALL                                      0          
    5     6        ASSIGN                                                   !1, <array>
    6     7        ASSIGN                                                   !2, <array>
    8     8        INIT_METHOD_CALL                                         !0, 'getPartsIterator'
          9        FETCH_CLASS_CONSTANT                             ~10     'IntlPartsIterator', 'KEY_LEFT'
         10        SEND_VAL_EX                                              ~10
         11        DO_FCALL                                      0  $11     
         12      > FE_RESET_R                                       $12     $11, ->18
         13    > > FE_FETCH_R                                       ~13     $12, !3, ->18
         14    >   ASSIGN                                                   !4, ~13
    9    15        ASSIGN_DIM                                               !1
         16        OP_DATA                                                  !4
    8    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $12
   12    19        ASSERT_CHECK                                             
         20        INIT_FCALL                                               'assert'
         21        IS_IDENTICAL                                     ~16     !1, !2
         22        SEND_VAL                                                 ~16
         23        INIT_FCALL                                               'sprintf'
         24        SEND_VAL                                                 'Expected+%25d%2C+%25d%2C+%25d%3B+Got+%25d%2C+%25d%2C+%25d.'
         25        SEND_UNPACK                                              !2
         26        SEND_UNPACK                                              !1
         27        CHECK_UNDEF_ARGS                                         
         28        DO_ICALL                                         $17     
         29        SEND_VAR                                                 $17
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.55 ms | 1396 KiB | 17 Q