Home 一丢丢思考(thinking about grammar)
Post
Cancel

一丢丢思考(thinking about grammar)

1. 为什么行末尾要加分号?  为什么每个方法结束要放(), {} ? 

2. 为什么 声明变量,常量,数组的方法不一样?

var $apple = 'apple';

define('APPLE', 'an apple');

$apples = array('apple1', 'apple2', 'apple3');

像ruby, js 那样一个写法多好: 

$apple = 'apple'

APPLE= 'apple'

$apples = ['apple1', 'apple2']

3. 难道是我 MVC框架用多了? 感觉不用MVC 就 没法干活。特别看不了这样的代码:

<?php

  echo " ... "

?>
This post is licensed under CC BY 4.0 by the author.