3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rpc_str_serialize($val) { $len = strlen($val); if ($len < 255) { $rt = chr($len).$val; return $rt; } else { $rt =chr(255).rpc_int_serialize($len).$val; return $rt; } } echo(ord(rpc_str_serialize("momoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjukmomoqwertyuioasdfghjkl;zxcvbnm,.qwertgyhjuk")[0])); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KX3Xt
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'ord'
          1        INIT_FCALL                                               'rpc_str_serialize'
          2        SEND_VAL                                                 'momoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjukmomoqwertyuioasdfghjkl%3Bzxcvbnm%2C.qwertgyhjuk'
          3        DO_FCALL                                      0  $0      
          4        FETCH_DIM_R                                      ~1      $0, 0
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7        ECHO                                                     $2
   19     8      > RETURN                                                   1

Function rpc_str_serialize:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KX3Xt
function name:  rpc_str_serialize
number of ops:  20
compiled vars:  !0 = $val, !1 = $len, !2 = $rt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        STRLEN                                           ~3      !0
          2        ASSIGN                                                   !1, ~3
    5     3        IS_SMALLER                                               !1, 255
          4      > JMPZ                                                     ~5, ->12
    7     5    >   INIT_FCALL                                               'chr'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        CONCAT                                           ~7      $6, !0
          9        ASSIGN                                                   !2, ~7
    8    10      > RETURN                                                   !2
         11*       JMP                                                      ->19
   12    12    >   INIT_FCALL_BY_NAME                                       'rpc_int_serialize'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $9      
         15        CONCAT                                           ~10     '%FF', $9
         16        CONCAT                                           ~11     ~10, !0
         17        ASSIGN                                                   !2, ~11
   13    18      > RETURN                                                   !2
   15    19*     > RETURN                                                   null

End of function rpc_str_serialize

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.06 ms | 1390 KiB | 18 Q