SlideShare una empresa de Scribd logo
1 de 47
Interoperable PHP
“We are only as strong as we are united, as weak as we are divided.”
Dambledore
Anatol Belski
PHP Specialist
September 2015
Interoperable PHP
Anatol Belski
@weltling
ab@php.net
#php.pecl on efnet
#winphp-dev on freenode
PHP 7.0 release manager
PHP core developer
OSS guy
Interoperable PHP
OSTC
• PHP
• Hyper-V
• Azure
• Samba
• Docker
Interoperable PHP
Interoperability
Hardware
Architecture
OS
Program
Interoperable PHP
A cross-platform program is …
- Hardware
- OS
- Architecture
- …
independent and can run under various
constellations.
Interoperable PHP
Topics
• Filesystem
• Time API
• Performance
• 32- vs 64-bit
• Thread safety
• Beyond
Interoperable PHP
Brief UNIX/Windows diff
UNIX/Linux
• gcc
• many libs
• processes
• C99
• Ext*, reiserFS, HFS, etc.
• UNIX permissions
Windows
• vc++
• core API + OSS libs
• threads
• C99 starting with VC12
• NTFS, FAT
• ACLs
Filesystem
Interoperable PHP
File permissions
UNIX/Linux
• chmod +x file
• chmod -r file
• chmod ugo-r file
• chmod +r file
• no equivalent
• no equivalent
• chmod +t somedir
Windows
• no equivalent
• icacls file /deny nick:(R)
• no equivalent
• icacls file /grant nick:(R)
• icacls file /grant nick:(GR,GW)
• icacls file /inheritance:e
• no equivalent
Interoperable PHP
File/process permissions
• UNIX/Linux
• chmod(), chown(), etc.
• process permissions are handled same way as file ones
• Windows
• icacls
• impersonation
• Unmapped UNIX users built-in SID mapping
Interoperable PHP
Access time
• ext3, ext4 and others
• noatime,nodiratime in /etc/fstab
• NTFS
• fsutil behavior query DisableLastAccess
• fsutil behavior set DisebleLastAccess 0
Interoperable PHP
NTFS streams
C:tmp> echo hello > foo.txt
C:tmp>echo world > foo.txt:bar.txt
C:tmp>dir /r foo.txt
Volume in drive C is SYSTEM
Volume Serial Number is AE0A-76BD
Directory of C:tmp
08/31/2015 11:50 PM 8 foo.txt
8 foo.txt:bar.txt:$DATA
1 File(s) 8 bytes
0 Dir(s) 59,944,050,688 bytes free
Interoperable PHP
PHP FS snippet 1
<?php
var_dump(file_exists("/"));
// Windows
bool(true)
//Linux
bool(true)
Interoperable PHP
PHP FS snippet 2
<?php
var_dump(dirname('/windows/system', 2));
// Windows
string(1) "“
//Linux
string(1) “/"
Interoperable PHP
PHP FS snippet 3
<?php
$f = fopen("file.txt", "w");
var_dump(unlink("file.txt"));
// Windows
Warning: unlink(file.txt): Permission denied in Command line code on line 1
bool(false)
//Linux
bool(true)
Interoperable PHP
PHP FS snippet 4
<?php
var_dump(fopen("some/directory", "r"));
// Windows
Warning: fopen(some/directory): failed to open stream: Permission denied in
Command line code on line 1
bool(false)
//Linux
resource(5) of type (stream)
Interoperable PHP
Some PHP FS functions
• readdir()
• glob()
• symlink()
• relapath()
• temp dir
• PHP extension paths
Time APIs
Interoperable PHP
System time APIs
• TSC
• RDTSC
• RDTSCP
• PM clock
• HPET timer
• POSIX clock
• WIN8+
Interoperable PHP
gettimeofday()
• UNIX/Linux
• us resolution + dependency on userspace tools
• Windows
• Win8+ with resolution <1us
Interoperable PHP
Time examples in PHP
• microtime() != microtime()
• uniqid() is based on microtime()
• usleep()
• timeout handling
PHP Performance
Interoperable PHP
PHP opcode caches
• Opcache
• WinCache
• APC
• APCu
Interoperable PHP
Performance PHP way
• QB extension
• Zephir
• Recki-ct
• Memcache, etc.
• Write good PHP 
Interoperable PHP
Performance compiler way
• PGO (VC++)
• LTO/FDO (gcc)
• Assembler
• Compiler intrinsics
Interoperable PHP
PGO
Instrument
• Produce an instrumented build
Train
• Run training scenarios
Optimize
• Produce optimized build using the training data
64-bit
Interoperable PHP
Do you think this works?
$x = str_repeat("x", PHP_INT_MAX);
Interoperable PHP
64- vs 32-bit in PHP
64-bit
• In general slower
• 9.22337204 × 109 GB
RAM addressable
• 64-bit integers
• LFS
• 64-bit string length
32-bit
• In general faster
• Less than 2 GB RAM
addressable
• 32-bit integers
• 32-bit file operations
• 32-bit string length
Interoperable PHP
Types in PHP7
• zend_long for integers
• zend_ulong for numeric hashes
• size_t for string length
• zend_off_t for file offsets
• zend_stat_t for file offsets
Treads vs. Processes
Interoperable PHP
Threads
Thread #3
Thread
#1
Thread
#2
Interoperable PHP
Process/Thread
Process single
threaded
stack
text
data
heap
Process multi
threaded
stack
stack
text
data
heap
Thread 1
Thread 2
Interoperable PHP
Treads vs processes
• Thread locking
• Shared memory
• security
• performance
Interoperable PHP
PHP SAPIs
• Apache (worker, prefork, winnt)
• CGI/FastCGI/FPM (NGINX, IIS, Apache, etc.)
• Embed
• Many unsupported SAPIs removed in PHP7
Interoperable PHP
Apache mpm_prefork
Master
Child 1
Child 2
Child n
Interoperable PHP
Apache mpm_worker
Master
Child 1
Child 2
Child n
v
Thread 1
Thread 2
Thread n
v
v
Thread 1
Thread 2
Thread n
v
v
v
Thread 1
Thread 2
Thread n
v
v
v
v
Interoperable PHP
TLS
● __thread qualifier is not a standard
● __declspec(thread) is not a standard
● thread_local is C++11 standard
Thread 1
Thread 2
static __thread int i = 0;
static int j = 0;
void
start_thread(void *dummy)
{
char hello[6];
char *world;
memcpy(hello, "hello", 5);
world = malloc(sizeof(char) * 5);
memcpy(world, "world", 5);
i++;
}
int main(int argc, char **argv)
{
pthread_t t0, t1;
rc = pthread_create(&t0, NULL,
start_thread, NULL);
rc = pthread_create(&t1, NULL,
start_thread, NULL);
return 0;
}
Interoperable PHP
TLS in PHP7
TSRM/TSRM.h
#ifdef TSRM_WIN32
# define TSRM_TLS __declspec(thread)
#else
# define TSRM_TLS __thread
#endif
Zend/zend_types.h
#ifdef ZTS
#define ZEND_TLS static TSRM_TLS
#define ZEND_EXT_TLS TSRM_TLS
#else
#define ZEND_TLS static
#define ZEND_EXT_TLS
#endif
Interoperable PHP
TS or NTS with PHP?
TS
• Less RAM consuming
• Faster startup
• Less library
compatibility
• More complexity
• Slower processing
NTS
• More RAM consuming
• Slower startup
• More library
compatibility
• Less complexity
• Faster processing
Interoperable PHP
Some PHP core functions
• mt_rand()
• fork()
• chroot()
• setlocale()/localeconv()
• symlink()/link()
• fputcsv()
• mail()
• getenv()/putenv()
Interoperable PHP
C APIs implementations in PHP
snprintf sprintf spprintf strlcat strlcpy
glob sscanf strnatcmp strtod
gettimeofday usleep nanosleep
select opendir readdir rewinddir
flock socketpair syslog openlog
closelog ...
Questions?
Thanks for your
attention!
Interoperable PHP
Links
• https://msdn.microsoft.com/en-us/library/e7k32f4k.aspx
• http://blogs.msdn.com/b/vcblog/archive/2013/05/06/speeding-up-php-performance-for-your-application-using-profile-guided-optimization-
pgo.aspx
• https://msdn.microsoft.com/en-us/library/windows/desktop/aa364404%28v=vs.85%29.aspx
• https://wiki.php.net/rfc/removal_of_dead_sapis
• https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7
• https://wiki.php.net/rfc/native-tls
• https://wiki.php.net/rfc/size_t_and_int64_next

