3v4l.org

run code in 300+ PHP versions simultaneously
<?php $storagedir = '/vagrant/www/resource-space/include/../filestore'; $dir_file_path = '/vagrant/www/resource-space/include/../filestore/2/4/0_ed2583e62f4dc12/240_b69bd79a9431acc.jpeg'; $filename_rootpath = ltrim(str_replace($storagedir, '', $dir_file_path), '/'); $filename = substr($filename_rootpath, (strrpos($filename_rootpath, '/') + 1)); $extension = substr($filename, (strrpos($filename, '.') + 1)); $return['prefix'] = $res_data['file_extension']; $return['file_path'] = rtrim(str_replace($filename, '', $filename_rootpath), '/'); $return['file_name'] = str_replace($filename, '', ".{$extension}"); var_dump($return);
Output for git.master, git.master_jit
Warning: Undefined variable $res_data in /in/2SceX on line 10 Warning: Trying to access array offset on value of type null in /in/2SceX on line 10 array(3) { ["prefix"]=> NULL ["file_path"]=> string(21) "2/4/0_ed2583e62f4dc12" ["file_name"]=> string(5) ".jpeg" }
Output for rfc.property-hooks
Warning: Undefined variable $res_data in /in/2SceX on line 10 Warning: Trying to access array offset on null in /in/2SceX on line 10 array(3) { ["prefix"]=> NULL ["file_path"]=> string(21) "2/4/0_ed2583e62f4dc12" ["file_name"]=> string(5) ".jpeg" }

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:
41.62 ms | 401 KiB | 8 Q