3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = 12345678901234; echo 'key=', $key, "\n"; function encode($id) { $part1 = strlen((string)$id); return $part1; } echo encode(3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOr9Y
function name:  (null)
number of ops:  9
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 12345678901234
    3     1        ECHO                                                     'key%3D'
          2        ECHO                                                     !0
          3        ECHO                                                     '%0A'
   10     4        INIT_FCALL                                               'encode'
          5        SEND_VAL                                                 3
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
          8      > RETURN                                                   1

Function encode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOr9Y
function name:  encode
number of ops:  6
compiled vars:  !0 = $id, !1 = $part1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        CAST                                          6  ~2      !0
          2        STRLEN                                           ~3      ~2
          3        ASSIGN                                                   !1, ~3
    7     4      > RETURN                                                   !1
    8     5*     > RETURN                                                   null

End of function encode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.1 ms | 1397 KiB | 14 Q