3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filepaths = '../images/box1/IMG_3158.JPG../images/box1/IMG_3161.JPG../images/box1/IMG_3163.JPG../images/box1/IMG_3158.JPG../images/box1/IMG_3161.JPG../images/box1/IMG_3163.JPG'; var_export(preg_split('/\.JPG\K(?!$)/', $filepaths)); echo "\n---\n"; var_export(preg_split('/(?!^)(?=\.\.)/', $filepaths)); echo "\n---\n"; var_export(preg_split('/\.JPG\K/', $filepaths, 0, PREG_SPLIT_NO_EMPTY)); echo "\n---\n"; var_export(preg_split('/(?=\.\.)/', $filepaths, 0, PREG_SPLIT_NO_EMPTY)); echo "\n---\n"; var_export(preg_split('#\.\w{3}\K(?=\.\./)#', $filepaths));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PQPLS
function name:  (null)
number of ops:  45
compiled vars:  !0 = $filepaths
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '..%2Fimages%2Fbox1%2FIMG_3158.JPG..%2Fimages%2Fbox1%2FIMG_3161.JPG..%2Fimages%2Fbox1%2FIMG_3163.JPG..%2Fimages%2Fbox1%2FIMG_3158.JPG..%2Fimages%2Fbox1%2FIMG_3161.JPG..%2Fimages%2Fbox1%2FIMG_3163.JPG'
    5     1        INIT_FCALL                                               'var_export'
          2        INIT_FCALL                                               'preg_split'
          3        SEND_VAL                                                 '%2F%5C.JPG%5CK%28%3F%21%24%29%2F'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    7     8        ECHO                                                     '%0A---%0A'
    9     9        INIT_FCALL                                               'var_export'
         10        INIT_FCALL                                               'preg_split'
         11        SEND_VAL                                                 '%2F%28%3F%21%5E%29%28%3F%3D%5C.%5C.%29%2F'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                                 
   11    16        ECHO                                                     '%0A---%0A'
   13    17        INIT_FCALL                                               'var_export'
         18        INIT_FCALL                                               'preg_split'
         19        SEND_VAL                                                 '%2F%5C.JPG%5CK%2F'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 0
         22        SEND_VAL                                                 1
         23        DO_ICALL                                         $6      
         24        SEND_VAR                                                 $6
         25        DO_ICALL                                                 
   15    26        ECHO                                                     '%0A---%0A'
   17    27        INIT_FCALL                                               'var_export'
         28        INIT_FCALL                                               'preg_split'
         29        SEND_VAL                                                 '%2F%28%3F%3D%5C.%5C.%29%2F'
         30        SEND_VAR                                                 !0
         31        SEND_VAL                                                 0
         32        SEND_VAL                                                 1
         33        DO_ICALL                                         $8      
         34        SEND_VAR                                                 $8
         35        DO_ICALL                                                 
   19    36        ECHO                                                     '%0A---%0A'
   21    37        INIT_FCALL                                               'var_export'
         38        INIT_FCALL                                               'preg_split'
         39        SEND_VAL                                                 '%23%5C.%5Cw%7B3%7D%5CK%28%3F%3D%5C.%5C.%2F%29%23'
         40        SEND_VAR                                                 !0
         41        DO_ICALL                                         $10     
         42        SEND_VAR                                                 $10
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.31 ms | 1465 KiB | 15 Q