3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = "/var/www/infolegale/delivery/toto.txt"; $path = explode('.', $file); var_dump($path); $path[count($path) - 1] = "csv"; $finalPath = implode($path); echo $finalPath;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZLC8h
function name:  (null)
number of ops:  19
compiled vars:  !0 = $file, !1 = $path, !2 = $finalPath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fvar%2Fwww%2Finfolegale%2Fdelivery%2Ftoto.txt'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    6     9        COUNT                                            ~7      !1
         10        SUB                                              ~8      ~7, 1
         11        ASSIGN_DIM                                               !1, ~8
         12        OP_DATA                                                  'csv'
    7    13        INIT_FCALL                                               'implode'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !2, $10
    8    17        ECHO                                                     !2
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.48 ms | 1394 KiB | 19 Q