3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = '1001 1100 0100 1101'; $encoded = implode(array_map(function($ch) { return $ch === ' ' ? ' ' : random_int(0, 1);}, str_split($str))); echo $encoded;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ILMNI
function name:  (null)
number of ops:  13
compiled vars:  !0 = $str, !1 = $encoded
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '1001+1100+0100+1101'
    5     1        INIT_FCALL                                                   'array_map'
          2        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          3        SEND_VAL                                                     ~3
          4        INIT_FCALL                                                   'str_split'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $4      
          7        SEND_VAR                                                     $4
          8        DO_ICALL                                             $5      
          9        FRAMELESS_ICALL_1                implode             ~6      $5
         10        ASSIGN                                                       !1, ~6
    7    11        ECHO                                                         !1
    8    12      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ILMNI
function name:  {closure:/in/ILMNI:5}
number of ops:  12
compiled vars:  !0 = $ch
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        IS_IDENTICAL                                                 !0, '+'
          2      > JMPZ                                                         ~1, ->5
          3    >   QM_ASSIGN                                            ~2      '+'
          4      > JMP                                                          ->10
          5    >   INIT_FCALL                                                   'random_int'
          6        SEND_VAL                                                     0
          7        SEND_VAL                                                     1
          8        DO_ICALL                                             $3      
          9        QM_ASSIGN                                            ~2      $3
         10    > > RETURN                                                       ~2
         11*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.28 ms | 773 KiB | 11 Q