3v4l.org

run code in 300+ PHP versions simultaneously
<?php $langcodes = [ 'en', 'fr', 'nl', 'cy', 'de', 'hu', 'sv', 'ru', 'ga', 'ko', 'zh', 'ja', ]; $output = array_map(function($langcode) { $f = new \NumberFormatter($langcode, \NumberFormatter::ORDINAL); return implode(' ', array_map(function($i) use ($f) { return $f->format($i); }, array_merge(range(1, 20), range(30, 100, 10)))); }, $langcodes); var_dump(array_combine($langcodes, $output));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jXP5l
function name:  (null)
number of ops:  15
compiled vars:  !0 = $langcodes, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   22     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
   17     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   23     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'array_combine'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jXP5l
function name:  {closure}
number of ops:  32
compiled vars:  !0 = $langcode, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        NEW                                              $2      'NumberFormatter'
          2        SEND_VAR_EX                                              !0
          3        FETCH_CLASS_CONSTANT                             ~3      'NumberFormatter', 'ORDINAL'
          4        SEND_VAL_EX                                              ~3
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $2
   19     7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '+'
          9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
         11        BIND_LEXICAL                                             ~6, !1
   21    12        SEND_VAL                                                 ~6
         13        INIT_FCALL                                               'array_merge'
         14        INIT_FCALL                                               'range'
         15        SEND_VAL                                                 1
         16        SEND_VAL                                                 20
         17        DO_ICALL                                         $7      
         18        SEND_VAR                                                 $7
         19        INIT_FCALL                                               'range'
         20        SEND_VAL                                                 30
         21        SEND_VAL                                                 100
         22        SEND_VAL                                                 10
         23        DO_ICALL                                         $8      
         24        SEND_VAR                                                 $8
         25        DO_ICALL                                         $9      
         26        SEND_VAR                                                 $9
   19    27        DO_ICALL                                         $10     
   21    28        SEND_VAR                                                 $10
   19    29        DO_ICALL                                         $11     
   21    30      > RETURN                                                   $11
   22    31*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jXP5l
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $i, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   20     2        INIT_METHOD_CALL                                         !1, 'format'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
   21     6*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.28 ms | 1010 KiB | 19 Q