3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "天在变 我心 融化 谁能懂 恨 与谁共"; function asc2bin($temp) { $len = strlen($temp); for($i=0; $i<$len; $i++) { $data .= sprintf("%08b", ord(substr($temp, $i, 1))); } return $data; } echo asc2bin($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ao5bi
function name:  (null)
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%E5%A4%A9%E5%9C%A8%E5%8F%98%0A%E6%88%91%E5%BF%83%0A%E8%9E%8D%E5%8C%96%0A%E8%B0%81%E8%83%BD%E6%87%82%0A%E6%81%A8%0A%E4%B8%8E%E8%B0%81%E5%85%B1'
   17     1        INIT_FCALL                                               'asc2bin'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function asc2bin:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 5
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 5
Branch analysis from position: 21
Branch analysis from position: 5
filename:       /in/Ao5bi
function name:  asc2bin
number of ops:  23
compiled vars:  !0 = $temp, !1 = $len, !2 = $i, !3 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        STRLEN                                           ~4      !0
          2        ASSIGN                                                   !1, ~4
   11     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->19
   12     5    >   INIT_FCALL                                               'sprintf'
          6        SEND_VAL                                                 '%2508b'
          7        INIT_FCALL                                               'ord'
          8        INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !2
         11        SEND_VAL                                                 1
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                         $9      
         17        ASSIGN_OP                                     8          !3, $9
   11    18        PRE_INC                                                  !2
         19    >   IS_SMALLER                                               !2, !1
         20      > JMPNZ                                                    ~12, ->5
   14    21    > > RETURN                                                   !3
   15    22*     > RETURN                                                   null

End of function asc2bin

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.23 ms | 1399 KiB | 20 Q