3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encode_char($c) { $sum = ord($c); $first = rand(-100,100); $second = rand(-100,100); $third = $sum - ($first + $second); return [$first, $second, $third]; } print(encode_char('a')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QioFH
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'encode_char'
          1        SEND_VAL                                                 'a'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   15     4      > RETURN                                                   1

Function encode_char:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QioFH
function name:  encode_char
number of ops:  23
compiled vars:  !0 = $c, !1 = $sum, !2 = $first, !3 = $second, !4 = $third
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'ord'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        INIT_FCALL                                               'rand'
          6        SEND_VAL                                                 -100
          7        SEND_VAL                                                 100
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    7    10        INIT_FCALL                                               'rand'
         11        SEND_VAL                                                 -100
         12        SEND_VAL                                                 100
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !3, $9
    8    15        ADD                                              ~11     !2, !3
         16        SUB                                              ~12     !1, ~11
         17        ASSIGN                                                   !4, ~12
   10    18        INIT_ARRAY                                       ~14     !2
         19        ADD_ARRAY_ELEMENT                                ~14     !3
         20        ADD_ARRAY_ELEMENT                                ~14     !4
         21      > RETURN                                                   ~14
   11    22*     > RETURN                                                   null

End of function encode_char

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.13 ms | 1398 KiB | 18 Q