Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for the ‘WEB and PHP Development’ Category

Site News: Popular Posts for This Week (10.20.2017)

Site News: Popular Posts for This Week (10.20.2017)

Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/25668

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

TopTal.com: Introduction to Objects and References in PHP Memory

TopTal.com: Introduction to Objects and References in PHP Memory

In this new tutorial on the TopTal.com site author Agustin Villalba takes an in-depth look at how objects and references are handled in memory by the PHP language.

In this article, I will talk about how object and variable references are controlled in memory, since this is an issue that can generate discussion and differing opinions. One question to ponder is: “By default, are objects passed by reference or by copy in PHP?” I’m going to talk first about what references are not in PHP; secondly, I’ll discuss what they are, and finally, I will examine how the garbage collector works in PHP.

He starts with a quick comparison between objects and references (since they’re slightly different). He then covers what things are and aren’t references in PHP and some examples showing what they are in either case. Code examples and visuals are included showing how things relate. The post wraps up with a look at how garbage collection works with objects/references and a few closing thoughts about how the collector chooses which to clean up.

Source: http://www.phpdeveloper.org/news/25667

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

SitePoint PHP Blog: Symfony Flex: Paving the Path to a Faster, Better Symfony

SitePoint PHP Blog: Symfony Flex: Paving the Path to a Faster, Better Symfony

On the SitePoint PHP Blog, there’s a tutorial posted from editor Bruno Skvorc giving an introduction to Symfony Flex and how it is "paving the way" to a more performant future for Symfony.

Symfony Flex is a modern replacement for the Symfony Installer and not the name of the next Symfony version.

Internally, Symfony Flex is a Composer plugin that modifies the behavior of the require and update commands. When installing or updating dependencies in a Flex-enabled application, Symfony can perform tasks before and after the execution of Composer tasks.

The new Symfony will be called just Symfony 4, and while this tutorial will deal only with the Flex tool, it will mention some Symfony 4 upgrades as well.

The tutorial starts with some of the basics about Flex including its current development status and what kinds of things have changed from previous Symfony setups. It then walks you through the creation of a new Flex application including the bootstrapping of the application and the setup and use of application bundles.

Source: http://www.phpdeveloper.org/news/25666

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

TopTal.com: Introduction to Objects and References in PHP Memory

TopTal.com: Introduction to Objects and References in PHP Memory

In this new tutorial on the TopTal.com site author Agustin Villalba takes an in-depth look at how objects and references are handled in memory by the PHP language.

In this article, I will talk about how object and variable references are controlled in memory, since this is an issue that can generate discussion and differing opinions. One question to ponder is: “By default, are objects passed by reference or by copy in PHP?” I’m going to talk first about what references are not in PHP; secondly, I’ll discuss what they are, and finally, I will examine how the garbage collector works in PHP.

He starts with a quick comparison between objects and references (since they’re slightly different). He then covers what things are and aren’t references in PHP and some examples showing what they are in either case. Code examples and visuals are included showing how things relate. The post wraps up with a look at how garbage collection works with objects/references and a few closing thoughts about how the collector chooses which to clean up.

Source: http://www.phpdeveloper.org/news/25667

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Rob Allen: Displaying errors in Expressive with Twig

Rob Allen: Displaying errors in Expressive with Twig

Rob Allen has a quick post for the Twig and Zend Expressive users out there showing how to display errors if you’re not using the Whoops error handler.

If you’re not using the Whoops error handler with Expressive and are using the Twig renderer, then you are given no information about the problem that occurred, even in debug mode.

He includes the Twig template to output the error message and, if the application is in "debug" mode, show an optional block of extra information. This provides details about the exception thrown and some of the previous errors. The previous errors are looped about output to provide more context around the failure.

Source: http://www.phpdeveloper.org/news/25665

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

SitePoint PHP Blog: Symfony Flex: Paving the Path to a Faster, Better Symfony

SitePoint PHP Blog: Symfony Flex: Paving the Path to a Faster, Better Symfony

On the SitePoint PHP Blog, there’s a tutorial posted from editor Bruno Skvorc giving an introduction to Symfony Flex and how it is "paving the way" to a more performant future for Symfony.

Symfony Flex is a modern replacement for the Symfony Installer and not the name of the next Symfony version.

Internally, Symfony Flex is a Composer plugin that modifies the behavior of the require and update commands. When installing or updating dependencies in a Flex-enabled application, Symfony can perform tasks before and after the execution of Composer tasks.

The new Symfony will be called just Symfony 4, and while this tutorial will deal only with the Flex tool, it will mention some Symfony 4 upgrades as well.

The tutorial starts with some of the basics about Flex including its current development status and what kinds of things have changed from previous Symfony setups. It then walks you through the creation of a new Flex application including the bootstrapping of the application and the setup and use of application bundles.

Source: http://www.phpdeveloper.org/news/25666

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Rob Allen: Displaying errors in Expressive with Twig

Rob Allen: Displaying errors in Expressive with Twig

Rob Allen has a quick post for the Twig and Zend Expressive users out there showing how to display errors if you’re not using the Whoops error handler.

If you’re not using the Whoops error handler with Expressive and are using the Twig renderer, then you are given no information about the problem that occurred, even in debug mode.

He includes the Twig template to output the error message and, if the application is in "debug" mode, show an optional block of extra information. This provides details about the exception thrown and some of the previous errors. The previous errors are looped about output to provide more context around the failure.

Source: http://www.phpdeveloper.org/news/25665

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Jason McCreary: Writing Clean Code (Part 2)

Jason McCreary: Writing Clean Code (Part 2)

Jason McCreary has continued his series looking at writing "clean code", providing a few helpful hints you can integrate into your daily development work. In part two he goes a bit "deeper" and talks about grouping and encapsulation.

In Part 1 of Writing Clean Code I outlined three simple practices of formatting, naming, and avoiding nested code. All in an effort to improve code readability.

In Part 2, I want to go a little deeper and cover grouping. When I say grouping, I’m really talking about the Object Oriented Programming paradigm of encapsulation. Whether we group the code into a function or a class is often not important. What is important is did we improve the readability of the code.

He starts off by describing the goal of this grouping and lists three motivations for using it as a part of your application’s architecture:

  • Improving communication
  • Couple data
  • Organizing code

For each, he includes a brief summary of the topic and some code examples illustrating it in action where appropriate.

Source: http://www.phpdeveloper.org/news/25664

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Jason McCreary: Writing Clean Code (Part 2)

Jason McCreary: Writing Clean Code (Part 2)

Jason McCreary has continued his series looking at writing "clean code", providing a few helpful hints you can integrate into your daily development work. In part two he goes a bit "deeper" and talks about grouping and encapsulation.

In Part 1 of Writing Clean Code I outlined three simple practices of formatting, naming, and avoiding nested code. All in an effort to improve code readability.

In Part 2, I want to go a little deeper and cover grouping. When I say grouping, I’m really talking about the Object Oriented Programming paradigm of encapsulation. Whether we group the code into a function or a class is often not important. What is important is did we improve the readability of the code.

He starts off by describing the goal of this grouping and lists three motivations for using it as a part of your application’s architecture:

  • Improving communication
  • Couple data
  • Organizing code

For each, he includes a brief summary of the topic and some code examples illustrating it in action where appropriate.

Source: http://www.phpdeveloper.org/news/25664

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Blast from the Past – One Year Ago in PHP (10.19.2017)

Site News: Blast from the Past – One Year Ago in PHP (10.19.2017)

Here’s what was popular in the PHP community one year ago today:

Source: http://www.phpdeveloper.org/news/25663

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>