Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b48cc015
Commit
b48cc015
authored
May 01, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor doc update. [skip ci]
parent
5d002f08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
intro-upgrade-from-v1.md
docs/guide/intro-upgrade-from-v1.md
+12
-11
No files found.
docs/guide/intro-upgrade-from-v1.md
View file @
b48cc015
...
@@ -19,24 +19,25 @@ the [Starting from Basic App](start-basic.md) chapter to learn how to install Yi
...
@@ -19,24 +19,25 @@ the [Starting from Basic App](start-basic.md) chapter to learn how to install Yi
create new extensions or turn your existing 1.1 extensions into 2.0, please refer to
create new extensions or turn your existing 1.1 extensions into 2.0, please refer to
the
[
Creating Extensions
](
extend-creating-extensions.md
)
chapter.
the
[
Creating Extensions
](
extend-creating-extensions.md
)
chapter.
PHP
---
Yii 1.1 was developed to be compatible with PHP 5.2. Yii 2.0 minimum requirement is PHP 5.4 that is a huge improvement
PHP Requirements
in both performance and features. And since these features are actually used you need to get yourself familiar with them.
----------------
Here's the list:
Yii 2.0 requires PHP 5.4 or above, which is a huge improvement over PHP 5.2 as required by Yii 1.1.
As a result, there are many differences at language level that you should pay attention to.
Below is a summary of the major changes regarding PHP:
-
[
Namespaces
](
http://php.net/manual/en/language.namespaces.php
)
.
-
[
Namespaces
](
http://php.net/manual/en/language.namespaces.php
)
.
-
[
Anonymous functions
](
http://php.net/manual/en/functions.anonymous.php
)
.
-
[
Anonymous functions
](
http://php.net/manual/en/functions.anonymous.php
)
.
-
Short array syntax. It's easy, just use
`[`
and
`]`
instead of
`array(`
and
`)`
.
-
Short array syntax
`[...elements...]`
is used instead of
`array(...elements...)`
.
-
Short
`echo`
in form of
`<?=`
used in framework views. In PHP 5.4 it's always available unlike
-
Short echo tags
`<?=`
are used in view files. This is safe to use starting from PHP 5.4.
[
`<?` that isn't safe to use
](
http://php.net/manual/en/language.basic-syntax.phptags.php
)
.
-
[
SPL classes and interfaces
](
http://php.net/manual/en/book.spl.php
)
.
-
[
SPL
](
http://php.net/manual/en/book.spl.php
)
.
-
[
Late Static Bindings
](
http://php.net/manual/en/language.oop5.late-static-bindings.php
)
.
-
[
Late Static Bindings
](
http://php.net/manual/en/language.oop5.late-static-bindings.php
)
.
-
[
Date and Time
](
http://php.net/manual/en/book.datetime.php
)
.
-
[
Date and Time
](
http://php.net/manual/en/book.datetime.php
)
.
-
[
Traits
](
http://php.net/manual/en/language.oop5.traits.php
)
.
-
[
Traits
](
http://php.net/manual/en/language.oop5.traits.php
)
.
-
[
intl
](
http://php.net/manual/en/book.intl.php
)
. Yii 2.0 has many convenient wrappers for intl features in
`i18n`
-
[
intl
](
http://php.net/manual/en/book.intl.php
)
. Yii 2.0 makes use of the
`intl`
PHP extension
components but it is worth reading anyway to understand it better.
to support internationalization features.
Namespace
Namespace
---------
---------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment