3v4l.org

run code in 500+ 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:/in/jXP5l:17}
number of ops:  29
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                                                   'array_map'
          8        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          9        BIND_LEXICAL                                                 ~6, !1
   21    10        SEND_VAL                                                     ~6
         11        INIT_FCALL                                                   'array_merge'
         12        INIT_FCALL                                                   'range'
         13        SEND_VAL                                                     1
         14        SEND_VAL                                                     20
         15        DO_ICALL                                             $7      
         16        SEND_VAR                                                     $7
         17        INIT_FCALL                                                   'range'
         18        SEND_VAL                                                     30
         19        SEND_VAL                                                     100
         20        SEND_VAL                                                     10
         21        DO_ICALL                                             $8      
         22        SEND_VAR                                                     $8
         23        DO_ICALL                                             $9      
         24        SEND_VAR                                                     $9
   19    25        DO_ICALL                                             $10     
         26        FRAMELESS_ICALL_2                implode             ~11     '+', $10
   21    27      > RETURN                                                       ~11
   22    28*     > 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:{closure:/in/jXP5l:17}:19}
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.5.0


preferences:
173.4 ms | 1369 KiB | 18 Q