Post on 22-May-2015
2. 3.
4. 5. 6.
7. 80-120 ( ) 8. UTF-8 9. Unix 10. PHP
11. symfonyhttp://trac.symfony-project.org/wiki/HowToContributeToSymfony#CodingStandards 12.
13. : $my_variable 14. ,
15. , .class.php 16. ,
if ( $a> 0 ) { $a= 4 ; } class User { public functiongetAge () { } } 17. ,
if ( $age> 5 &&$rate> 50 ) { $wineStatus= 'good' ; } 18.
19. $isCreated= true ; $count_degrees= 40 ;
20. functioncount_events ( $user ) { //... }
21. define ( 'PROJECT_VERSION' , '1.2' ) ; class User { constAGE_MAX= 90 ; }
22. class User { } classtransinetUserextendssfUser { }
23. classCar { public$numOfWheels= 4 ; protected$engine=null ; public functiongetWheels () { //.. } }
24.
25. $somethingAt$dateOfSomething 26.
27. - - getSomething()setSomething($value) 28. renderSomething() 29. $someArray= array ( 'foo' => 'bar' , 'spam' => 'ham' , 'bzz' => array ( 'bzz1' , 'bzz2' ) ) ;
30.
31. , . 32. , , 33. // !!!111 if ( $i> 0 )$i+= 4 ; // if ( $i> 0 ) { $i+= 4 ; } 34.
switch ($ condition ) { case 1 : action1() ; break ; case 2 : action2() ; break ; case 3 : default : defaultaction() ; break ; } 35.
if ( $condition1 || $condition2 || $condition3 ) { // code here } 36.
// $name= 'preved' ; 37.
38. , . 39. " ", . 40. classToolbar{ } classphUserextendssfUser { } 41.
classCar { public$numOfWheels= 4 ; protected$engine=null ; public functiongetWheels () { //.. } protected functionloadWheels () { } } 42. HTML HTML c PHP
43. PHP 44. if: elseif: endif, foreach: endforeach .. 45. switch if else 46. HTML HTML c PHP < div > < strong > strong > div > 47. HTML HTML c PHP
48. YML
UserProfile : columns : name : type : string length : 255 status : type :enum values : -active -unactive -pending default :active 49. SQL
50. : , , . 51. < >_< > 52. SQL
53. is_... 54. ..._at 55. SQL
56. SQL . 57. SQL SELECT t.id,t.owner_sf_guard_user_id,t.created_at,t.is_draftFROM event tWHEREt . ended_at> NOW () 58.