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));
Output for git.master_jit, git.master
array ( 0 => '../images/box1/IMG_3158.JPG', 1 => '../images/box1/IMG_3161.JPG', 2 => '../images/box1/IMG_3163.JPG', 3 => '../images/box1/IMG_3158.JPG', 4 => '../images/box1/IMG_3161.JPG', 5 => '../images/box1/IMG_3163.JPG', ) --- array ( 0 => '../images/box1/IMG_3158.JPG', 1 => '../images/box1/IMG_3161.JPG', 2 => '../images/box1/IMG_3163.JPG', 3 => '../images/box1/IMG_3158.JPG', 4 => '../images/box1/IMG_3161.JPG', 5 => '../images/box1/IMG_3163.JPG', ) --- array ( 0 => '../images/box1/IMG_3158.JPG', 1 => '../images/box1/IMG_3161.JPG', 2 => '../images/box1/IMG_3163.JPG', 3 => '../images/box1/IMG_3158.JPG', 4 => '../images/box1/IMG_3161.JPG', 5 => '../images/box1/IMG_3163.JPG', ) --- array ( 0 => '../images/box1/IMG_3158.JPG', 1 => '../images/box1/IMG_3161.JPG', 2 => '../images/box1/IMG_3163.JPG', 3 => '../images/box1/IMG_3158.JPG', 4 => '../images/box1/IMG_3161.JPG', 5 => '../images/box1/IMG_3163.JPG', )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.44 ms | 407 KiB | 5 Q