3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'chat @julio "salut à toi" hey "1 2 3"'; $str = '<?php ' . str_replace( '@', '*', $str ); $a=token_get_all($str); array_shift( $a ); $a = array_column( $a, 1 ); $a = array_map( 'trim', $a ); $a = array_filter( $a ); $a = array_values( $a ); //list( $subcommand, $user, $args ) = $input = array("red", "green", "blue", "yellow"); var_dump($a); var_dump( $input ); array_splice($input, 2); var_dump( $input ); var_dump( array_splice( $a, 2 ) ); var_dump($subcommand); var_dump($user); var_dump($args);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VcmZR
function name:  (null)
number of ops:  64
compiled vars:  !0 = $str, !1 = $a, !2 = $input, !3 = $subcommand, !4 = $user, !5 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'chat+%40julio+%22salut+%C3%A0+toi%22+hey+%221+2+3%22'
    3     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%40'
          3        SEND_VAL                                                 '%2A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        CONCAT                                           ~8      '%3C%3Fphp+', $7
          7        ASSIGN                                                   !0, ~8
    4     8        INIT_FCALL                                               'token_get_all'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !1, $10
    5    12        INIT_FCALL                                               'array_shift'
         13        SEND_REF                                                 !1
         14        DO_ICALL                                                 
    6    15        INIT_FCALL                                               'array_column'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 1
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !1, $13
    7    20        INIT_FCALL                                               'array_map'
         21        SEND_VAL                                                 'trim'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $15     
         24        ASSIGN                                                   !1, $15
    8    25        INIT_FCALL                                               'array_filter'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $17     
         28        ASSIGN                                                   !1, $17
    9    29        INIT_FCALL                                               'array_values'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $19     
         32        ASSIGN                                                   !1, $19
   12    33        ASSIGN                                                   !2, <array>
   13    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                                 
   14    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                                 
   15    40        INIT_FCALL                                               'array_splice'
         41        SEND_REF                                                 !2
         42        SEND_VAL                                                 2
         43        DO_ICALL                                                 
   16    44        INIT_FCALL                                               'var_dump'
         45        SEND_VAR                                                 !2
         46        DO_ICALL                                                 
   17    47        INIT_FCALL                                               'var_dump'
         48        INIT_FCALL                                               'array_splice'
         49        SEND_REF                                                 !1
         50        SEND_VAL                                                 2
         51        DO_ICALL                                         $26     
         52        SEND_VAR                                                 $26
         53        DO_ICALL                                                 
   18    54        INIT_FCALL                                               'var_dump'
         55        SEND_VAR                                                 !3
         56        DO_ICALL                                                 
   19    57        INIT_FCALL                                               'var_dump'
         58        SEND_VAR                                                 !4
         59        DO_ICALL                                                 
   20    60        INIT_FCALL                                               'var_dump'
         61        SEND_VAR                                                 !5
         62        DO_ICALL                                                 
         63      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.87 ms | 1400 KiB | 31 Q