3v4l.org

run code in 300+ PHP versions simultaneously
<?php $title = 'Rotterdam'; $id = ''; $id = array_reduce(str_split($title), function($id, $character) { return $id . (string) ord ($character); }, $id); echo $id;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dkVPv
function name:  (null)
number of ops:  14
compiled vars:  !0 = $title, !1 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Rotterdam'
    4     1        ASSIGN                                                   !1, ''
    5     2        INIT_FCALL                                               'array_reduce'
          3        INIT_FCALL                                               'str_split'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FdkVPv%3A5%240'
    7     8        SEND_VAL                                                 ~5
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
    5    11        ASSIGN                                                   !1, $6
    9    12        ECHO                                                     !1
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FdkVPv%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dkVPv
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $id, !1 = $character
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'ord'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $2      
          5        CAST                                          6  ~3      $2
          6        CONCAT                                           ~4      !0, ~3
          7      > RETURN                                                   ~4
    7     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FdkVPv%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.5 ms | 1395 KiB | 19 Q