3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allIntlCharConstants = (new ReflectionClass('IntlChar'))->getConstants(); $constants = array_filter($allIntlCharConstants, function($name){ return strpos('CHAR_CATEGORY_', $name) !== false; }); IntlChar::enumCharTypes(function($start, $end, $type) use ($constants) { printf("U+%04x through U+%04x are in category %d\n", $start, $end, array_search($type, $constants)); });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FJuqa
function name:  (null)
number of ops:  18
compiled vars:  !0 = $allIntlCharConstants, !1 = $constants
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'IntlChar'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $2, 'getConstants'
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
    4     6        INIT_FCALL                                               'array_filter'
          7        SEND_VAR                                                 !0
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFJuqa%3A4%240'
    6     9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
    4    11        ASSIGN                                                   !1, $7
    8    12        INIT_STATIC_METHOD_CALL                                  'IntlChar', 'enumCharTypes'
         13        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFJuqa%3A8%241'
         14        BIND_LEXICAL                                             ~9, !1
   10    15        SEND_VAL_EX                                              ~9
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFJuqa%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FJuqa
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'strpos'
          2        SEND_VAL                                                 'CHAR_CATEGORY_'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        TYPE_CHECK                                  1018  ~2      $1
          6      > RETURN                                                   ~2
    6     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFJuqa%3A4%240

Function %00%7Bclosure%7D%2Fin%2FFJuqa%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FJuqa
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $start, !1 = $end, !2 = $type, !3 = $constants
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        BIND_STATIC                                              !3
    9     4        INIT_FCALL                                               'printf'
          5        SEND_VAL                                                 'U%2B%2504x+through+U%2B%2504x+are+in+category+%25d%0A'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        INIT_FCALL                                               'array_search'
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
   10    14      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFJuqa%3A8%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.64 ms | 1400 KiB | 21 Q