Más contenido relacionado

La actualidad más candente

Fluentd Hacking Guide at RubyKaigi 2014
Fluentd Hacking Guide at RubyKaigi 2014Fluentd Hacking Guide at RubyKaigi 2014
Fluentd Hacking Guide at RubyKaigi 2014Naotoshi Seo
 
Python on FreeBSD
Python on FreeBSDPython on FreeBSD
Python on FreeBSDpycontw
 
Fluentd v0.14 Overview
Fluentd v0.14 OverviewFluentd v0.14 Overview
Fluentd v0.14 OverviewN Masahiro
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 
Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contributePierre Joye
 
Infrastructure as code might be literally impossible
Infrastructure as code might be literally impossibleInfrastructure as code might be literally impossible
Infrastructure as code might be literally impossibleice799
 
about Debian "squeeze" @201002 OSC Tokyospring
about Debian "squeeze" @201002 OSC Tokyospringabout Debian "squeeze" @201002 OSC Tokyospring
about Debian "squeeze" @201002 OSC TokyospringHideki Yamane
 
AV Evasion with the Veil Framework
AV Evasion with the Veil FrameworkAV Evasion with the Veil Framework
AV Evasion with the Veil FrameworkVeilFramework
 
Geek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL ServerGeek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL ServerIDERA Software
 
