►
Description
PHP and .NET make up over 90% of the entire internet. While PHP is ubiquitous and supremely popular, .NET is more robust, secure and performant. PeachPie compiler is a unique project that bridges the gap between the two platforms and allows developers to use the best of both worlds.
A
C
C
Yes,
I'm
I'm,
going
to
show
you
a
peach
pie,
compiler
and
some
advanced
interoperability
features
so
features
on
how
you
can
integrate
c-sharp
or
any
kind
of
dotnet
dotnet
project
with
a
PHP
which
is
pretty
cool
and
gives
you
a
lot
of
options
on
how
you
can
improve
or
extend
existing
PHP
projects
or
extend
existing
C
sharp
projects.
It's
a
little
bit
of
PHP.
C
So
let
me
start
with
a
short
introduction
about
peach
pie.
It's
like
a
entire
platform.
It
contains
a
compiler
which
is
based
on
Roslyn,
so
there
is
a
entire
code
analysis
project
that
takes
a
bunch
of
PHP
files
and
technologies
it
and
creates
all
the
trees
and
semantic
trees
and
outputs
the
DLL
file.
C
There's
anti
runtime
that
supports
the
compiled
PHP
programs,
and
there
are
also
a
bunch
of
libraries
that
simulate
or
re-implement
all
of
PHP
stuff,
like
all
the
PHP
extensions
and
so
on,
so
to
make
it
more
a
little
bit
more
clear
and
I
promise
the
city
on
your
animation.
We
have
in
this
in
this
presentation.
C
The
compiler
takes
all
the
PHP
code.
It
can
be
a
really
huge
project,
like
I
will
show
you
after
a
few
minutes,
and
it
also
references
an
assembly
na
and,
and
it
doesn't
reference
you
can
have
and
creates
a
docking
standard,
or
some
of
it
is
portable.
My
and
also
it's
sourceless,
you
don't
have
the
original
PHP
source
code
in
the
resulting
in
the
resulting
DL
file,
which
gives
you
a
few
more
three
more
other
options.
C
Now
you
can
distribute
your
PHP
applications,
for
example,
anyways.
Let's
move
on
the
first
demonstration
to
make
it
more
clear:
it's
a
simple
console
application.
So
let
me
switch
to
to
register
your
code
and
in
here,
I
have
an
empty
folder
and
we'll
create
a
single
page.
Let's
start
with
a
PHP
file
and
just
with
something
realistic.
C
C
There
is,
and
what
we
see
is
a
PHP
file
and
a
project
file
containing
like
anything.
We
are
used
to
from
c-sharp
the
output
tag
property.
The
target
framework
is
does
not
call
from
a
2.0
some
description,
which
is
not
necessary,
but
their
presence.
We
are
compiling
palace,
it's
a
subpage,
EP
files,
all
the
files
and
one
additional
transit
NuGet
package
containing
work.
So
this
is
real.
C
C
Which
means
one
great
advantage
of
the
entire
project,
because
all
the
to
link
or
the
great
tooling
of
the.net
can
be
used
for
the
PHP
apps
as
well,
and
we
will
show
several
other
two
links
during
the
presentation
like
readers
to
the
Diagnostics
and
so
on,
but
for
now
I
would
like
to
demonstrate
the
interoperability
features.
So
if
you've
write
a
really
small
piece
of
code
like
like
a
general
general
hello
world,
some
functions,
so
we
will
see
so
we
will
see
how
it
works.
C
C
C
What's
great
about
the
project
as
I
show
you
before
is
yes,
you
can
debug
the
application
as
another
doesn't
application,
but
you
can
also
you
can
also
use
all
the
document
stuff.
You
can
implicitly
you
get
all
the
references
to
order
tokens,
standard,
runtime
and
packages
and
I
think
you
specify
in
your
in
your
project
file
as
a
package
of
friends
or
as
a
project,
your
friends
and
and
or
any
other
reference
to
a
DLL
file.
So
I
can
write
something
without
any
other
configuration,
something
like
any
system
date
time
and
using
the
PHP
syntax.
C
C
So
what's
the
result
of
this
compilation
as
we
are
used
to
from
any
other
c-sharp
project,
RSD
bin
folder
is
debug
and
net
Korat
and
there
is
a
deal
of
file
and
PDB
file
for
debugging
for
debugging
features,
and
we
can.
We
can
look
at
the
DLL
file
using
some
decompiler,
like
I'll
spike,
for
example.
So
if
we
open
the
deal
files
file
like
this.
C
You
see
there's
a
bunch
of
bunch
of
weird
methods:
it's
because
they
they
are
meant
to
not
be
accessible,
but
there's
also
the
function
we've
written
and
you
can
see
in
the
in
the
I'll
spy
there's
a
regular
call
to
the
date/time
function,
so
it's
seamlessly
integrated
with
no
overhead
at
all.
So
you
can
write
these
c-sharp
PHP
hybrids,
like
all
together
without
any
overhead,
there's
also
a
bunch
of
other
other
runtime
stuff
that
are
generated
to
have
a
compiler,
but
everything
works
as
s1
SNL
dotted
language.
C
C
We
can
create
a
regular
PHP
web
application
ap
website
without
of
observer
or
having
a
PHP
on
your
on
your
machine,
because
we
have
a
speed
of
its
core
and
it's
built
in
castor
web
server.
So
we
can
create
a
c-sharp
project
that
will
target
PHP
and
and
run
its
own
web
server.
It
can
run
command
line
on
on,
is
Express
or
is
on
Azure
or
anything
you
are
used
to.
C
C
Do
your
daughter
installation?
So
if
you
run
the
command
it
will
download
NuGet
packages,
our
templates
and
there's
one
template
that
creates
an
asp.net
core
website
with
some
PHP
already
so
no
web.
But
the
language
is
PHP.
You
can
write
it
like
that
and
you'll
see
it
creates
two
projects:
a
server
and
a
website.
Web
site
is
a
PHP
project
with
the
project
file
we've
shown
before
and
the
server
is
a
regular,
regular,
orchestral
web
server,
a
hosting
hosting
our
project.
C
C
So
he
built
the
project
for
the
first
time
it
down
lost,
although
all
the
dependencies,
so
these
warnings
will
disappear
and
and
put
a
breakpoint
into
the
into
the
PHP
code,
and
we
can
you
can
check
some
more
advanced
interoperability
features
we
can
make
use
with
the
pitchman
project.
I
can
here
so
working,
so
we
can
start
a
project
as
usual.
C
C
So
X
pyramid
course
started
initialize
the
pipeline
and
request
it.
Our
request
handler
is
part
of
the
runtime
on
a
peach
pie
and
passed
the
request
to
the
compiled
PHP
file,
and
now
we
can
see
10
debug
the
PHP
file,
as
we
as
we
showed
before
continue,
and
you
see
on
your
on
your
SP
tonette
core
server,
a
message
from
from
PHP
come:
let's
make
it
more
interesting
like
we
can,
for
example,
create
a
class,
but
we
can
create
a
class
in
a
c-sharp
project.
Let's
imagine.
B
C
C
From
the
website,
which
is
PHP
project
two
to
the
seashell
project,
that's
its
class
library
101
slash
this
problem
and
why
would
I
do
that?
It's
because
I
can
use
this
dotnet
classes
in
my
PHP
file.
So
in
this
way
imagine
you
have
a
huge
PHP
code
consisting
of
thousands
and
thousands
of
files,
which
is
not
unusual,
and
you
can
still
really
replace
them.
You
can
slowly
replace
PHP
classes
with
tokens
classes.
C
For
example,
you
are,
you
are
migrating
to
your
your
PHP
project
to
dotnet
and
you
would
like
to
gain
some
performance,
so
you
just
remove
the
remove
the
class
from
PHP
project
and
rewrite
it
in
a
c-sharp
and
the
PHP
code.
All
look
the
same.
So
if
we
have
a
constructor,
for
example,
in
c-sharp
and
I,
create
in
PHP
class
library,
one
slash,
I
guess
it's
called
costs,
1
plus
1.
C
We
can
instantiate
the
objects
as
before
without
any
difference,
but
the
class
was
written
in
C
sharp.
So
in
this
way
we
can
keep
the
old
PHP
code
and
slowly
rewrite
pieces
of
it
into
into
c-sharp,
and
if
you
run
the
project,
let's
make
a
lot
more
interesting.
Let's
make
like
a
function,
for
example,.
C
C
C
C
C
Let's
call
it
I
and
we
passed
now,
for
example,
and
in
PHP
it
gets
it
gets
automatically
averted,
but
we
can
go
one
more
step
further,
because
thanks
to
the
extra
integration,
I
think
soda
interpret
the
features
we
can
extend,
c-sharp
classes
in
PHP
and
also
gave
B
classes
in
c-sharp.
So
if
you
write
something
like
my
class,
which
extends
this
c-sharp
class,
it
would
all
work.
C
Is
it
also
all
work
and
also
with
function
overriding
and
anything
you
would
expect
and
also
we
can
write
more
more
integration
features
and
make
use
of
all
the
Daltons
features
you
like,
for
example,
but
you
don't
have
in
PHP,
for
example,
in
PHP
they
don't
have
a
delegate,
they
don't
have.
They
don't
have
an
option:
how
to
wrap
something
in
in
something
as
a
delegate.
They
don't
have
to
type
for
it.
C
They
have
something
like
closure
or
or
classes
that
have
magic
methods
like
underscore
invoke
or
or
underscore
call,
but
in
c-sharp
we
are
used
to.
We
are
used
to
write
delegates.
So
if
I
wouldn't
something
like
function,
that
will
return
a
delegate
taking
in
and
littering
string
what
to
do,
for
example,
and
it
will
return
this
function
doing
something
like.
C
C
C
A
C
C
So
all
this
integration
of
all
this
interpretive
features
works
like
seamlessly.
You
don't
have
to
do
anything.
You
just
write
the
code
as
you
would
expect
it
and
you
can
treat
the
PHP
code
as
you
are
used
to
so
I
wanted
to
show
you
all
this,
because
we
want
to
show
you
something
bigger
something
in
real
visual
studio,
for
example,
and
we
need
few
more
things
we
need
to
realize.
There
is
a
bunch
of
libraries
and
bunch
of
runtime
stuff
in
the
peach
pie
project.
C
So
there's
a
lot
of
lot
of
features
implemented
in
the
project
already
and
also
you
have
to
realize
that
the
PHP
code
behaves
like
any
other,
any
other
c-sharp
project.
So
we
can
do
things,
for
example
like
yeah
we
can,
since
we
have
this
class
in
being
in
the
website
project,
we
would
like
to
share
it
with
others,
and
it
is
good.
It
is
a
good
experience
to
do
to
rub
your
your
libraries
into
NuGet
packages.
C
C
C
All
the
parts
of
your
website
out
are
already
written
in
your
in
your
in
your
PHP
project,
and
now
we
are
writing
this
new
new
as
betokened
core
NBC
application,
and
you
would
like
to,
of
course
make
use
of
the
overly
written
code,
because
in
this
way
you
can
slowly
create
a
new
project
and
reuse.
Existing
piece
of
you.
C
Have
three
projects
I've
prepared
a
PHP
library,
a
PHP
project
as
sixty
before
and
what
it
does?
Yes,
there
is
there's
a
small
PHP
code
and
then
there
is
a
c-sharp
project,
regular
one
with
regular,
castor
web
server
with
some
index
razor
page
and
what
we
do
here.
We
would
like
to
take
this
existing
HP
code
and
render
it
as
a
component
on
the
razor
page
and
for
this
purpose
we
can
do
it
as
before.
We
just
create
a
PHP
project.
C
We
create
an
MVC
application,
but
there's
an
extension
to
the
HTML
object
which
usually
renders
things
like
action,
link,
checkbox
and
so
on.
There
is
an
extension
called
PHP
and
you
can
literally
take
your
name
of
your
of
your
PHP
file.
Put.
It
is
an
argument
to
this
PHP
extension
and
make
the
runtime
to
render
your
PHP
your
compiled
PHP
code
at
this
point.
So
if
you
run
this
project
1
as
a
command
line,
it's
all
again
compile
compile
all
the
other
PHP
stuff,
compile
our
C,
sharp
stuff,
create
views,
and
so
on.
C
So
now
you
see
we
are
debugging
the
original
page
and
it
seamlessly
transfer
to
to
the
PHP
code,
and
now
we
are
rendering
the
PHP
code.
It's
all
I
synchronous
and
that's
why
you
don't
see.
We
don't
see
the
razor
on
the
call
stack
and,
and
that's
like
it,
that's
that's
everything
you
have
to
do.
You
can
debug
it
continue
and
in
the
result,
in
the
result,
you
see
a
part
of
code
from
razor
and
part
of
code
from
from
PHP.
C
B
C
C
We
can
also
pass
an
order,
it
can
be
a
C
sharp
object
or
it
can
be
a
peach
public
as
well.
So
in
this
in
this
demonstration
we
have
class
user
as
a
PHP
class.
We
pass
it
as
as
a
model
for
for
this
portion
of
razor
view
and
the
partial
razor
view
stating
it's
accepting
this
user.
So
for
interview
of
the
C
sharp
project,
it's
a
regular
dot
s
class.
C
C
Running
it
has
the
breakpoint
in
PHP
code,
and
if
you
put
a
breakpoint
in
here,
you
can
see
it
transfers
the
execution
to
the
to
the
razor
partial
view.
Another
caustic
you
can
see.
Now
we
are
a
PHP
and
it
does
a
bunch
of
stuff
and
then
continues
in
the
regs
of
view.
It
renders
the
razor
thing
and
goes
back
to
the
PHP
code
and
in
the
result
there
is.
C
There
is
your
there's,
your
razor
purse
of
you
rendered
in
a
PHP
page
that
is
compiled
into
dotnet.
So
that's
how
you
can
design
reuse
existing
stuff
from
from
MVC
application
or
from
all
PHP
application
in
in
other
projects
that
are
on
a
different
platform,
for
example,
and
I
was
showing
is
for
for
another
purpose
because
what's
great
about
a
project
it.
C
C
And
in
here
we
have
a
bunch
of
projects,
one
of
them
is
WordPress
folder
and
it
contains
it
contains
the
entire
sources
of
the
corpus
applications
or
the
harbor's
application,
and
you
don't
need
to
actually
take
a
look
on
the
sources.
The
important
thing
is
the
project
file,
so
we
stated
target
framework
for
the
fourpence
application
is
doesn't
standard.
2.0
we've
prepared
some
some
property
in
here
like
in
the
in
other
seashell
projects.
C
C
C
We
are
including
some
content
files
like
pictures
and
JavaScript
files
and
CSS
files
into
the
new
gate
package.
It
is
very
important
because,
if
you
create
in
yoga
package
with
the
content
files,
then
you
don't
have
to
do
anything.
You
have
a
nougat
package
with
WordPress
and
about
its
content
right
where
you
need
it
and
that's
it.
That's
it.
That's.
C
The
rest
is
the
same
like
before,
with
the
one
exception,
a
via
SDK
project,
which
adds
few
more
features
to
the
WordPress
and
the
SDK
project
is
here,
and
it
defines
some
interfaces
that
are
not
needed,
but
it
also
makes
it
extensible
for
our
helper
project
that
provides
an
extension
method,
call
use
WordPress.
So
if
you
write
this
use,
WordPress
method,
if
you
call
this
use
WordPress
method
in
your
in
your
SP
design,
core
application,
it
does
a
bunch
of
stuff
like
loading.
C
The
word
press
into
the
SB
doesn't
core
pipeline
and
also
it
enables,
for
example,
SB
doesn't
corresponds,
caching,
which
is
pretty
cool,
because
everyone
who
ever
configured
the
WordPress
site
knows
you
have
to
enable
some
caching,
caching
plugins,
like
WP,
super
cache
or
I.
Think
like
this,
which
is
not
needed
on
because
we
have
Dublin
core
and
we
have
this
response.
Caching
middleware
so
there's
also
a
small
application
to
test
the
WordPress
and
to
run
it
on
kestrel.
C
C
C
C
Now
we
are
configuring
pipeline
and
stepping
in
to
the
purpose,
and
we
are
doing
a
bunch
of
stuff
like
we
are
reading
for
chris
configuration
for
from
app
settings
dot,
JSON
file,
because
in
wordpress
to
configure
our
database
or
other
things,
you
have
to
modify
a
source
PHP
file
and
we
don't
like
that.
So
we've
replaced
it
with
up
settings
of
Jason.
So
it
we
allowed
the
configuration
from
up
settings
of
Jason,
and
then
we
configure
the
WordPress
using
the
settings
file.
Instead
of
modifying
the
sources
source
PHP
file,
we
also
a
neighbor
the
response.
C
The
SDK
also
enables
the
short
URL
rewriting
so
in
WordPress
you
have
these
short
URLs,
which
doesn't
refer
to
to
actual
to
access
to
actual
PHP
files,
but
instead
they
have
to
be
parsed
and
passed
to
index
dot
PHP.
So
in
in
here
we
configure
a
short
while
rule
using
the
experiment,
corn,
middleman.
C
C
C
C
But
this
is
something
we
have
shown
like
a
year
ago
and
what's
nice
about
this
approach
is
compelling
the
WordPress
or
compiling
PHP
application
with
this
property
called
called
generate
generate
package
on
built.
Yes
means
it
creates
a
new
get
package
from
from
this
product
file,
and
here
we
have
one
created
from
the
from
the
WordPress.
C
It
consider
the
entire
WordPress
with
the
content
files.
So
whenever
reference
this
package
from
my
c-sharp
application,
I
get
all
the
content
files
as
well
and
in
a
lick
folder.
There's
this
comparative
wordpress,
including
the
xml
documentation
file,
which
is
generated
from
the
PHP
documentation,
documentation
comments
from
the
WordPress
itself.
C
Name
in
a
wordpress
or
without
having
any
any
PHP
files
in
my
project
actually
so
for
this
purposes,
I've
prepared
a
really
small
small
application
on
kestrel,
and
it's
this
one
so
dirty
there's
the
application
with
with
no
PHP
files
at
all
they're,
just
one
of
your
friends
to
that
peach,
pie,
wordpress
NuGet
package
and
the
rest
is
handled
by
dotnet
dot
system
itself.
So
we
can
always
use
the
WordPress
to
install
the
WordPress
into
into
the
to
the
request
handler
pipeline
and
with
few
plugins
that
solution
later.
C
C
C
C
But
why
would
I
do
that?
Why
would
I
compile
the
WordPress
to
you
know
that
there
are
a
few
reasons
like
as
I've
shown
before
we
can
install
this
response.
Caching,
that,
like
boosts
performance
of
the
purpose
side,
so
if
we
are
gonna
ground
and
go
back
to
the
site,
the
response
time
to
to
make
a
request
to
a
scientist
about
two
milliseconds,
because
it
just
just
hits
the
it
just
hits
the
SP
doesn't
Corps
response
caching
middleware
and
gets
me
the
output
immediately.
C
What
I
can
do
as
well
is
extend
the
WordPress
with
a
c-sharp.
So
if
I
have
some
components,
some
some
packages
in
c-sharp
or
as
a
new
gate
package
and
I,
don't
have
them
in
PHP
I
can
I
can
extend
WordPress
in
c-sharp
using
these
components.
For
example,
here
there's
an
additional
widget
in
my
dev
board
that
it's
actually
written
in
in
C
sharp
as
a
razor
partial
view.
C
It
is
now
what
not
possible
you
can,
of
course,
disable
disable
modifications
of
the
PHP
files
on
your
web
server.
But
in
here
it's
coming
as
a
single
compact
or
press
side,
which
you
can
also
test
automatically
on
your
death,
oops
I,
should've
apps.
C
I
can
have
so
in
here
when
I'm
browsing
through
the
side
and
with
a
low
response
machine,
because
the
response
cache
in
cases
a
but
when
I'm
logged
in
you
can
see
the
CPU
is
merrily
doing
something.
It's
just
a
little
peek
and
and
nothing
else
and
also
I,
can
profile
profile
the
application
and
see
a
lot
of
stuff
on
YouTube,
because
it's
very
good
practice
to
profile
our
application.
Before
we
go
to
production,
of
course-
and
yes,
that's
it
I
made
it
in
45
minutes.
C
So
that's
actually
everything
I
wanted
to
I
what
is
demonstrated
in
this
presentation
but
I've?
Yes,
I
guess:
I
have
few
more
seconds.
I
can
show
you
one
more
use
of
of
the.net
I
prepared
a
little
little
project
in
in
in
visual
studio,
written
in
PHP
code
and,
as
you
can
see,
it
uses
as
a
Marine
selling
framework.
So
let
me
connect
one
phone.
C
C
C
You,
can
publish
your
project
to
where
your
devices
to
Linux
Mac,
OS
windows
and
everything
you
can,
of
course
make
your
application
ultra
portable,
and
once
you
connect
your
phone
to
Visual
Studio,
you
see
it
appears
in
the
top
menu
and
I
can
just
run
an
Internet
project
using
the
summer
in
framework
on
your
mobile
device
and
I
have
an
Android
device
in
here
and,
as
you
know,
Donna
doesn't
see
a
difference
between
languages,
ones
ones.
The
language
is
compiled
to
dotnet.
You
can
do
whatever
you
want
with
it.
C
Starting
debugging-
yes,
oh
and
it's
Frank,
so
in
here,
yes-
and
here
we
have
a
little
planet
written
in
PHP,
running
on
Android
device,
which
gives
one
more
use
case
for
for
PHP
language,
I
guess
it
would
run
it
would
work
for
for
Apple
and
Windows
Phone
as
well,
but
I'm,
okay
with
Android.
So
that's
it
I
think
I
made
it
in
47
minutes
is
great
thanks.
So
if
you
have
any
questions,
I'm
hearing
I'll
be
glad
to
to
answer.
If
someone's
listening
at
2:00
a.m.
of
course,.
B
C
C
B
C
That's
a
good
question:
as
you
see
the
WordPress
isn't
art,
so
you
don't
have
any
source
files
on
our
web
server.
So
any
attacks
on
these
sources
are
like
not
possible
at
all.
Also
there
is
this
SB
doesn't
cover
and
espyo
support
pipeline
and
your
observe
cottage
catches
a
lot
of
attacks
and
we
actually
actually
saw
a
lot
of
attacks
on
unboxing
PHP,
since
you
don't
have
any
PHP
on
your
web
server,
this
exact
possible.
C
B
C
Which
is
like
I'm,
Pilar
and
runtime
on
the
server,
so
they
don't
notice.
The
only
way
how
they
can
notice
is
to
is
to
reveal
the
response
headers
of
the
web
server
and
they
would
notice
there
is
X
powered
by
at
the
width
value
of
peach
pie,
so
SD
my
heart,
okay
notice.
But
there
is
no
downloading.
There
is
no
initial
initial
initial
download
and
so
long
they
won't
notice.
B
Fantastic
well
thanks,
so
much
Jacob,
I
we've,
a
number
of
the
folks
here
in
the
chatroom,
are
pointing
out
that
they
I've
been
doing
a
little
bit
of
work
with
peach
pie
on
my
channel
I
know
you've
seen
some
of
the
stuff
that
I'm
doing
over
there
so
really
great
stuff.
I
can't
wait
to
go
a
little
bit
further,
exploring
peach
pie
on
my
own,
and
it
sounds
like
a
couple
of
the
folks
here
in
the
chat
room.
We're
excited
to
give
it
a
try
with
PHP
on
their
own.
So
thank
you
so
much.
B
So
thanks
so
much
we're
we'll
catch
you
later
and
we're
gonna
start
getting
ready
for
our
next
presentation,
but
in
the
meantime
we've
got.
We've
got
some
quick
words
on
view
and
webpack
get
you
later
Jacob
thanks.