3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = 'polo-ralph-lauren-grey-v-neck-sweater_99912_3-300x300.d20140220-u175918.jpg'; if (strpos($key, '.d201402') !== FALSE){ $stringToReplace = $key; $removeTimestamp = strlen($stringToReplace); $removeTimestamp = floor($removeTimestamp - 21); $keytemp = substr_replace($stringToReplace, "jpg", $removeTimestamp); rename($key, $keytemp); echo 'Filename replaced '; echo $key; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: rename(): open_basedir restriction in effect. File(polo-ralph-lauren-grey-v-neck-sweater_99912_3-300x300.d20140220-u175918.jpg) is not within the allowed path(s): (/tmp:/in:/etc) in /in/q6bNP on line 8 Filename replaced polo-ralph-lauren-grey-v-neck-sweater_99912_3-300x300.d20140220-u175918.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:
31.54 ms | 401 KiB | 8 Q