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/N; echo $keytemp; } ?>
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/FY0BZ on line 8 Filename replaced Fatal error: Uncaught Error: Undefined constant "N" in /in/FY0BZ:11 Stack trace: #0 {main} thrown in /in/FY0BZ on line 11
Process exited with code 255.

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.17 ms | 401 KiB | 8 Q