Pull to refresh
60.61

PHP *

Server-side scripting language designed for Web development, but also used as a general-purpose programming language

Show first
Period
Level of difficulty

Accelerating PHP connectors for Tarantool using Async, Swoole, and Parallel

Reading time 6 min
Views 2.2K


In the PHP ecosystem, there are currently two connectors for the Tarantool server: the official PECL extension tarantool/tarantool-php written in C, and tarantool-php/client written in PHP. I am the author of the latter one.

In this article I would like to share the results of performance testing of both these libraries and show how you can achieve 3x-5x performance improvement (on synthetic tests!) with minimal changes in code.
Read more →
Total votes 39: ↑39 and ↓0 +39
Comments 0

Things you need to know should you want to switch from PHP to Python

Reading time 13 min
Views 6.4K
Did you ever think that one day you had got into PHP web programming too quickly?
Several years have passed already, you have gained a lot of experience and can’t think of any other ways to work with web but PHP. Perhaps, you sometimes doubt the choice you have made, but are unable to confirm your doubts here and now. At the same time, you need real examples; you want to understand the changes that may occur in particular aspects of your work.

Today I will try to answer the following question: "What if we use Python instead of PHP?".

I have asked this question myself many times. I have been using PHP for 11 years already and am a certified PHP specialist. I have mastered it so it works just the way I want. I was really puzzled by several articles that criticized PHP severely (PHP: a fractal of bad design). However, when chance came, I switched to Ruby and then to Python. Eventually, I chose the latter. Now I will try to explain how we Python guys live out there.


Read more
Total votes 24: ↑22 and ↓2 +20
Comments 7

PHP microservices framework — Swoft 2.0.3 published

Reading time 4 min
Views 3.9K

image


What is Swoft?


Swoft is a PHP microservices coroutine framework based on the Swoole extension. Like Go, Swoft has a built-in coroutine web server and a common coroutine client and is resident in memory, independent of traditional PHP-FPM. There are similar Go language operations, similar to the Spring Cloud framework flexible annotations, powerful global dependency injection container, comprehensive service governance, flexible and powerful AOP, standard PSR specification implementation and so on.


Through three years of accumulation and direction exploration, Swoft has made Swoft the Spring Cloud in the PHP world, which is the best choice for PHP's high-performance framework and microservices management.


Elegant service governance


Swoft officially recommends that developers use service mesh patterns, such as the Istio/Envoy framework, to separate business and service governance, but Swoft also provides a set of microservices components for small and medium-sized businesses to quickly build microservices.

Read more →
Total votes 20: ↑18 and ↓2 +16
Comments 0

Configure the development environment for learning HTML, CSS, PHP in Windows

Reading time 8 min
Views 3.6K

Configure the development environment for learning HTML, CSS, PHP in Windows.


(article is published on linkedin.com (Alexander Panov) )


web - developer PHPStorm and Vagrant


Beginning programmers always ask the question, where to start learning about creating websites? Search on the Internet gives a lot of various information, but unfortunately only more confuses novice developers. Having more than 5 years of teaching experience, I have seen many times how students, making breaks in computer games and deciding to become web developers, tried to customize development environments. They began to sort out the programs for layout. They grabbed Sublime Text, Notepad ++, Visual Studio Code, NetBeans or PHPStorm. We tried to install on our local computer WAMP (stands for Windows, Apache, MySQL and PHP) platforms, such as Denver, Xampp, Open Server and many others. But since there is no systematic knowledge in the head of a novice developer, there is no experience of customization, it was rare for some of them to set up a convenient development environment, and whoever got it, understood that it became more difficult to play, since many additional programs, smoothness in the game.


This article was born because of explaining for many years to each student how to do everything correctly and conveniently.


Once again I want to say that we will set up a working environment in the Windows system to study the creation of sites in HTML, CSS and their links to PHP. We will call this computer working, so that beginning web developers get used to the idea that their computer is their source of income.


Begin

Читать дальше →
Total votes 19: ↑17 and ↓2 +15
Comments 0

IVR on Webhook

Reading time 4 min
Views 1.5K


An online chatbot is a recent trend on the market. But how to interact with the clients that are offline? A significant percentage of people prefer to interact over the phone. And the business needs either a large staff of operators or a voice communication automating solution. We are offering a solution to reduce workload and costs (and will barely affect your developers’ busyness).
Read more →
Total votes 14: ↑14 and ↓0 +14
Comments 0

Statistics and monitoring of PHP scripts in real time. ClickHouse and Grafana go to Pinba for help

