This document summarizes a presentation given on why to choose Hack/HHVM over PHP7. Some key points made include:
1. Hack provides more powerful type hinting capabilities compared to PHP7, including support for nullable and mixed types.
2. Hack features original collections like Vector, Map, Set and Pair that allow specifying value types, unlike PHP arrays.
3. Hack has original language specifications like lambdas, generics, and enums not in PHP7.
4. Hack allows parallel execution out of the box for higher performance.
5. Hack's static analysis tool catches errors before runtime for more bug-free code.
6. HHVM continues to incorporate features from PHP
HHVM is a virtual machine developed by Facebook that executes PHP and Hack code faster than traditional PHP interpreters. It began as a just-in-time compiler for PHP (HipHop) and has evolved to include a bytecode interpreter and support for the Hack programming language. HHVM can be used as a drop-in replacement for PHP and supports many PHP extensions and features while offering performance improvements of up to 2x over PHP. It additionally provides static typing and type checking via the Hack language to improve code quality.
Hack is a programming language created by Facebook that evolved from PHP. It aims to make code more predictable and scalable by adding type safety while still allowing for rapid development. Hack introduces type annotations for parameters, returns, members, and more. It has multiple typing modes including partial and strict to allow for incremental adoption. Tools and documentation are provided to help developers migrate existing PHP codebases to the new Hack language.
Hack is a programming language designed for the HHVM runtime. HHVM compiles PHP and Hack code into an intermediate bytecode which is then JIT compiled to machine code, providing better performance than traditional PHP execution. Some key features of Hack include gradual typing, generics, and async functions. Hack brings together popular features from PHP, C#, and Java. Facebook uses HHVM and Hack to realize a 9x increase in request throughput and 5x reduction in memory usage compared to traditional PHP.
The document summarizes HHVM, a virtual machine for executing PHP code. Some key points:
- HHVM is a drop-in replacement for PHP that compiles PHP to bytecode and uses a just-in-time (JIT) compiler to optimize for performance.
- It supports most PHP syntax and features like Hack which adds type hints. It also has its own features like async functions, user attributes, and XHP for building components with XHTML syntax.
- HHVM is faster than PHP due to its JIT compiler which performs type inference and compiles hot code paths to native machine code. Benchmark tests show significant performance improvements over PHP for applications like Magento and Symfony.
PHP 8 introduces several new features and backward compatibility breaks. It includes a just-in-time compiler, match expression, constructor property promotion, union types, static return type, attributes, named arguments, and improved type handling. Notable BC breaks are stricter error handling by default, locale independence for float conversions, and warning promotion to type errors. The changes aim to improve performance, type safety, and consistency.
HHVM is a virtual machine developed by Facebook that executes PHP and Hack code faster than traditional PHP interpreters. It began as a just-in-time compiler for PHP (HipHop) and has evolved to include a bytecode interpreter and support for the Hack programming language. HHVM can be used as a drop-in replacement for PHP and supports many PHP extensions and features while offering performance improvements of up to 2x over PHP. It additionally provides static typing and type checking via the Hack language to improve code quality.
Hack is a programming language created by Facebook that evolved from PHP. It aims to make code more predictable and scalable by adding type safety while still allowing for rapid development. Hack introduces type annotations for parameters, returns, members, and more. It has multiple typing modes including partial and strict to allow for incremental adoption. Tools and documentation are provided to help developers migrate existing PHP codebases to the new Hack language.
Hack is a programming language designed for the HHVM runtime. HHVM compiles PHP and Hack code into an intermediate bytecode which is then JIT compiled to machine code, providing better performance than traditional PHP execution. Some key features of Hack include gradual typing, generics, and async functions. Hack brings together popular features from PHP, C#, and Java. Facebook uses HHVM and Hack to realize a 9x increase in request throughput and 5x reduction in memory usage compared to traditional PHP.
The document summarizes HHVM, a virtual machine for executing PHP code. Some key points:
- HHVM is a drop-in replacement for PHP that compiles PHP to bytecode and uses a just-in-time (JIT) compiler to optimize for performance.
- It supports most PHP syntax and features like Hack which adds type hints. It also has its own features like async functions, user attributes, and XHP for building components with XHTML syntax.
- HHVM is faster than PHP due to its JIT compiler which performs type inference and compiles hot code paths to native machine code. Benchmark tests show significant performance improvements over PHP for applications like Magento and Symfony.
PHP 8 introduces several new features and backward compatibility breaks. It includes a just-in-time compiler, match expression, constructor property promotion, union types, static return type, attributes, named arguments, and improved type handling. Notable BC breaks are stricter error handling by default, locale independence for float conversions, and warning promotion to type errors. The changes aim to improve performance, type safety, and consistency.
This document discusses the inner workings of PHP including its architecture, core components like the lexer, parser, compiler and virtual machine. It covers key concepts like opcodes, variables as unions of C data types, and memory management. Understanding PHP internals like its stack and heap implementation, copy-on-write variables, and reference counting is important for optimizing performance and avoiding memory leaks. Resources and objects also have important internal representations that developers should be aware of.
The speech is timed to the coming release of PHP7 and is intended to review the state of the language and to give a slap for those who still hesitate to make use of available features.
Static Analysis of PHP Code – IPC Berlin 2016Rouven Weßling
The document discusses static analysis of PHP code. It defines static analysis as analyzing software without executing it to find issues. It then summarizes several PHP static analysis tools like PHPMD, Phan, PHPCS, PHPLOC, and Deptrac. It explains how these tools work by parsing code and checking for bugs, inconsistencies and violations of defined rules. In the end, it recommends using static analysis tools as part of continuous integration to improve code quality.
PHP 7 is scheduled for release in November 2015 and will be a major new version that introduces many new features and changes. Some key points include: PHP 7 will provide improved performance through a new Zend Engine 3.0 and full support for 32-bit and 64-bit platforms. New features include scalar type declarations, return type declarations, new operators like the null coalesce operator and the spaceship operator, and anonymous classes. The release will also change some behaviors and remove deprecated features.
How do we go from your Java code to the CPU assembly that actually runs it? Using high level constructs has made us forget what happens behind the scenes, which is however key to write efficient code.
Starting from a few lines of Java, we explore the different layers that constribute to running your code: JRE, byte code, structure of the OpenJDK virtual machine, HotSpot, intrinsic methds, benchmarking.
An introductory presentation to these low-level concerns, based on the practical use case of optimizing 6 lines of code, so that hopefully you to want to explore further!
Presentation given at the Toulouse (FR) Java User Group.
Video (in french) at https://www.youtube.com/watch?v=rB0ElXf05nU
Slideshow with animations at https://docs.google.com/presentation/d/1eIcROfLpdTU2_Z_IKiMG-AwqZGZgbN1Bs2E0nGShpbk/pub?start=true&loop=false&delayms=60000
This document provides an overview of the Standard PHP Library (SPL) including common data structures like stacks, queues, heaps and iterators. It discusses how SPL extensions like SplSubject and SplObserver can be used to implement observer patterns. Various real-world open source projects using SPL are cited as examples. The document encourages involvement in improving and expanding SPL through code contributions and community engagement.
What is the Joomla Framework and why do we need it?Rouven Weßling
The new Joomla Framework was met with both skepticism and excitement in the community. What is the difference between the Platform and the Framework? Why is it a good idea? And how does this open us up to the wider PHP community? We'd like to give you some answers.
These are my slides from a mini Clojure tutorial presented at the "7 Languages in 7 Months" meetup group. The first part of the presentation faithfully presents material from Bruce Tate book, and the second part covers the more advanced topics of state management and macros
Every day, sysadmins find the need to build tools that get the job done in a fast and efficient way. Go is a new and powerful—yet simple—language that is an excellent fit for the needs of the harried sysadmin. This tutorial provides an introduction to Go with a focus on using it for everday tooling.
Topics include:
Understanding of the applicability of Go to everyday work
The Go environment and toolset
Go language fundamentals:
Control Structures
Functions
Data Types
Methods and Interfaces
Goroutines
Channels
Examples in Go:
Email
Web Server
Directory Tools
OSCON2014 : Quick Introduction to System Tools Programming with GoChris McEniry
This document provides an introduction to system tools programming with Go. It discusses Go's concurrency features and deployment advantages. It also covers Go fundamentals like packages, functions, types, and regular expressions. The tutorial uses examples to demonstrate Go concepts like output formatting, reading from stdin, loops, conditionals, and parsing text with regular expressions. It aims to help system administrators gain a basic understanding of Go and apply it to common system tasks.
PHPcon Poland - Static Analysis of PHP Code – How the Heck did I write so man...Rouven Weßling
Static analysis tools can analyze code without executing it to find bugs and issues. The document discusses several static analysis tools for PHP like PHPMD, Phan, PHPCS, PHPLOC, Deptrac. It explains what they do, like PHPLOC gathering complexity metrics and Deptrac checking for violations of defined layer dependencies. In the end, it recommends using static analysis in CI and not trusting results blindly without understanding the underlying errors.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
This document discusses common anti-patterns, pitfalls, and bad practices when using Puppet, including: using boolean facts ambiguously, expecting C-like values for parameters, excessively using "if defined()" checks, relying on large numbers of exec resources, and depending on dynamic scoping. The author recommends avoiding these practices in favor of more deterministic approaches like using Hiera for shared values and parameters, creating wrapper classes for shared dependencies, using single robust scripts instead of many exec resources, and avoiding dynamic scoping which can cause unpredictable behavior.
This document outlines a presentation about CSP (Communicating Sequential Processes) theory and implementation in Scala using the scala-gopher library. It begins with an introduction to CSP theory, history, and languages like Occam and Limbo that were influenced by it. It then demonstrates how scala-gopher implements key CSP concepts like channels, selectors, and processes in Scala. Examples are shown of writing Fibonacci sequences and broadcasting messages using these primitives. Potential issues with the current scala-gopher implementation are noted.
Productive Programming in Java 8 - with Lambdas and Streams Ganesh Samarthyam
The document provides an overview of lambda expressions and functional interfaces in Java 8. It discusses key concepts like lambda functions, built-in functional interfaces like Predicate and Consumer, and how they can be used with streams. Examples are provided to demonstrate using lambdas with built-in interfaces like Predicate to filter a stream and Consumer to forEach over a stream. The document aims to help readers get hands-on experience coding with lambdas and streams in Java 8.
On the Edge Systems Administration with GolangChris McEniry
This document describes a tutorial on systems administration topics using the Go programming language. It provides an overview of the schedule and topics to be covered, including Go language features like interfaces, files, web servers, TLS, HTTP/2, JSON, package management, one-liners, cross-compilation, metrics, containers, and SSH. It also lists some prerequisites and expectations around the example code provided, noting that errors will be panicked and the code is for demonstration purposes only and not meant for production use. The document is intended to serve as an agenda and introduction to the tutorial content.
This is the sixth set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This is the first set of slightly updated slides from a Perl programming course that I held some years ago for the QA team of a big international company.
I want to share it with everyone looking for intransitive Perl-knowledge.
The updates after 1st of June 2014 are made with the kind support of Chain Solutions (http://chainsolutions.net/)
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
The document discusses the Standard PHP Library (SPL) which provides common data structures and interfaces in PHP. It describes various iterator interfaces and classes that can be used to iterate over data in a consistent manner. These include interfaces like Iterator and classes like RecursiveIteratorIterator, FilterIterator, ArrayIterator, DirectoryIterator, and SplFileInfo. It also discusses other SPL components like exceptions, autoloading functions, and data structures.
This document discusses the inner workings of PHP including its architecture, core components like the lexer, parser, compiler and virtual machine. It covers key concepts like opcodes, variables as unions of C data types, and memory management. Understanding PHP internals like its stack and heap implementation, copy-on-write variables, and reference counting is important for optimizing performance and avoiding memory leaks. Resources and objects also have important internal representations that developers should be aware of.
The speech is timed to the coming release of PHP7 and is intended to review the state of the language and to give a slap for those who still hesitate to make use of available features.
Static Analysis of PHP Code – IPC Berlin 2016Rouven Weßling
The document discusses static analysis of PHP code. It defines static analysis as analyzing software without executing it to find issues. It then summarizes several PHP static analysis tools like PHPMD, Phan, PHPCS, PHPLOC, and Deptrac. It explains how these tools work by parsing code and checking for bugs, inconsistencies and violations of defined rules. In the end, it recommends using static analysis tools as part of continuous integration to improve code quality.
PHP 7 is scheduled for release in November 2015 and will be a major new version that introduces many new features and changes. Some key points include: PHP 7 will provide improved performance through a new Zend Engine 3.0 and full support for 32-bit and 64-bit platforms. New features include scalar type declarations, return type declarations, new operators like the null coalesce operator and the spaceship operator, and anonymous classes. The release will also change some behaviors and remove deprecated features.
How do we go from your Java code to the CPU assembly that actually runs it? Using high level constructs has made us forget what happens behind the scenes, which is however key to write efficient code.
Starting from a few lines of Java, we explore the different layers that constribute to running your code: JRE, byte code, structure of the OpenJDK virtual machine, HotSpot, intrinsic methds, benchmarking.
An introductory presentation to these low-level concerns, based on the practical use case of optimizing 6 lines of code, so that hopefully you to want to explore further!
Presentation given at the Toulouse (FR) Java User Group.
Video (in french) at https://www.youtube.com/watch?v=rB0ElXf05nU
Slideshow with animations at https://docs.google.com/presentation/d/1eIcROfLpdTU2_Z_IKiMG-AwqZGZgbN1Bs2E0nGShpbk/pub?start=true&loop=false&delayms=60000
This document provides an overview of the Standard PHP Library (SPL) including common data structures like stacks, queues, heaps and iterators. It discusses how SPL extensions like SplSubject and SplObserver can be used to implement observer patterns. Various real-world open source projects using SPL are cited as examples. The document encourages involvement in improving and expanding SPL through code contributions and community engagement.
What is the Joomla Framework and why do we need it?Rouven Weßling
The new Joomla Framework was met with both skepticism and excitement in the community. What is the difference between the Platform and the Framework? Why is it a good idea? And how does this open us up to the wider PHP community? We'd like to give you some answers.
These are my slides from a mini Clojure tutorial presented at the "7 Languages in 7 Months" meetup group. The first part of the presentation faithfully presents material from Bruce Tate book, and the second part covers the more advanced topics of state management and macros
Every day, sysadmins find the need to build tools that get the job done in a fast and efficient way. Go is a new and powerful—yet simple—language that is an excellent fit for the needs of the harried sysadmin. This tutorial provides an introduction to Go with a focus on using it for everday tooling.
Topics include:
Understanding of the applicability of Go to everyday work
The Go environment and toolset
Go language fundamentals:
Control Structures
Functions
Data Types
Methods and Interfaces
Goroutines
Channels
Examples in Go:
Email
Web Server
Directory Tools
OSCON2014 : Quick Introduction to System Tools Programming with GoChris McEniry
This document provides an introduction to system tools programming with Go. It discusses Go's concurrency features and deployment advantages. It also covers Go fundamentals like packages, functions, types, and regular expressions. The tutorial uses examples to demonstrate Go concepts like output formatting, reading from stdin, loops, conditionals, and parsing text with regular expressions. It aims to help system administrators gain a basic understanding of Go and apply it to common system tasks.
PHPcon Poland - Static Analysis of PHP Code – How the Heck did I write so man...Rouven Weßling
Static analysis tools can analyze code without executing it to find bugs and issues. The document discusses several static analysis tools for PHP like PHPMD, Phan, PHPCS, PHPLOC, Deptrac. It explains what they do, like PHPLOC gathering complexity metrics and Deptrac checking for violations of defined layer dependencies. In the end, it recommends using static analysis in CI and not trusting results blindly without understanding the underlying errors.
From ReactPHP to Facebook Hack's Async implementation and many more, asynchronous programming has been a 'hot' topic lately. But how well does async programming support work in PHP and what can you actually use it for in your projects ? Let's look at some real-world use cases and how they leverage the power of async to do things you didn't know PHP could do.
This document discusses common anti-patterns, pitfalls, and bad practices when using Puppet, including: using boolean facts ambiguously, expecting C-like values for parameters, excessively using "if defined()" checks, relying on large numbers of exec resources, and depending on dynamic scoping. The author recommends avoiding these practices in favor of more deterministic approaches like using Hiera for shared values and parameters, creating wrapper classes for shared dependencies, using single robust scripts instead of many exec resources, and avoiding dynamic scoping which can cause unpredictable behavior.
This document outlines a presentation about CSP (Communicating Sequential Processes) theory and implementation in Scala using the scala-gopher library. It begins with an introduction to CSP theory, history, and languages like Occam and Limbo that were influenced by it. It then demonstrates how scala-gopher implements key CSP concepts like channels, selectors, and processes in Scala. Examples are shown of writing Fibonacci sequences and broadcasting messages using these primitives. Potential issues with the current scala-gopher implementation are noted.
Productive Programming in Java 8 - with Lambdas and Streams Ganesh Samarthyam
The document provides an overview of lambda expressions and functional interfaces in Java 8. It discusses key concepts like lambda functions, built-in functional interfaces like Predicate and Consumer, and how they can be used with streams. Examples are provided to demonstrate using lambdas with built-in interfaces like Predicate to filter a stream and Consumer to forEach over a stream. The document aims to help readers get hands-on experience coding with lambdas and streams in Java 8.
On the Edge Systems Administration with GolangChris McEniry
This document describes a tutorial on systems administration topics using the Go programming language. It provides an overview of the schedule and topics to be covered, including Go language features like interfaces, files, web servers, TLS, HTTP/2, JSON, package management, one-liners, cross-compilation, metrics, containers, and SSH. It also lists some prerequisites and expectations around the example code provided, noting that errors will be panicked and the code is for demonstration purposes only and not meant for production use. The document is intended to serve as an agenda and introduction to the tutorial content.
This is the sixth set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This is the first set of slightly updated slides from a Perl programming course that I held some years ago for the QA team of a big international company.
I want to share it with everyone looking for intransitive Perl-knowledge.
The updates after 1st of June 2014 are made with the kind support of Chain Solutions (http://chainsolutions.net/)
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
The document discusses the Standard PHP Library (SPL) which provides common data structures and interfaces in PHP. It describes various iterator interfaces and classes that can be used to iterate over data in a consistent manner. These include interfaces like Iterator and classes like RecursiveIteratorIterator, FilterIterator, ArrayIterator, DirectoryIterator, and SplFileInfo. It also discusses other SPL components like exceptions, autoloading functions, and data structures.
PHP 7 is a major new version of the PHP scripting language released in 2015. Some of the new features in PHP 7 include the null coalesce operator (??), spaceship operator (<=>), type declarations, anonymous classes, and group use declarations. PHP 7 also deprecated some old features and changed the behavior of some language constructs for better performance and compatibility.
This document provides an overview of key concepts in Domain-Driven Design (DDD) including the ubiquitous language, bounded contexts, value objects, entities, repositories, collections, mappers, identity maps, units of work, and services. It explains that DDD is a set of principles and patterns that help developers create elegant systems by focusing on the core domain and language of the business. It also emphasizes separating business processes into bounded contexts and using ubiquitous language consistently throughout the code.
This document provides an overview of server-side scripting using PHP. It includes 15 questions covering PHP topics like variables, data types, arrays, functions, and form handling. The questions are worth a total of 15 marks and include multiple choice, fill in the blank, true/false, and code writing questions. The document then provides details on PHP including an introduction, how it is well-suited for web development, examples of first PHP code, and explanations of variables, data types, arrays, control structures, functions and comments.
PHP / MySQL applications are compatible to all operating systems, support all the popular databases, 100% remotely configurable, perfect for web programming & provide higher performance and speed.
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).
PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).
PHP third party tool and plug-in integration such as chat, forum, blog and search engine
The document discusses PHP and argues that it gets some important things right despite its flaws. It acknowledges criticisms of PHP's unexpected behaviors and inconsistencies but defends PHP's approach to programmer workflow, state, and concurrency. It then introduces Hack, a gradual typing system for PHP that aims to address PHP's issues while preserving its strengths. Hack adds type inference and checking to PHP in a way that maintains PHP's productive development cycle. The author argues that with tools like Hack and the HipHop VM, PHP has evolved into a viable option even for projects that might otherwise use other dynamic languages.
Custom, in depth 5 day PHP course I put together in 2014. I'm available to deliver this training in person at your offices - contact me at rich@quicloud.com for rate quotes.
The document discusses the Hack programming language, which was developed by Facebook as an extension of PHP with additional features like strong typing. It provides an overview of key Hack concepts like type annotations, nullable types, generics, collections, and constructor argument promotion. The document also outlines different Hack modes for compatibility with PHP and converting existing PHP code to Hack.
This document discusses principles of sequence control in programming languages. It covers expressions, assignment statements, selection statements like if/else and switch/case, and iterative statements like for, while, and loops controlled by data structures. It provides examples of how these concepts are implemented in different languages like C, Pascal, and C#. Unconditional branching with goto is also discussed, noting that while powerful it can hurt readability so most modern languages avoid or restrict it.
The document discusses code metrics that can be used to evaluate code quality in PHP projects. It introduces various metrics like lines of code, test coverage, cyclomatic complexity, coupling metrics, lack of cohesion in methods, Halstead complexity measures, and maintainability index. It recommends always using tools like PHP Code Sniffer and PHPUnit for testing and recommends adopting tools like PHPSpec, Behat, PHP Copy/Paste Detector and PHPMetrics. It also suggests giving tools like Humbug for mutant testing a try and considering SaaS options with customization efforts.
This document provides an introduction and overview of PHP. It states that PHP is a server-side scripting language commonly used for web development. It can be embedded into HTML and is free, efficient and compatible with many platforms and servers. The document then covers basic PHP syntax, variables, data types, operators, conditional statements and loops. It provides examples to illustrate key PHP concepts and functions.
This document discusses subprograms (also called subroutines) in programming languages. It covers:
- The basic definitions and characteristics of subprograms, including headers, parameters, and local variables.
- Different parameter passing methods like pass-by-value, pass-by-reference, and their implementation in common languages.
- Additional features of subprograms including overloading, generics, and functions passing subprograms as parameters.
The document provides an introduction to PHP, explaining that it is a server-side scripting language used to generate HTML web pages. It discusses the differences between client-side and server-side scripting, with PHP being an example of server-side scripting. The summary also explains how to create basic PHP pages and covers some basic PHP syntax including variables, data types, operators, and control structures like if/else statements.
The document discusses tools to improve a LAMP web development stack. It recommends source control, development platforms, task tracking, automated testing, static analysis, automated deployment, and continuous integration. These tools enable collaboration, testing, deployment automation, and integration of code changes. Specific open source tools are recommended for each category like Git, PHPUnit, PHP Code Sniffer, and Jenkins. The document argues these tools improve workflow, quality, and speed of development.
This document discusses code analysis and techniques for predicting runtime errors in source code. It describes existing solutions like detecting uninitialized variables, overflows, divide by zeros, incorrect argument data types. It also discusses detecting out-of-bounds array and pointer references, memory allocation/deallocation errors, and memory leaks. The document outlines the design of a code analyzer that takes C code as input, performs lexical and syntax analysis to generate intermediate code, and then uses the intermediate code to predict possible runtime errors. Further work mentioned includes evaluating the intermediate code to perform data and control flow analysis for error prediction.
This document provides an introduction to the Hack programming language. It discusses how Hack originated from HHVM and PHP and was open sourced by Facebook in 2015. Key differences between Hack and PHP are described, such as Hack being stricter and type oriented. The document outlines type checking in Hack and various data types supported. It also covers collections, attributes and other new features of Hack. Potential pitfalls of Hack are mentioned along with tips for getting started, installation, learning resources, and frameworks.
This document provides an introduction to PHP and web development using PHP. It covers:
- An overview of PHP and its history and alternatives
- PHP syntax including variables, operators, conditional statements, arrays, loops, and functions
- How PHP scripts are executed on the server and integrated with HTML
- Using PHP to work with forms and retrieve data submitted via GET and POST methods
This document provides an introduction to PHP, including an overview of server-side scripting, the basic PHP syntax, variables, operators, control structures like conditional statements and loops, and how PHP code is processed. It explains what PHP is, how it is widely used for building dynamic websites, and the basic components needed to develop PHP applications including a web server, PHP, and a database.
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Muhamad Al Imran
This document provides an introduction to PHP, including an overview of server-side scripting, how PHP code is processed, basic PHP syntax, variables, operators, control structures like conditional statements and loops, and other key PHP concepts. It explains what PHP is, how it is used to create dynamic web content, and some of the basic building blocks needed to get started with PHP programming.
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Muhamad Al Imran
This document provides an introduction to PHP, including an overview of server-side scripting, how PHP code is processed, basic PHP syntax, variables, operators, control structures like conditional statements and loops, and other key PHP concepts. It explains what PHP is, how it is used to create dynamic web content, and some of the basic building blocks needed to get started with PHP programming.
"What To Expect From PHP7" by Lorna Mitchell
We have a new major release of PHP! But what does this mean for PHP developers in the Real World (TM)? This talk has everything you need to know to be the expert. Find out how the remarkable performance improvements could look on your own system, and see the shiny new features in this major release of the web's favourite scripting language. Get advice on how to upgrade your application, making use of the new features and avoiding the backwards compatibility traps. Developers and technical leaders everywhere who want to use better PHP will benefit from this session.
Slides for a presentation on advanced PHP (object-orientation, frameworks, security and debugging) given for the CS25010 web development module at Aberystwyth University.
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
Essentials of Automations: Exploring Attributes & Automation ParametersSafe Software
Building automations in FME Flow can save time, money, and help businesses scale by eliminating data silos and providing data to stakeholders in real-time. One essential component to orchestrating complex automations is the use of attributes & automation parameters (both formerly known as “keys”). In fact, it’s unlikely you’ll ever build an Automation without using these components, but what exactly are they?
Attributes & automation parameters enable the automation author to pass data values from one automation component to the next. During this webinar, our FME Flow Specialists will cover leveraging the three types of these output attributes & parameters in FME Flow: Event, Custom, and Automation. As a bonus, they’ll also be making use of the Split-Merge Block functionality.
You’ll leave this webinar with a better understanding of how to maximize the potential of automations by making use of attributes & automation parameters, with the ultimate goal of setting your enterprise integration workflows up on autopilot.
AppSec PNW: Android and iOS Application Security with MobSFAjin Abraham
Mobile Security Framework - MobSF is a free and open source automated mobile application security testing environment designed to help security engineers, researchers, developers, and penetration testers to identify security vulnerabilities, malicious behaviours and privacy concerns in mobile applications using static and dynamic analysis. It supports all the popular mobile application binaries and source code formats built for Android and iOS devices. In addition to automated security assessment, it also offers an interactive testing environment to build and execute scenario based test/fuzz cases against the application.
This talk covers:
Using MobSF for static analysis of mobile applications.
Interactive dynamic security assessment of Android and iOS applications.
Solving Mobile app CTF challenges.
Reverse engineering and runtime analysis of Mobile malware.
How to shift left and integrate MobSF/mobsfscan SAST and DAST in your build pipeline.
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving
What began over 115 years ago as a supplier of precision gauges to the automotive industry has evolved into being an industry leader in the manufacture of product branding, automotive cockpit trim and decorative appliance trim. Value-added services include in-house Design, Engineering, Program Management, Test Lab and Tool Shops.
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor IvaniukFwdays
At this talk we will discuss DDoS protection tools and best practices, discuss network architectures and what AWS has to offer. Also, we will look into one of the largest DDoS attacks on Ukrainian infrastructure that happened in February 2022. We'll see, what techniques helped to keep the web resources available for Ukrainians and how AWS improved DDoS protection for all customers based on Ukraine experience
This talk will cover ScyllaDB Architecture from the cluster-level view and zoom in on data distribution and internal node architecture. In the process, we will learn the secret sauce used to get ScyllaDB's high availability and superior performance. We will also touch on the upcoming changes to ScyllaDB architecture, moving to strongly consistent metadata and tablets.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the “Temporal Event Neural Networks: A More Efficient Alternative to the Transformer” tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChip’s Akida neuromorphic hardware IP further enhances TENNs’ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
High performance Serverless Java on AWS- GoTo Amsterdam 2024Vadym Kazulkin
Java is for many years one of the most popular programming languages, but it used to have hard times in the Serverless community. Java is known for its high cold start times and high memory footprint, comparing to other programming languages like Node.js and Python. In this talk I'll look at the general best practices and techniques we can use to decrease memory consumption, cold start times for Java Serverless development on AWS including GraalVM (Native Image) and AWS own offering SnapStart based on Firecracker microVM snapshot and restore and CRaC (Coordinated Restore at Checkpoint) runtime hooks. I'll also provide a lot of benchmarking on Lambda functions trying out various deployment package sizes, Lambda memory settings, Java compilation options and HTTP (a)synchronous clients and measure their impact on cold and warm start times.
Must Know Postgres Extension for DBA and Developer during MigrationMydbops
Mydbops Opensource Database Meetup 16
Topic: Must-Know PostgreSQL Extensions for Developers and DBAs During Migration
Speaker: Deepak Mahto, Founder of DataCloudGaze Consulting
Date & Time: 8th June | 10 AM - 1 PM IST
Venue: Bangalore International Centre, Bangalore
Abstract: Discover how PostgreSQL extensions can be your secret weapon! This talk explores how key extensions enhance database capabilities and streamline the migration process for users moving from other relational databases like Oracle.
Key Takeaways:
* Learn about crucial extensions like oracle_fdw, pgtt, and pg_audit that ease migration complexities.
* Gain valuable strategies for implementing these extensions in PostgreSQL to achieve license freedom.
* Discover how these key extensions can empower both developers and DBAs during the migration process.
* Don't miss this chance to gain practical knowledge from an industry expert and stay updated on the latest open-source database trends.
Mydbops Managed Services specializes in taking the pain out of database management while optimizing performance. Since 2015, we have been providing top-notch support and assistance for the top three open-source databases: MySQL, MongoDB, and PostgreSQL.
Our team offers a wide range of services, including assistance, support, consulting, 24/7 operations, and expertise in all relevant technologies. We help organizations improve their database's performance, scalability, efficiency, and availability.
Contact us: info@mydbops.com
Visit: https://www.mydbops.com/
Follow us on LinkedIn: https://in.linkedin.com/company/mydbops
For more details and updates, please follow up the below links.
Meetup Page : https://www.meetup.com/mydbops-databa...
Twitter: https://twitter.com/mydbopsofficial
Blogs: https://www.mydbops.com/blog/
Facebook(Meta): https://www.facebook.com/mydbops/
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillLizaNolte
HERE IS YOUR WEBINAR CONTENT! 'Mastering Customer Journey Management with Dr. Graham Hill'. We hope you find the webinar recording both insightful and enjoyable.
In this webinar, we explored essential aspects of Customer Journey Management and personalization. Here’s a summary of the key insights and topics discussed:
Key Takeaways:
Understanding the Customer Journey: Dr. Hill emphasized the importance of mapping and understanding the complete customer journey to identify touchpoints and opportunities for improvement.
Personalization Strategies: We discussed how to leverage data and insights to create personalized experiences that resonate with customers.
Technology Integration: Insights were shared on how inQuba’s advanced technology can streamline customer interactions and drive operational efficiency.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
2. 2
• Born in Shimonoseki, Yamaguchi Prefecture
• Software Engineer at Intelligence, Ltd
• I love cars and programming
• Be my friend on Facebook!
https://www.facebook.com/yuji.otani.16
About me:
10. 10
• a programming language developed by Facebook
• compatible with PHP
• runs on HHVM (virtual machine)
• based on PHP5.6
What is Hack?
11. • bug-free and fast coding
• enjoyable coding experience
• fast runtime
• fit for large scale systems
The goals of Hack:
http://growthhackjapan.com/2014-03-23-facebook-hack-released-to-the-public/
12. 12
• we wanted to challenge something new while
leveraging the experience with PHP
• we wanted to deliver a performant service
• we wanted to keep the ease of readability and
maintainability even when the system grew bigger
• PHP7 was not available yet
Why we chose Hack:
16. 16
• Null coalesce operator
• EngineException (catchable fatal errors)
• anonymous classes
• scalar type hinting
• return type declaration
New language specifications
17. 17
• optimized for 64-bit CPUs
• efficient use of CPU cache
• in-memory arrays became sequences (in PHP5 they were all
associative arrays)
• the memory usage by arrays has improved dramatically.
* PHP5 (72bytes) → PHP7 (32bytes)
New data structure
18. 18
PHP7 incorporated many features
from Hack/HHVM
• scalar type hinting
• return value declaration
• great performance
• lower consumption of memory for arrays
• AST (abstract syntax tree) compiling
19. 19
Currently PHP faces a big turning point.
That's precisely the reason why I want you to
know the qualities of Hack/HHVM.
21. 21
What is type hinting?
You can specify the type of arguments and return values of
functions.
Class Sample {
public static function sampleFunc(int $a): string{
return "OK";
}
}
//OK
Sample::sampleFunc (1);
//Fatal Error
Sample::sampleFunc ("a");
22. 22
Type hinting in PHP
Types that could be used in type hinting were gradually added.
PHP5.0 :Class
PHP5.1 :array
PHP5.4 :Closure and function
PHP7 :Scalar Type (int, float, string, bool)
24. 24
PHP7 type hinting
There are 2 modes:
• Weakly typed = automatic type casting
• Strongly typed = strict type checking
<?php
Class Sample {
public static function sampleFunc(int $a): string{
return "OK";
}
}
// OK in both modes
Sample::sampleFunc(1);
// OK only in weakly typed mode
Sample::sampleFunc("1");
25. 25
PHP7 type hinting
• The default mode is “weakly typed”
• To switch to “strongly typed” mode, it is necessary to
declare it in the beginning of the source files
• It’s only possible to declare “strongly typed” mode per file,
i.e. it’s not possible to declare “strongly typed” mode in
configuration files
<?php
// "Strongly typed" mode is enabled in this file only
declare(strict_types=1);
26. 26
PHP7 type hinting
• It is not possible to declare nullable or mixed types.
• Passing Null to a function with type-hinted parameters will
trigger error.
<?php
Class Sample {
public static function sampleFunc(int $a): string{
return "OK";
}
}
//Fatal Error
Sample::sampleFunc(null);
27. 27
Hack type hinting
• Only “strongly typed” mode
• Permits any type (including null) by using the “mixed”
keyword
<?hh
Class Sample {
public static function sampleFunc(mixed $a): string{
return "OK";
}
}
//OK
Sample::sampleFunc(null);
Sample::sampleFunc(1);
Sample::sampleFunc(”a");
28. 28
Hack Type Hinting
• Accepts Null by adding a “?” before the type hint
<?hh
Class Sample {
public static function sampleFunc(?int $a): string{
return "OK";
}
}
//OK
Sample::sampleFunc(null);
Sample::sampleFunc(1);
29. 29
Hack Type Hinting
The types of keys and values of arrays can be specified.
However, it is only for static analysis, not runtime.
<?hh
Class Sample {
public static function sampleFunc(array<int, string> $a): string{
return "OK";
}
}
//OK
Sample::sampleFunc(array(1 => "a", 2 => "b"));
Sample::sampleFunc(array(1 => 1, 2 => null));
30. 30
Hack Type Hinting
It is possible to specify types in Enum.
<?hh
enum Size: int {
MEDIUM = 1;
LARGE = 2;
}
Class Sample {
public static function sampleFunc(Size $size): string{
return "OK";
}
}
//OK
Sample::sampleFunc(Size::LARGE);
Sample::sampleFunc(2);
Sample::sampleFunc(4); // This works too: it checks the type, not the value.
//Error
Sample::sampleFunc(”a");
31. 31
Type Hinting
• “Strongly typed” only
• Nullable and mixed types
The specifications put emphasis on
type-sensitive, large scale systems.
• “Weakly typed” by default
• No nullable nor mixed types
The specifications put emphasis on
the speed of type-agnostic
development.
33. 33
PHP5 arrays:
• Arrays and associative arrays can be used in the same way
• Arrays accept values of any type
• Keys can be integer or string
• Values are retrieved in order of insertion, regardless of keys
<?php
// the code below prints “ab”
$arr = array(1 => ”a", 0 => ”b");
foreach($arr as $value ) {
print($value);
}
34. 34
Hack Collections:
• Has original collections: Vector, Map, Set and Pair
• It is possible to specify the types of keys and values, though
they’re not checked during runtime
<?hh
$a = new Map<string, string>;
//OK
$a->set("key1", "value1");
//OK
$a->set("key2", 2);
//OK
$a->set(3, array());
35. 35
Hack Collection
It’s not necessary to check if the key exists prior to fetching a
value, and it won’t trigger a “Notice” error when the key doesn’t
exist.
<?hh
$a = new Map<string, string>;
$a->set("key1", "value1");
// $val1 becomes “value1”
$val1 = $a->get("key1");
// $val2 becomes null, no “Notice” error fired
$val2 = $a->get("key2");
40. 40
Collection
• Four original collections
• It is possible to specify the types
of values (keys as well for Maps)
The specifications put emphasis on
type-sensitive, large scale systems.
• Only arrays that accept any type
• No concern over the types of
arrays and their values
The specifications put emphasis on
the speed of “anything-goes”
associative arrays.
43. 43
Enum (Enumeration of value)
<?hh
enum Size: int {
SMALL = 0;
MEDIUM = 1;
LARGE = 2;
X_LARGE = 3;
}
Enumerate values with a specific type
44. 44
Tuples
<?hh
list($a, $b) = testFunc();
public function testFunc() : (string, int) {
return tuple(“OK”, 1);
}
Return multiple values from a function
45. 45
Original language specification
Hack/HHVM has added many original language specifications.
By using Hack in your service, you can achieve:
• quick development with fewer bugs
• developers actually enjoy coding
47. 47
Parallel execution
It is possible to run statements in parallel by using
original functions such as “Async” and “Await.”
Parallel execution is possible out-of-the-box,
reaching even higher performance speeds.
50. 50
Static analysis tool
The static analysis of the code is done by hh_client. It
checks for syntax errors and inconsistencies, allowing
developers to fix them before runtime.
Code with fewer bugs like this is only possible due to the
strict type restrictions in Hack.
51. 51
You can check the program before execution.
• Check for compilation errors
• Type-check the arguments and return values
• Check for discouraged syntax
• Check for inappropriate type casting
Static analysis tool
* configure automatic static analysis with hhvm.hack.lang.auto_typecheck
in config files.
53. 53
Continued support for both PHP5 and 7
• HHVM3.11 implements the new features in PHP7
• The direction is to support both PHP5 and PHP7
• Also possible to break backward compatibility by setting
“hhvm.php7.all = 1” in the settings
• Features from PHP7 can be individually enabled
https://docs.hhvm.com/hhvm/configuration/INI-settings#php-7-settings
55. 55
Great adoption record
The adoption continues to grow, especially among large
scale services. Wikipedia and Baidu have many commits into
the source code to Hack/HHVM.
https://github.com/facebook/hhvm/wiki/Users
57. 57
Release cycle
Hack (HHVM)
• Released every 8 weeks
• Every 3rd version is turned into the LTS version, which is
supported for one year
PHP
• Released every 1 year
• Life cycle of 3 years (bug fixes 2 years, security 1 year)
59. 59
• HHVM crash: needed to monitor to restart
automatically
• pecl not supported: tried replacing some with
golang, but currently venturing into HNI
• Had to upgrade CentOS6 to CentOS7 due to
sudden end of support
• Most of IDEs don’t support it
Some issues we faced in production
63. 63
TLDR;
• The release of PHP7 is also fortunate to HHVM
• New features in PHP7 will be available from HHVM3.11
• HHVM will continue supporting both PHP5 and PHP7
• Possible to break backward compatibility by setting
“hhvm.php7.all = 1” in the settings
https://docs.hhvm.com/hhvm/configuration/INI-settings#php-7-settings
64. 64
Issues related to PHP7 can be tracked on GitHub
https://github.com/facebook/hhvm/labels/php7%20incompatibility
65. 65
Wrap-up
• PHP7 and Hack are similar, but with different
features
• Hack seems to more suited to large scale systems
• Hack didn’t split from PHP, it synchronizes and
evolves together
66. 66
PHP specifications are community-driven, while Hack
is mainly developed by Facebook.
I think PHP values the “loose PHP-ness,” while Hack
values the “correct practical use.”
Final thoughts
67. 67
It is great to have options in the future of
an excellent language like PHP!
70. 70
This document was created with accuracy in mind, but
the author does not guarantee its veracity nor its
usefulness. In addition, this material was created solely
by the author, and it does not represent the views,
values, etc. of any organization.
Disclaimer