Your Inner Sysadmin - MidwestPHP 2015
Your Inner Sysadmin - MidwestPHP 2015Your Inner Sysadmin - MidwestPHP 2015
Your Inner Sysadmin - MidwestPHP 2015Chris Tankersley
 
Http2.0 Guide 2013-08-14 #http2study
Http2.0 Guide 2013-08-14 #http2studyHttp2.0 Guide 2013-08-14 #http2study
Http2.0 Guide 2013-08-14 #http2studyJxck Jxck
 
OpenZFS Channel programs
OpenZFS Channel programsOpenZFS Channel programs
OpenZFS Channel programsMatthew Ahrens
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsQUONTRASOLUTIONS
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 

La actualidad más candente (18)

Fluentd Hacking Guide at RubyKaigi 2014
Fluentd Hacking Guide at RubyKaigi 2014Fluentd Hacking Guide at RubyKaigi 2014
Fluentd Hacking Guide at RubyKaigi 2014
 
Python on FreeBSD
Python on FreeBSDPython on FreeBSD
Python on FreeBSD
 
Experimental dtrace
Experimental dtraceExperimental dtrace
Experimental dtrace
 
Fluentd v0.14 Overview
Fluentd v0.14 OverviewFluentd v0.14 Overview
Fluentd v0.14 Overview
 
Php intro
Php introPhp intro
Php intro
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contribute
 
Infrastructure as code might be literally impossible
Infrastructure as code might be literally impossibleInfrastructure as code might be literally impossible
Infrastructure as code might be literally impossible
 
about Debian "squeeze" @201002 OSC Tokyospring
about Debian "squeeze" @201002 OSC Tokyospringabout Debian "squeeze" @201002 OSC Tokyospring
about Debian "squeeze" @201002 OSC Tokyospring
 
AV Evasion with the Veil Framework
AV Evasion with the Veil FrameworkAV Evasion with the Veil Framework
AV Evasion with the Veil Framework
 
Geek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL ServerGeek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL Server
 
Your Inner Sysadmin - MidwestPHP 2015
Your Inner Sysadmin - MidwestPHP 2015Your Inner Sysadmin - MidwestPHP 2015
Your Inner Sysadmin - MidwestPHP 2015
 
Veil-Ordnance
Veil-OrdnanceVeil-Ordnance
Veil-Ordnance
 
Http2.0 Guide 2013-08-14 #http2study
Http2.0 Guide 2013-08-14 #http2studyHttp2.0 Guide 2013-08-14 #http2study
Http2.0 Guide 2013-08-14 #http2study
 
OpenZFS Channel programs
OpenZFS Channel programsOpenZFS Channel programs
OpenZFS Channel programs
 
OpenZFS at LinuxCon
OpenZFS at LinuxConOpenZFS at LinuxCon
OpenZFS at LinuxCon
 
Linux operating system by Quontra Solutions
Linux operating system by Quontra SolutionsLinux operating system by Quontra Solutions
Linux operating system by Quontra Solutions
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 

Destacado

Portable PHP
Portable PHPPortable PHP
Portable PHPweltling
 
OSS at Microsoft
OSS at MicrosoftOSS at Microsoft
OSS at Microsoftweltling
 
Understanding PHP objects
Understanding PHP objectsUnderstanding PHP objects
Understanding PHP objectsjulien pauli
 
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
The Case for HTTP/2  - Internetdagarna 2015 - StockholmThe Case for HTTP/2  - Internetdagarna 2015 - Stockholm
The Case for HTTP/2 - Internetdagarna 2015 - StockholmAndy Davies
 
Behat c'est plus que ça | Behat is more than that
Behat c'est plus que ça | Behat is more than thatBehat c'est plus que ça | Behat is more than that
Behat c'est plus que ça | Behat is more than thatSamuel ROZE
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricksJavier Eguiluz
 

Destacado (6)

Portable PHP
Portable PHPPortable PHP
Portable PHP
 
OSS at Microsoft
OSS at MicrosoftOSS at Microsoft
OSS at Microsoft
 
Understanding PHP objects
Understanding PHP objectsUnderstanding PHP objects
Understanding PHP objects
 
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
The Case for HTTP/2  - Internetdagarna 2015 - StockholmThe Case for HTTP/2  - Internetdagarna 2015 - Stockholm
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
 