Reading time 6 min
Views 5.4K
In this article I will explain how to use pinba with clickhouse and grafana instead of pinba_engine and pinboard.

On the php project pinba is probably the only reliable way to understand what is happening with performance. But usually people start to use pinba only when problems are already observed and it isn't clear where to look in.

Often developers have no idea how many RPS each script has. So they begin to optimize starting from places that seem to have problem.

Someone is analyzing the nginx logs, and someone is slow queries in the database.

Of course pinba would not be superfluous, but there are several reasons why it is not on every project.


Read more →
Total votes 16: ↑15 and ↓1 +14
Comments 0

Compiling fast .exe console applications with PHP 8.1, why not?

Reading time 4 min
Views 4.9K

With each release, PHP is getting faster, and when JIT (Just-In-Time) compilation is enabled, it reaches almost the same C marks.

Many people at one time probably had a desire to easily write console and window applications. The guys of Runet sometimes wrote irreplaceable applications for solving small tasks and shared them on forums, although some of them contained small bugs.

However, times are changing, and people have begun to realize their mistakes, switching, say, to OOP.

To be nostalgic and demonstrate the new Frankenstein, we will build a full-fledged console exe application in PHP.

Read more
Total votes 9: ↑8 and ↓1 +7
Comments 3

PHP microservice framework — Swoft

Reading time 3 min
Views 4.9K


Swoft is a PHP high performance microservice coroutine framework. It has been published for many years and has become the best choice for php. It can be like Go, built-in coroutine web server and common coroutine client and is resident in memory, independent of traditional PHP-FPM. There are similar Go language operations, similar to the Spring Cloud framework flexible annotations.


Github

Read more →
Total votes 11: ↑9 and ↓2 +7
Comments 5

How to use PHP to implement microservices?

Reading time 8 min
Views 13K

Swoft


Why should talk service governance?


With the increasing popularity of the Internet, the traditional MVC architecture has become more and more bloated and very difficult to maintain as the scale of applications continues to expand.


We need to take actions to split a large system into multiple applications according to business characteristics. For example, a large e-commerce system may include user system, product system, order system, evaluation system, etc., and we can separate them into multiple individual applications. The characteristics of multi-application architecture are applications run independently and they are unable to call each other.

Read more →
Total votes 11: ↑9 and ↓2 +7
Comments 0

Top 5 Software Development Practices to Follow in 2020

Reading time 6 min
Views 9.7K


Though it seems we are just a few months away from reaching 2020, these months are also important in the field of software development. Here in this article, we will see how the coming year 2020 will change the lives of software developers!

Future Software Development Is Here!


Traditional software development is about developing software by writing code and following some fixed rules. But the present-day software development witnessed a paradigm shift with advances in Artificial Intelligence, Machine Learning, and Deep Learning. With the integration of these three technologies, developers will be able to build software solutions that learn the instructions and add extra features and patterns in data that are needed for the desired outcome.

Also read: How Blockchain is helping the healthcare sector?

Let’s Try Out With Some Code


Over time, the neural network software development systems have become more complex in terms of integrations as well as layers of functionality and interfaces. Developers can build a very simple neural network with Python 3.6. Here’s an example of a program that does binary classification with 1 or 0.

Of course, we can start by creating a neural network class:


import numpy as np
X=np.array([[0,1,1,0],[0,1,1,1],[1,0,0,1]])
y=np.array([[0],[1],[1]])


Applying the Sigmoid function:

def sigmoid ():
   return 1/(1 + np.exp(-x))
def derivatives_sigmoid ():
   return x * (1-x)


Training the Model With Initial Weights and Biases:
epoch=10000
lr=0.1
inputlayer_neurons = X.shape[1]
hiddenlayer_neurons = 3
output_neurons = 1

wh=np.random.uniform(size=(inputlayer_neurons,hiddenlayer_neurons))
bh=np.random.uniform(size=(1,hiddenlayer_neurons))
wout=np.random.uniform(size=(hiddenlayer_neurons,output_neurons))
bout=np.random.uniform(size=(1,output_neurons))


For beginners, if you need help regarding neural networks, you can get in touch with top software development company.Or, you can hire AI/ML developers to work on your project.
Read more →
Total votes 8: ↑7 and ↓1 +6
Comments 0

PHP Microservice Framework Swoft: WebSocket Server Part 1

Reading time 2 min
Views 1.3K


This article we are going to learn is: How to install and run the swoft websocket server.


This article is one of a series of articles on the Swoft WebSocket Server. Let's learn about Swoft!

What is Swoft?


Swoft is a PHP high performance microservice coroutine framework. It has been published for many years and has become the best choice for php.


