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 Sierpień, 2015

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann has a post to his site sharing a new screencast about developing PHP extensions by Joe Watkins, specifically about using a resizable-indexed array.

Following on from our first screencast, which touched upon how to setup a PHP extension development environment and creating a simple ‘array_sum’ like function. We now further this topic by implementing a resizable-indexed array class which supplies very similar functionality to that of the SplFixedArray class. Throughout this discussion we look into creating a custom Zend object class, using this to invoke an implemented data-structure located in another file, implementing internal interfaces, object handlers and the importance of PHP extension tests.

You can watch the video either through the in-page video player or directly on YouTube if you’d like a bit more control over the sizing. You can find the resulting code for the extension in this repository on Joe’s account.

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

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

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann has a post to his site sharing a new screencast about developing PHP extensions by Joe Watkins, specifically about using a resizable-indexed array.

Following on from our first screencast, which touched upon how to setup a PHP extension development environment and creating a simple ‘array_sum’ like function. We now further this topic by implementing a resizable-indexed array class which supplies very similar functionality to that of the SplFixedArray class. Throughout this discussion we look into creating a custom Zend object class, using this to invoke an implemented data-structure located in another file, implementing internal interfaces, object handlers and the importance of PHP extension tests.

You can watch the video either through the in-page video player or directly on YouTube if you’d like a bit more control over the sizing. You can find the resulting code for the extension in this repository on Joe’s account.

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

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

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann has a post to his site sharing a new screencast about developing PHP extensions by Joe Watkins, specifically about using a resizable-indexed array.

Following on from our first screencast, which touched upon how to setup a PHP extension development environment and creating a simple ‘array_sum’ like function. We now further this topic by implementing a resizable-indexed array class which supplies very similar functionality to that of the SplFixedArray class. Throughout this discussion we look into creating a custom Zend object class, using this to invoke an implemented data-structure located in another file, implementing internal interfaces, object handlers and the importance of PHP extension tests.

You can watch the video either through the in-page video player or directly on YouTube if you’d like a bit more control over the sizing. You can find the resulting code for the extension in this repository on Joe’s account.

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

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

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann: Developing a Resizable-Indexed Array as a PHP Extension with Joe Watkins

Edd Mann has a post to his site sharing a new screencast about developing PHP extensions by Joe Watkins, specifically about using a resizable-indexed array.

Following on from our first screencast, which touched upon how to setup a PHP extension development environment and creating a simple ‘array_sum’ like function. We now further this topic by implementing a resizable-indexed array class which supplies very similar functionality to that of the SplFixedArray class. Throughout this discussion we look into creating a custom Zend object class, using this to invoke an implemented data-structure located in another file, implementing internal interfaces, object handlers and the importance of PHP extension tests.

You can watch the video either through the in-page video player or directly on YouTube if you’d like a bit more control over the sizing. You can find the resulting code for the extension in this repository on Joe’s account.

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

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

Tideways.io: Dodge the thundering herd with file-based Opcache in PHP7

Tideways.io: Dodge the thundering herd with file-based Opcache in PHP7

The Tideways.io site has posted a tutorial showing you how to "avoid the thundering herd" of incoming requests to your application using a file-based PHP 7 opcode cache to reduce load and increase performance on your site.

In the last blog post about Fine-Tuning Opcache Configuration I mentioned the thundering herd problem that affects Opcache during cache restarts. When Opcache is restarted, either automatically or manually, all current users will attempt to regenerate the cache entries. Under load this can lead to a burst in CPU usage and significantly slower requests.

[...] In Rasmus talk at FrOsCon 2015 (Video at 12:30, Slides), he showed the persistent secondary file-based cache Opcache gets in PHP 7. It can read the generated opcodes from disk instead of having to recompile the code after cache restart. This happens only when the compiled opcaches are not found in shared memory.

They talk about the benefits that this caching can provide, not only to web-based applications but also to command line scripts. There’s a mention of possible security issues if an attacker is able to read/write to the cache files (but permissions can help that). The post ends with how to install it on your own PHP 7 instance, using the --enable-opcache-file flag on compilation.

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

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

Tideways.io: Dodge the thundering herd with file-based Opcache in PHP7

Tideways.io: Dodge the thundering herd with file-based Opcache in PHP7

The Tideways.io site has posted a tutorial showing you how to "avoid the thundering herd" of incoming requests to your application using a file-based PHP 7 opcode cache to reduce load and increase performance on your site.

In the last blog post about Fine-Tuning Opcache Configuration I mentioned the thundering herd problem that affects Opcache during cache restarts. When Opcache is restarted, either automatically or manually, all current users will attempt to regenerate the cache entries. Under load this can lead to a burst in CPU usage and significantly slower requests.

[...] In Rasmus talk at FrOsCon 2015 (Video at 12:30, Slides), he showed the persistent secondary file-based cache Opcache gets in PHP 7. It can read the generated opcodes from disk instead of having to recompile the code after cache restart. This happens only when the compiled opcaches are not found in shared memory.

