A Week of Work

Doğan Uçar
4 min readSep 3, 2024

--

A Week of Work. Image generated by ChatGPT 4o
A Week of Work. Image generated by ChatGPT 4o

I was looking for the topics of this weeks blog but it seems like the PHP community is still in the summer hole. Sure, PHP 8.4 is still in the making and is awaited for November this year, but it is feature freezed and the already introduced features get a stable implementation now. So nothing much to report here. Time for something new like “A Week of Work”.

Since I did not find a good topic to report for this week, I asked myself, why not just posting about what I did the whole week in my own projects? While these insights are not PHP related in every bit and byte, it gives a view on how things work from my perspective.

In this context, I have to mention that I try to give more than 100% a week. This means in particular, that I have my daily work that needs to get done — and pays the bills. But on top of that, I try to generate an added value — hoping it pays out one day.

PHP Application Migration

I am currently freelancing for a very big company that creates digital products. While unfortunately I can not go too much into detail, I will try to give some interesting information about the project I spent my 8 hours a day.

The product relevant to me is a PHP based web application. This application is all what PHP tries not to be anymore: PHP + HTML, inline CSS and JavaScript, jQuery and a lot of cron jobs. The application is very old, no framework involved and tools were rarely used.

And guess what? I was chosen to migrate this application to a newer infrastructure and PHP 8. So what did I do?

  • introduced composer to the project
  • Removed and Required all public third party code by composer
  • Installed phpcs and phpcbf with PHPCompatibility in order to check incompatible code
  • Installed rector to make automated refactoring possible

Especially using phpcs/phpcbf, I encountered interesting things. For instance, I did not know that PHP had a constructor syntax like this in PHP 4:

<?php
class FooBar {
public function FooBar()
{
// do some constructing things
}
}

Well, it is not entirely true that I did not know this. But what was new to me is the fact that this works up until PHP 7. Furthermore, the syntax is completely legitimate with PHP 8. The FooBar class simply has a FooBar method – but no constructor. A disastrous consequence of upgrading to PHP 8 without refactoring would therefore mean that the application no longer behaves as it did before.

Another very annoying thing is: PHP short tags and optionally closing tags as the last line of the file. While the closing tags are not (but can) a problem at all, short tags are simply not considered as PHP code anymore. The code simply does not run. Thankfully, PHPStorm’s regex search helped me out with:

short open tag: <\? (?!php\b)
closing tag: \?>\s*\z

SEO, SEA, Marketing Strategies and Google Ads

Apart of my 8 hours day, I try to get independent of freelance work and generate in income based on products. In this context, I have two major products that I want to make profitable:

  1. Keestash, an Open Source Password Manager in the Cloud,
  2. My PHP Support Platform for PHP Developers

Keestash is a SaaS platform designed for companies and individuals who prioritize privacy and value open-source solutions. Haven’t tried it yet? Visit our website or contact us for a free trial today.

My Support Platform is a dedicated space where I share my expertise with fellow PHP developers. With over 10 years of industry experience, I’m confident in my ability to answer any PHP-related questions and offer valuable guidance on technology and best practices.

Now, I can hear you asking: what is the relation to SEO, SEA, Marketing and Google Ads? — A lot. While content marketing is one side of the coin, on the long run, I believe that it is beneficial to consider paid advertisement. However, I warn of „just“ launching a Google Ads campaign — it can be a black hole and cost more money than it brings back. There are some conditions or prior knowledge that you need in order to advertise successfully:

So first of all, you need to have a top web page. The page must load very fast, have no errors or blocking things like too big pictures, a clear and understandable content structure and a very clear Call-To-Action. There are different tools that can help you assisting with this — for instance PageSpeed Insights.

After that, you should check competitors and the current trends in your niche — what are they doing? what will make you stand out of the crowd? Define a (daily) budget and check keywords and long tail keywords relevant, create ad texts or multi media and verify whether ad extensions are relevant for you (in most case they are).

You should also think about how you will measure the success in order to get more insights and run retargeting campaigns.

Final Thoughts

There are other topics that didn’t make it into this blog. Unfortunately, it would go beyond the scope of this article. What do you think about this kind of blog posts, which is a bit different than the pure PHP blogs? Do you want to read more posts like this? If yes, please let me know by simply getting in touch — I would be very happy about that.

Please consider also signing up for my PHP support platform — As part of the community, I can respond much better to individual questions and situations and share my experience. Just register using your email address:

https://dogan-ucar.de/php-support-platform-subscription/

--

--

Doğan Uçar
Doğan Uçar

Written by Doğan Uçar

Software Engineer, PHP/Laminas (Zend), Backend, Cloud, Freelancer & CEO, Open Source Contributor

No responses yet