It can be like Go, built-in coroutine web server and common coroutine client and is resident in memory, independent of traditional PHP-FPM.


There are similar Go language operations, similar to the Spring Cloud framework flexible annotations.


Through three years of accumulation and direction exploration, Swoft has made Swoft the Spring Cloud in the PHP world, which is the best choice for PHP's high-performance framework and microservices management.


Github


Read more →
Total votes 14: ↑10 and ↓4 +6
Comments 0

PHP microservice framework — `Hello world` of Swoft

Reading time 3 min
Views 2.6K


Overview


What is Swoft?


Swoft is a PHP high performance microservice coroutine framework. It has been published for many years and has become the best choice for php. It can be like Go, built-in coroutine web server and common coroutine client and is resident in memory, independent of traditional PHP-FPM. There are similar Go language operations, similar to the Spring Cloud framework flexible annotations.


Through three years of accumulation and direction exploration, Swoft has made Swoft the Spring Cloud in the PHP world, which is the best choice for PHP's high-performance framework and microservices management.

Read more →
Total votes 12: ↑9 and ↓3 +6
Comments 0

Speed Dating with the CodeIgniter 4 on GitHub

Reading time 2 min
Views 2.8K

Getting acquainted with the CodeIgniter 4 PHP framework is quite simple.

Spend the evening following the instructions in the «Build Your First Application» section. Since the documentation is written in a good, technically understandable language, it is even possible to get some aesthetic pleasure in the process of familiarizing yourself with this and other sections.

The feeling of airiness and consistency of the CodeIgniter 4 project will be present with you everywhere now.

What is so attractive about CodeIgniter 4?

Read more
Total votes 7: ↑6 and ↓1 +5
Comments 2

Future of PHP: Bright or Dull?

Reading time 4 min
Views 3.6K
image

PHP is a popular scripting language founded in 1995 designed to perform several functions. Do you think the essence of PHP has faded away since the newer programming languages and frameworks have come into the market?

If you think so, then let me tell you that your perception is totally wrong! In fact, in the contemporary market of custom software development, it has become the most popular language in server-side programming.

image
Read more →
Total votes 4: ↑4 and ↓0 +4
Comments 0

Best distributed task scheduling framework — Openjob 1.0.7 released

Reading time 5 min
Views 1.1K

Openjob is a new  distributed task scheduling framework based on Akka architecture. Supports multiple cronjob, delay task, workflow, lightweight distributed computing, unlimited horizontal scaling, with high scalability and fault tolerance. Also has complete management, powerful alarm monitoring, and support multiple languages

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

Yii news 2020, issue 5

Reading time 4 min
Views 1.8K

Hello, community!


It is time for another Yii news issue. Both Yii 2 and Yii 3 are doing well.


I've finally updated the team page on the website to reflect the current state of things.


Konstantin Sirotkin is back and actively taking care of ElasticSearch Yii 2 extension.


Yii 3 main team was formed (actually happened late 2019). Likely you know the names because most were mentioned in previous Yii news issues.


Also, we have partially moved to GitHub actions. Experience is great so far, so we can definitely recommend that. We're adding phan static analysis
and running tests with Infection to make code quality even better.

Read more →
Total votes 3: ↑3 and ↓0 +3
Comments 0

Introducing PHP 7.4: Performance, Features, Deprecations

Reading time 7 min
Views 3.4K

PHP evolves continuously and they just released their latest PHP 7.4 update. Performance and speed keep advancing, as we have already been proved in the past PHP 7 releases. Preloading is one of the most thrilling new updates. It quickens script execution and makes code cleaner and faster due to the simplified common lines of code.


PHP is an important element in the world wide web and is used in over 79% of all websites. Well-known websites like Facebook, Wikipedia, WordPress and much more are using PHP.
We can see a double speed increase when looking at WordPress sites running PHP and comparing PHP 5 and 7. While using the latest PHP version out there — WordPress powered websites gain the most.

Read more →
Total votes 5: ↑4 and ↓1 +3
Comments 0

The End of PHP?

Reading time 2 min
Views 4.2K


A hot topic in recent years is that whether PHP is losing its leading positon or even going to its end. After all, many internet companies are making a trial on other languages. There are laguanges which draw our attention greatly. Golang is well known for the coroutine. Java is best for the perfect ecological system. And python is skilled in computing and artifical intelligence. But surely, PHP won't go to its grave. And we will analyse it in the below schedules.


  • The development of PHP
  • The various framework of PHP
  • The packagist of PHP
Read more →
Total votes 13: ↑8 and ↓5 +3
Comments 0
1

Authors' contribution