They talk about the benefits that this caching can provide, not only to web-based applications but also to command line scripts. There’s a mention of possible security issues if an attacker is able to read/write to the cache files (but permissions can help that). The post ends with how to install it on your own PHP 7 instance, using the --enable-opcache-file flag on compilation.

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

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

Community News: Sunshine PHP 2016 Call for Papers Now Open

Community News: Sunshine PHP 2016 Call for Papers Now Open

The 2016 edition of the Sunshine PHP conference, happening in Miami, Florida between February 4th and 6th, has officially opened their Call for Papers for their upcoming event.

We’re pleased to announce our conference, SunshinePHP is one of the best PHP conferences where community members from around the world come together to learn and share information about the latest trends and technologies in professional PHP development.

The speaker package for their 2016 event includes an all-access pass to the conference itself, airfare/travel to the event, two hotel nights and lunch provided on regular conference days. They’re accepting submissions until midnight (EST) on September 30th and highly advise submitting more than one session idea. They also have a few suggested topics they’d like to see at this year’s event including:

  • Virtualization and environments
  • Development principles
  • User Experience/Usability
  • Continuous Integration
  • Debugging
  • Teamwork and/or Developer Management
  • Professional development

It may be a PHP-centric conference but they’re looking for a wide range of other topics to round it out too. If you have an idea for a session you’d like to present, be sure to submit as soon as possible!

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

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

Community News: Sunshine PHP 2016 Call for Papers Now Open

Community News: Sunshine PHP 2016 Call for Papers Now Open

The 2016 edition of the Sunshine PHP conference, happening in Miami, Florida between February 4th and 6th, has officially opened their Call for Papers for their upcoming event.

We’re pleased to announce our conference, SunshinePHP is one of the best PHP conferences where community members from around the world come together to learn and share information about the latest trends and technologies in professional PHP development.

The speaker package for their 2016 event includes an all-access pass to the conference itself, airfare/travel to the event, two hotel nights and lunch provided on regular conference days. They’re accepting submissions until midnight (EST) on September 30th and highly advise submitting more than one session idea. They also have a few suggested topics they’d like to see at this year’s event including:

  • Virtualization and environments
  • Development principles
  • User Experience/Usability
  • Continuous Integration
  • Debugging
  • Teamwork and/or Developer Management
  • Professional development

It may be a PHP-centric conference but they’re looking for a wide range of other topics to round it out too. If you have an idea for a session you’d like to present, be sure to submit as soon as possible!

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

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

SitePoint PHP Blog: Voice controlled PHP apps with API.ai

SitePoint PHP Blog: Voice controlled PHP apps with API.ai

The SitePoint PHP blog has posted a tutorial showing you how to help your applications understand natural language with the help of the Api.ai service.

In this tutorial we’ll be looking into Api.ai, an API that lets us build apps which understand natural language, much like Siri. It can accept either text or speech as input, which it then parses and returns a JSON string that can be interpreted by the code that we write.

They start by explaining some of the concepts you’ll need to know in using the service: agents, entities, intents, contexts, aliases and domains (each with a summary and examples). In their example, they show how to get the current time from any given places using their API. He shows you how to set up a free account and create a new agent. He then uses Guzzle (the HTTP client library) to make the request to the API with your API and subscription keys. They show the result of a query for "What’s the current time in Barcelona Spain?" and how to extract the "location" value from the results. With this they then search the Google API for the local time of "Barcelona Spain". With the time in hand, they then use the responsive-voice.js library to convert the text to speech at the click of a button.

With all these concepts under your belt, they also walk you through a second application, a currency converter. It uses the same workflow as the previous example with the exception of using the CurrencyLayer.com API to perform the financial conversion. All code needed for this example is included as well. If you’d like to just jump to the end, they’ve also shared the complete code for both examples over on Github.

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

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

SitePoint PHP Blog: Voice controlled PHP apps with API.ai

SitePoint PHP Blog: Voice controlled PHP apps with API.ai

The SitePoint PHP blog has posted a tutorial showing you how to help your applications understand natural language with the help of the Api.ai service.

In this tutorial we’ll be looking into Api.ai, an API that lets us build apps which understand natural language, much like Siri. It can accept either text or speech as input, which it then parses and returns a JSON string that can be interpreted by the code that we write.

They start by explaining some of the concepts you’ll need to know in using the service: agents, entities, intents, contexts, aliases and domains (each with a summary and examples). In their example, they show how to get the current time from any given places using their API. He shows you how to set up a free account and create a new agent. He then uses Guzzle (the HTTP client library) to make the request to the API with your API and subscription keys. They show the result of a query for "What’s the current time in Barcelona Spain?" and how to extract the "location" value from the results. With this they then search the Google API for the local time of "Barcelona Spain". With the time in hand, they then use the responsive-voice.js library to convert the text to speech at the click of a button.

With all these concepts under your belt, they also walk you through a second application, a currency converter. It uses the same workflow as the previous example with the exception of using the CurrencyLayer.com API to perform the financial conversion. All code needed for this example is included as well. If you’d like to just jump to the end, they’ve also shared the complete code for both examples over on Github.

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

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