3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line = '"1212","$ 507.74","$ 0.00","$ 2,954.16","Kč 9,647.00","","TDR 697","","Kč 23,737.00","","","","","Kč 457.00","","","","","Kč 29,959.00","","","","","$ 104.00","","3232"'; $line = explode('","', $line); $line[0] = substr(trim($line[0], "\t\n\r"), 1); $line[count($line)-1] = substr(rtrim($line[count($line)-1], "\t\n\r"), 0, count($line)-1); echo substr(rtrim($line[count($line)-1], "\t\n\r"), 0, count($line)).PHP_EOL; echo substr(rtrim($line[count($line)-1], "\t\n\r"), 0, count($line)-1).PHP_EOL; echo substr(rtrim($line[count($line)-1], "\t\n\r"), 0, count($line)-2).PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQ6nP
function name:  (null)
number of ops:  83
compiled vars:  !0 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%221212%22%2C%22%24+507.74%22%2C%22%24+0.00%22%2C%22%24+2%2C954.16%22%2C%22K%C4%8D+9%2C647.00%22%2C%22%22%2C%22TDR+697%22%2C%22%22%2C%22K%C4%8D+23%2C737.00%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22K%C4%8D+457.00%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22K%C4%8D+29%2C959.00%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%24+104.00%22%2C%22%22%2C%223232%22'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%22%2C%22'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
    5     6        INIT_FCALL                                               'substr'
          7        INIT_FCALL                                               'trim'
          8        FETCH_DIM_R                                      ~5      !0, 0
          9        SEND_VAL                                                 ~5
         10        SEND_VAL                                                 '%09%0A%0D'
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $7      
         15        ASSIGN_DIM                                               !0, 0
         16        OP_DATA                                                  $7
    6    17        COUNT                                            ~8      !0
         18        SUB                                              ~9      ~8, 1
         19        INIT_FCALL                                               'substr'
         20        INIT_FCALL                                               'rtrim'
         21        COUNT                                            ~11     !0
         22        SUB                                              ~12     ~11, 1
         23        FETCH_DIM_R                                      ~13     !0, ~12
         24        SEND_VAL                                                 ~13
         25        SEND_VAL                                                 '%09%0A%0D'
         26        DO_ICALL                                         $14     
         27        SEND_VAR                                                 $14
         28        SEND_VAL                                                 0
         29        COUNT                                            ~15     !0
         30        SUB                                              ~16     ~15, 1
         31        SEND_VAL                                                 ~16
         32        DO_ICALL                                         $17     
         33        ASSIGN_DIM                                               !0, ~9
         34        OP_DATA                                                  $17
    8    35        INIT_FCALL                                               'substr'
         36        INIT_FCALL                                               'rtrim'
         37        COUNT                                            ~18     !0
         38        SUB                                              ~19     ~18, 1
         39        FETCH_DIM_R                                      ~20     !0, ~19
         40        SEND_VAL                                                 ~20
         41        SEND_VAL                                                 '%09%0A%0D'
         42        DO_ICALL                                         $21     
         43        SEND_VAR                                                 $21
         44        SEND_VAL                                                 0
         45        COUNT                                            ~22     !0
         46        SEND_VAL                                                 ~22
         47        DO_ICALL                                         $23     
         48        CONCAT                                           ~24     $23, '%0A'
         49        ECHO                                                     ~24
    9    50        INIT_FCALL                                               'substr'
         51        INIT_FCALL                                               'rtrim'
         52        COUNT                                            ~25     !0
         53        SUB                                              ~26     ~25, 1
         54        FETCH_DIM_R                                      ~27     !0, ~26
         55        SEND_VAL                                                 ~27
         56        SEND_VAL                                                 '%09%0A%0D'
         57        DO_ICALL                                         $28     
         58        SEND_VAR                                                 $28
         59        SEND_VAL                                                 0
         60        COUNT                                            ~29     !0
         61        SUB                                              ~30     ~29, 1
         62        SEND_VAL                                                 ~30
         63        DO_ICALL                                         $31     
         64        CONCAT                                           ~32     $31, '%0A'
         65        ECHO                                                     ~32
   10    66        INIT_FCALL                                               'substr'
         67        INIT_FCALL                                               'rtrim'
         68        COUNT                                            ~33     !0
         69        SUB                                              ~34     ~33, 1
         70        FETCH_DIM_R                                      ~35     !0, ~34
         71        SEND_VAL                                                 ~35
         72        SEND_VAL                                                 '%09%0A%0D'
         73        DO_ICALL                                         $36     
         74        SEND_VAR                                                 $36
         75        SEND_VAL                                                 0
         76        COUNT                                            ~37     !0
         77        SUB                                              ~38     ~37, 2
         78        SEND_VAL                                                 ~38
         79        DO_ICALL                                         $39     
         80        CONCAT                                           ~40     $39, '%0A'
         81        ECHO                                                     ~40
         82      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.08 ms | 1400 KiB | 21 Q