3. NodeJS
Ryan Dahl
May 27, 2009
Go
Robert Griesemer
November 10, 2009
NPM
Isaac Z. Schlueter
January 12, 2010
The Major
HITS!
PWA
Alex Russel
November 17, 2015
2009 2010 2015
Steeven Andrian
The Rise Of PHP
7. Not
Async
Not
Serverless
No Packages
Management
Supported
Since PHP
v5.4
March 1, 2012
Spearhead
Since PHP
v4.0
May 22, 2000
Composer
Since PHP
v5.4
May 1, 2012
No Socket
Support
Supported
Since PHP
v4.10
December 10, 2001
No PWA
Support
Supported
Since
O2System
Framework
Soft Launch
April 23, 2018
Steeven Andrian
The Rise Of PHP
11. RTD
Return Type Declaration
<?php
function foo($bar):string
{
return $bar;
}
foo(50);
Fatal error:
Uncaught TypeError: Return value of foo() must be of the type string
Steeven Andrian
The Rise Of PHP
12. CST
Coercive Scalar Type
<?php
function foo(string $num):string
{
return ‘this is: ’ . $bar;
}
foo(50);
Notice:
A non well formed numeric value encountered in file on line 2
Steeven Andrian
The Rise Of PHP
13. SST
Strict Scalar Type
<?php
declare(strict_types = 1);
function foo(string $num):string
{
return ‘this is: ’ . $num;
}
foo(50);
Fatal Error:
Uncaught TypeError: Argument 1 passed to foo() must be of the type string, integer given, called
in line 9 and defined in file: 3
Steeven Andrian
The Rise Of PHP
14. Typed
Class Property
<?php
class Example
{
public string $foo = ‘foo’;
}
$example = new Example();
$example->foo = 1;
Fatal Error:
Uncaught TypeError: $foo must be of the type string, integer given, called in line 9 and defined in
file: 3
Steeven Andrian
The Rise Of PHP
15. Union Types
Returns and Declaration
<?php
function foo(string|int $num):string|int
{
return $num;
}
foo(50);
foo(‘fifty’);
Steeven Andrian
The Rise Of PHP
22. Parse Error
on Invalid numeric literals
<?php
$mask = 0855;
Parse error: Invalid numeric literal
Steeven Andrian
The Rise Of PHP
23. Uniform Variable Syntax
<?php
// v7.x Left to Right
$this->$foo[‘bar’];
// v5.x
$this->{$foo[‘bar’]};
// Support missing combinations of operations
$foo()[‘bar’]();
[$obj1, $obj2[0]->prop;
getStr(){0}
// Support operations on arbitrary (...) expressions
(...)[‘foo’];
(...)->foo;
// Support nested ::
$foo[‘bar’]::$baz;
$foo::$bar::$baz;
$foo->bar()::baz();
// Support nested ()
$foo()();
$foo->bar()();
Foo::bar()();
$foo()();
Steeven Andrian
The Rise Of PHP
33. Fitur-fitur yang memperkuat
✔ Removal of many deprecated features
✔ 64-bit integer support on Windows
✔ Cleanup edge-case integer overflow/underflow
✔ Support for strings with length >= 2^31 bytes in 64bit builds
✔ Unicode Codepoint Escape Syntax
✔ ICU IntlChar class added to intl extension
Steeven Andrian
The Rise Of PHP
34. ✔ Much more cpu cache friendly
✔ New memory allocator similar to jemalloc
✔ Faster hastable iteration API
✔ Array duplication optimization
✔ PCRE JIT enabled by default
✔ Fast ZPP (ZendParseParameters) implementation
✔ Faster stack-alocated zvals (instead of heap)
✔ Optimized VM calling
✔ Global register variables with gcc 4.8+
✔ Hundreds of micro-optimizations
Steeven Andrian
The Rise Of PHP
Fitur-fitur yang memperkuat
38. ✔ Ada dimana saja (Sekolah, Kursus, YouTube, Forum, Stackoverflow)
✔ Mudah dipelajari (Belajar SSI, OOP, Design Pattern, FasS, Microservice, dll)
✔ Dapat banyak digunakan untuk belajar mengasah skill programming
khususnya logika.
✔ Good for getting a job and perfect entry level job.
✔ More applicable (HTML, CSS, JS, PHP & MySQL) sudah bisa membangun
website / aplikasi / command line interface
✔ Mudah diintegrasikan
✔ Mudah mencari support atau dukungan
Steeven Andrian
The Rise Of PHP