3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = "/var/www/infolegale/delivery/toto.txt"; $path = explode($file, '.'); $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/FGMVi
function name:  (null)
number of ops:  16
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_VAR                                                 !0
          3        SEND_VAL                                                 '.'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        COUNT                                            ~6      !1
          7        SUB                                              ~7      ~6, 1
          8        ASSIGN_DIM                                               !1, ~7
          9        OP_DATA                                                  'csv'
    6    10        INIT_FCALL                                               'implode'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
    7    14        ECHO                                                     !2
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.15 ms | 1394 KiB | 17 Q