Behat c'est plus que ça | Behat is more than that
Behat c'est plus que ça | Behat is more than thatBehat c'est plus que ça | Behat is more than that
Behat c'est plus que ça | Behat is more than that
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 

Similar a Interoperable PHP

Similar a Interoperable PHP (20)

PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
How PHP works
How PHP works How PHP works
How PHP works
 
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilitiesVorontsov, golovko   ssrf attacks and sockets. smorgasbord of vulnerabilities
Vorontsov, golovko ssrf attacks and sockets. smorgasbord of vulnerabilities
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
 
PHP
PHPPHP
PHP
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course Deck
 
Php manish
Php manishPhp manish
Php manish
 
1. introduction to php and variable
1. introduction to php and variable1. introduction to php and variable
1. introduction to php and variable
 
Files in php
Files in phpFiles in php
Files in php
 
Node.js 101 with Rami Sayar
Node.js 101 with Rami SayarNode.js 101 with Rami Sayar
Node.js 101 with Rami Sayar
 
50 shades of PHP
50 shades of PHP50 shades of PHP
50 shades of PHP
 
Linux basics (part 2)
Linux basics (part 2)Linux basics (part 2)
Linux basics (part 2)
 

Último

AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Onlineanilsa9823
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 

Último (20)

Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 

Interoperable PHP

Notas del editor

  1. Hardware – various hardware existing or needed for a program. Architecture – how is the hardware put together. OS – an exact operating system. Tree above – platform. Program – actual binary running upon the platform. With PHP - the PHP interpreter.
  2. A cross-platform program can be handled within the same source tree, or with different sources for different platforms. As well many interpreted programming languages supports multiple platforms. Also there are like a dozen platforms within Unix, Linux, Windows.
  3. Access control lists and others vs UNIX permissions. Unmapped UNIX user example – Samba, NFS, etc.
  4. Atime is usually off by default off windows. On linux depends on a distribution, but most likely is on.
  5. readdir() fileorder can differ not only between platforms, but also depends on filesystems. symlink() with relative paths is not thread safe, threads could have changed the CWD. realpath() might show different results depending on platform/OS. Fe case insensitive on Windows, case sensitive on Linux, optional case sensitivity on OSX.
  6. TSC – time stamp counter, a 64-bit register on intel Architectures. The TSC frequency is not assumed to be constant, it is periodically tweaked, that is what the adjtimex system call is for. A user space program/daemon (like NTP and PTP) uses adjtimex to tell Linux how to slew the frequency over time. A periodic procedure calibrates the TSC frequency and the period is given by the RTC (system clock)? So the change of the TSC counter is compared to an elapsed time of the RTC (system clock). Thus the resulting TSC frequency is calibrated to give exactly one million microseconds/second PM clock – power management clock rate, might depend on ACPI – advanced configuration and power interface HPET – high precision event timer POSIX clock – standard for implementing and representing time sources, abstraction layer
  7. Usleep() … system call, posix monotonic clock vs performance timer … mention hrtime here Timeout counting on Linux doesn’t include time spent for syscalls, f.e. for sleep(). On Windows, timer is running in parallel with the PHP script execution.
  8. Opcache ASLR issue on Windows Various shared memory issues in NTS builds. Under Linux shared memory is accessible between processes, Windows it's not always the case. Especially it's to mention for ACRL cases.
  9. Like SQL query cache.
  10. PGO – profile guided optimization LTO – link time optimization FDO – feedback directed optimization Windows x64 no inline ASM PHP targets SSE2 on x86 make clean make -j4 prof-gen # run training scripts make prof-clean make -j4 prof-use configure –enable-pgi nmake # run training nmake clean ./configure –enable-pgo nmake
  11. Big file uploads count for LFS as well. A combination of 32-bit processes running on 64-bit OS – the processes are still a bit slower that on a native 32-bit OS, but can use their 2GB memory limits.
  12. Stack pointer Registers Scheduling properties (such as policy or priority) Set of pending and blocked signals Thread specific data. Shared file descriptors and co.
  13. Most of the dead stuff was removed in PHP7, embed can be used in any userspace programs, also used in several servers, fe NaviServer (former AOLserver).
  14. Classic model when learning socket programming.
  15. A good example for cross platform thread locking is APC. Cross-platform threading is possible with pthreads.
  16. And mention globals in php7 are TLS based as well, but actually it’s a bigger topic which can turn into a sleeping pill  In php7 it opens the door for better binary compatibility, because in many cases a thread specific global variable can be used instead of extending the extension globals structres. This can be a big salvation for bug fixes in the middle of some stable release.
  17. TS less robust, more sparse servers can be started.
  18. mail() isn’t thread safe until PHP7 on windows Locale is not thread safe mt_rand() might work not in the range expected symlink vs. junction Getenv()/putenv() isn’t thread safe. Fe #69636 . This has an alternative threaded API on windows, but no chance on linux.