Krzych Jończyk

Modern PHP, soft skills, productivity and time management.

Author: krzych (page 3 of 5)

PHPyths Buster: A great string performance test! (updated)

I was challenged in my last post to deeper check performance of strings. I think it will be quite interesting to test out some cases and say which way of using strings is the best.

In this post, I will check several string usages in PHP 5.6 and PHP 7.

To simplify testing I created a simple function which gets 2 arguments: an array of callable functions to compare (as many as you want) with names to display in summary, and a number of loops to test the function…
Continue reading

PHPyths Buster: Single quotes are faster than double quotes

As you may know, in PHP you can use single and double quotes for strings. These two lines are equal:

The only difference here is handling variables placed inside quotes. Let’s look at this simple example:

As you can see in double quotes variables are processed and in single quotes they aren’t.
But which one should I use?
Continue reading

PHPyths Buster: The power of simple CLI modes

If you know Python you know, that it has an interactive shell. The same as javascript, perhaps ruby and many many other languages. But did you know, that PHP has it also?

php -a

php -a command opens interactive shell in which you can write some simple samples of code and quickly validate some of your ideas. It works like Python shell and you can write in it simple statements, functions and so on.
Continue reading

PHPyths Buster: Annotations

I was working on a project in C# and ASP.NET MVC once. It was a long time ago. I can remember how happy I was. Earlier I was creating a project in PHP in the worst way: on an own framework. It was all old, shitty PHP. With big routing arrays, custom validation services, and ancient template engine, Smarty2.

When I started to create a project in ASP.NET I was astonished how many great features it has. One of them were annotations.
Continue reading

How to gain (at least!) one extra hour a day

Each day has 24 hours. Every one of us has 24 hours. There is nothing we can do about it.

Or is it? 🙂

I’m sure you have some “wasted” time every day. For me, that wasted time is going by bus to my work. It takes me about 45 to 50 minutes one way. Reading a book was not always possible, listening to music was not exactly developing.

For you, wasted time may mean cleaning up the apartment or working out. It’s any situation you do something automatically and your brain is bored 😉

What if you can use this time for something more, something developing? I do. I’m listening to podcasts.
Continue reading

Evernote and emoji

I have a little tip for you today.

Did you know, that you can use emoji in the note’s title?

zrzut-ekranu-2016-09-13-o-19-01-08

I’m using Evernote for managing every task and project I have. My friend shows me a great way to mark notes he plans to do today – the today tag. I mark every task for today with this tag.
Continue reading

Stress is your ally!

Stress is with us almost every day. Sometimes bigger, sometimes smaller. It could be even a good type of stress. Not long ago I had the best type of stress.

What is good in stress? you may ask…
Continue reading

PHPyths Buster: End of the project

Time to speed the things up!

The series becomes a little too long, so its time to the drastic movement.

The application is working now. Here I’ll describe how to add a new note and set reminder as done. I think, that this will be a good foundation for extending the application.
Continue reading

PHPyths Buster: Displaying reminders

Previously I’ve made a connection to Evernote and display list of all notes. Nice. But the project is about managing reminders, so let’s go to work!

Receiving reminders

First of all, I want to display only notes with reminders. It could be done using NoteFilter. It’s enough to add just one line:

$nFilter->words = "reminderTime:* -reminderDoneTime:*";
Continue reading

NBD: Writing in English

I’ve started blogging very recently. It was blog specially created for “Daj Się Poznać” contest. Because I wanted to do it with as little effort as possible I’ve decided to write it in Polish.

After the contest, I had the idea of creating the new blog, serious this time. I’ve asked newly met people on the slack channel if I should write the new blog in Polish or English. I was sure that I could create better content in my native language, but they convinced me to change my mind.
Continue reading

« Older posts Newer posts »

© 2019 Krzych Jończyk

Theme by Anders NorenUp ↑