Tinkerwell 5: Welcome to the AI age
See what's new
Tinkerwell background image
Tinkerwell Logo Tinkerwell
Go back to Blog

Tinkerwell Shorts: Updating license information on our live platform

Using Tinkerwell to working on Tinkerwell is a common use case at Beyond Code. This time, a customer with multiple licenses requested if we can make it work that all their license keys expire at the same time so that it becomes easier for them to renew all their keys at once.

All their licenses are still active but vary with their renewal date – so we decided to update all their keys. For this, we wanted to sum up all days of all their Tinkerwell licenses where they qualify for updates.

After that, we divide that by the number of licenses so that we get the number of days from now that we need to add to each key.

Before we run the command, we checked if the date is correct and used Magic Comments for this information. Magic Comments display the value of a variable during the execution of the line of code. If a line get's executed multiple times, every output is appended at the end of the line as well.

Everything looked correct, so we run the update.

With this code written in a couple of minutes, we were able to make our customer happy and it was much easier than doing all the calculations by hand and changing the values in the database. We also stored this as a Code Snippet in Tinkerwell so that we can use the code if an additional custom has the same request again.

Tinkerwell - Trusted by the best.

"I don't know why anyone wouldn’t use Tinkerwell. I can't even remember how I used to test code on the go before it."

Mohamed Said, VP of Engineering at Foodics
Mohamed Said
VP of Engineering at Foodics

"A big fan of BeyondCode's work, Tinkerwell is a game changer for a freelancer like me, it saves me a lot of time. It was without any hesitation that I opted for the lifetime license."

Dominique Thomas, Laravel Developer / CEO of NCOO DEV
Dominique Thomas
Laravel Developer / CEO of NCOO DEV

Tinkerwell: The PHP Scratchpad

The must-have companion to your favorite IDE. Quickly iterate on PHP code within the context of your web application.

Buy now Learn more