3v4l.org

run code in 300+ PHP versions simultaneously
<?php $command = 1; $chksum = 2; $session_id = 3; $reply_id = 4; $command_string = 'test'; $buf = pack('SSSS', $command, $chksum, $session_id, $reply_id).$command_string; $buf = unpack('C'.(8+strlen($command_string)).'c', $buf); var_dump($buf);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0OpN3
function name:  (null)
number of ops:  27
compiled vars:  !0 = $command, !1 = $chksum, !2 = $session_id, !3 = $reply_id, !4 = $command_string, !5 = $buf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, 3
    5     3        ASSIGN                                                   !3, 4
    6     4        ASSIGN                                                   !4, 'test'
    8     5        INIT_FCALL                                               'pack'
          6        SEND_VAL                                                 'SSSS'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $11     
         12        CONCAT                                           ~12     $11, !4
         13        ASSIGN                                                   !5, ~12
   10    14        INIT_FCALL                                               'unpack'
         15        STRLEN                                           ~14     !4
         16        ADD                                              ~15     8, ~14
         17        CONCAT                                           ~16     'C', ~15
         18        CONCAT                                           ~17     ~16, 'c'
         19        SEND_VAL                                                 ~17
         20        SEND_VAR                                                 !5
         21        DO_ICALL                                         $18     
         22        ASSIGN                                                   !5, $18
   12    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !5
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.07 ms | 1395 KiB | 19 Q